Setting up Unreal Engine 4 project files...
Binding IntelliSense data... 100%
Writing project files... 0%
UnrealBuildTool Exception: ERROR: Failed to harvest environment variables
GenerateProjectFiles ERROR: UnrealBuildTool was unable to generate project files
.
Press any key to continue . . .
This is the error I get after running setup and trying to generate the project files using the latest master branch. I tried the latest promoted but same error as well… Ran the file as normal and with admin rights. I have compiled from source before and this is a new error to me.
Any ideas?
EDIT: And now it works?
I deleted the folder and started over. This time I made sure I ran the setup and generateprojectfiles as admin the first time (I dont think I did that the first time the last time) and it had no issues… yay for a bug I can’t reproduce.
EDIT2: I take it back it is still broken, I checked out release instead of master is why it was working without issue.
EDIT3: Fixed in the latest pull from master branch, thanks Robb!
Current folder is “D:\Unreal Engine\master” so that shouldn’t be an issue =( I have had the older pre 4.8 master branch compiled in here as well at one point so this is just weird.
Weird maybe there is some kind of lingering setting in that folder that’s messing with it. Have you tried going through the motions and running generate project files in a different folder just in case?
I did a clean reinstall and pull and still the same issue. I am trying it now on another drive and in another folder and will see what happens this time. I am starting to suspect it is either using Windows 10 or using VS Community 2013 as the issue but it honestly seems highly unlikely. These are however the only changes I have to this system since the last time I did this.
Anyone who is having this problem - could you please inspect your user Temp directory - likely to be something like [FONT=Courier New]C:\Users<myusername>\AppData\Local\Temp and see if you have a couple of matching .tmp and .tmp.bat files, e.g.: [FONT=Courier New]tmp1234.tmp.bat and [FONT=Courier New]tmp1234.tmp. These are the files which harvest and contain your harvested environment variables respectively.
It’s possible that the .tmp file is either empty or malformed in some way. If you could post the details here, that would be great!
Also, if the .tmp file is empty, try running the .bat file directly and see if the .tmp file suddenly becomes populated. We have seen this before when dealing with systems containing large numbers of environment variables.
As far as I can tell it is indeed merged in master and the latest promoted branch. I pulled down master after the update, which pulled down updated required files, and re ran the generate project files with the problematic directory name and it worked without issue.
Is there a work around for this since it missed 4.8.1? It seems that the batch file is choking on my system path environment variable. EX: \Microchip\xc32\v1.21\bin";"C:\Program was unexpected at this time.
Right now I’m going through and cleaning that environment variable up, and hoping that’s all that it needs.
Edit: finished cleaning up path variable and I still get:
“\Microchip\xc16\v1.11\bin”;“C:\Program was unexpected at this time.”
even though this section is:
"C:\Program Files (x86)\Microchip\xc16\v1.11\bin;C:\Program Files (x86)\Microchip\xc8\v1.20\bin"
So I can’t use Unreal Engine for C++ projects now until I can get/figure out a work around or until next path/release.
Edit: Thought I had already scrubbed a Path in my User variables, that had the last remaining double quotes. Appears to work now.
For some reason, this added quotation mark has been added to the Global “PATH” environment variable. This was on my work laptop, so it might be a stuff-up from the Active Directory/IEM scripts distributing Skype, but it could be from the Microsoft SDKs… not 100% sure (without confirmation).
It might not be the same exact location for you, so look for a single quotation mark in your PATH System Variable and remove it - ** here be dragons, keep a copy of the whole PATH environment variable, just in case you break your windows.**
I have the same problem as the original post person
My temp file is empty what does that mean? What do i do? And please keep it stupid im a very beginner level programmer that’s trying learn game development in Unreal
@RiccardoLasagno and @SteakBoy: I have seen the same issue on Windows 10, UE 4.10.4. My temporary solution was to add admin rights to the editor (therefor for the launcher too). It works perfectly now.