Hello, I am new here.
Since the update I can't compile ESP32 anymore.
Error message: (in German)
Zugriff verweigert
exit status 1
Compilation error: exit status 1
I installed the IDE2.1.1 on another computer and created a new sketch. The same problem appears.
the output is:
FQBN: esp32:esp32:esp32
Using board 'esp32' from platform in folder: C:\Users\Michael Glier\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10
Using core 'esp32' from platform in folder: C:\Users\Michael Glier\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10
cmd /c if exist "C:\Users\Michael Glier\AppData\Local\Temp\.arduinoIDE-unsaved2023619-11812-18nnsgp.8ckqk\sketch_jul19b\partitions.csv" COPY /y "C:\Users\Michael Glier\AppData\Local\Temp\.arduinoIDE-unsaved2023619-11812-18nnsgp.8ckqk\sketch_jul19b\partitions.csv" "C:\Users\Michael Glier\AppData\Local\Temp\arduino\sketches\BCC6D161902E6D97CFF1F1190C34FFBA\partitions.csv"
cmd /c if not exist "C:\Users\Michael Glier\AppData\Local\Temp\arduino\sketches\BCC6D161902E6D97CFF1F1190C34FFBA\partitions.csv" if exist "C:\Users\Michael Glier\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\variants\esp32\partitions.csv" COPY "C:\Users\Michael Glier\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\variants\esp32\partitions.csv" "C:\Users\Michael Glier\AppData\Local\Temp\arduino\sketches\BCC6D161902E6D97CFF1F1190C34FFBA\partitions.csv"
cmd /c if not exist "C:\Users\Michael Glier\AppData\Local\Temp\arduino\sketches\BCC6D161902E6D97CFF1F1190C34FFBA\partitions.csv" COPY "C:\Users\Michael Glier\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\tools\partitions\default.csv" "C:\Users\Michael Glier\AppData\Local\Temp\arduino\sketches\BCC6D161902E6D97CFF1F1190C34FFBA\partitions.csv"
1 Datei(en) kopiert.
cmd /c IF EXIST "C:\Users\Michael Glier\AppData\Local\Temp\.arduinoIDE-unsaved2023619-11812-18nnsgp.8ckqk\sketch_jul19b\bootloader.bin" ( COPY /y "C:\Users\Michael Glier\AppData\Local\Temp\.arduinoIDE-unsaved2023619-11812-18nnsgp.8ckqk\sketch_jul19b\bootloader.bin" "C:\Users\Michael Glier\AppData\Local\Temp\arduino\sketches\BCC6D161902E6D97CFF1F1190C34FFBA\sketch_jul19b.ino.bootloader.bin" ) ELSE ( IF EXIST "C:\Users\Michael Glier\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\variants\esp32\bootloader.bin" ( COPY "C:\Users\Michael Glier\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\variants\esp32\bootloader.bin" "C:\Users\Michael Glier\AppData\Local\Temp\arduino\sketches\BCC6D161902E6D97CFF1F1190C34FFBA\sketch_jul19b.ino.bootloader.bin" ) ELSE ( "C:\Users\Michael Glier\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.5.1/esptool.exe" --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o "C:\Users\Michael Glier\AppData\Local\Temp\arduino\sketches\BCC6D161902E6D97CFF1F1190C34FFBA\sketch_jul19b.ino.bootloader.bin" "C:\Users\Michael Glier\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10\tools\sdk\esp32\bin\bootloader_qio_80m.elf" ) )
esptool.py v4.5.1
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
cmd /c if exist "C:\Users\Michael Glier\AppData\Local\Temp\.arduinoIDE-unsaved2023619-11812-18nnsgp.8ckqk\sketch_jul19b\build_opt.h" COPY /y "C:\Users\Michael Glier\AppData\Local\Temp\.arduinoIDE-unsaved2023619-11812-18nnsgp.8ckqk\sketch_jul19b\build_opt.h" "C:\Users\Michael Glier\AppData\Local\Temp\arduino\sketches\BCC6D161902E6D97CFF1F1190C34FFBA\build_opt.h"
cmd /c if not exist "C:\Users\Michael Glier\AppData\Local\Temp\arduino\sketches\BCC6D161902E6D97CFF1F1190C34FFBA\build_opt.h" type nul > "C:\Users\Michael Glier\AppData\Local\Temp\arduino\sketches\BCC6D161902E6D97CFF1F1190C34FFBA\build_opt.h"
Zugriff verweigert
cmd /c type nul > "C:\Users\Michael" "Glier\AppData\Local\Temp\arduino\sketches\BCC6D161902E6D97CFF1F1190C34FFBA/file_opts"
exit status 1
Compilation error: exit status 1
I installed the software on a virtual machine for testing. In the board manager ESP32 by Espressif installed, the ESP32 Dev Module selected. The same problems occur.
The Error is a space in my Username.
The compiler writes:
cmd /c type nul > "C:\Users\Michael" "Glier\AppData\Local\Temp\arduino\sketches\925B853CE76FCD073FEC76814EEE6C3C/file_opts"
but correct its (i think so):
cmd /c type nul > "C:\Users\Michael Glier\AppData\Local\Temp\arduino\sketches\925B853CE76FCD073FEC76814EEE6C3C/file_opts"
How i can modify it?
Thank you.
Do I have any change to fix the problem?
I think I am not the only one with spaces in the username.
Before the update of Arduino IDE I had no problem.
The problem is with the new updated board manager 2.0.10 of esp32 which throws error. I fixed it by pasting "
https://dl.espressif.com/dl/package_esp32_index.json
" in the Additional Boards section in preferences and changing it to 1.0.6.
It took me 5 hours to figure out the issue. Hopefully the bug gets fixed, till then use earlier version 1.0.6 of esp32

noobsandhu:
I fixed it by pasting "
https://dl.espressif.com/dl/package_esp32_index.json
" in the Additional Boards section in preferences and changing it to 1.0.6.
Your fix is far in excess of what is necessary. The regression was introduced in the 2.0.10 release, so you can simply roll back to the previous version (2.0.9) instead of going all the way back to the antiquated 1.0.6.
Even if you did want to use 1.0.6 for some reason, it is not necessary to change your "
Additional Boards Manager URLs
" preference in order to accomplish that. All the releases are available from the maintained URL specified in the official installation instructions for the "
esp32
" boards platform:
https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide
You can simply select the version you want from the menu in the Arduino IDE Boards Manager.

noobsandhu:
Hopefully the bug gets fixed
It has already been fixed:
github.com/espressif/arduino-esp32
## Tests scenarios
Tested on clean Windows 11 box, Arduino IDE 2.1.1, username with spaces, 2.0.10. The issue is present and is fixed by these commits.
Includes patch by @pennam fixing #8424 for IDE 1.8.x.
## Related links
Closes #8424 and fixes Windows path issues reported in Arduino forums e.g. [here](https://forum.arduino.cc/t/compilation-error-exit-status-1/1149342) and [here](https://forum.arduino.cc/t/compiling-for-esp32-fails-access-is-denied/1149574)
That fix will be in the next release of the "
esp32
" boards platform. If you are using the maintained URL in your "
Additional Boards Manager URLs
" preference, Arduino IDE will notify you once that release is available.
If you want the fix now, you can apply it manually to your existing installation. I can provide instructions for doing that if anyone is interested.
OK, I have spent most of the day chasing what appears to be this "space in user name" fiasco.
I have uninstalled, reinstalled, all the usual Windows stuff. Rebooted, etc. version 1.18 worked OK.
Moving back to 2.0.9 solved the "access is denied problem. Now, I can get back to rebuilding everything I destroyed along the way. My big mistake--accepting an "upgrade". One of those things--I had just made some changes, then accepted the upgrade. Assumed it was something I did. Which is usually the case.
"If you want the fix now, you can apply it manually to your existing installation. I can provide instructions for doing that if anyone is interested.".
Count me as one who would like said instructions. I do like to keep stuff up to date.
Pardon my grumpy tone. This forum and this topic brought me back from the edge of self diagnosed insanity. Thanks.
OK, here you go:
Use Arduino IDE Boards Manager to install version 2.0.10 of the
esp32
boards platform if you already rolled back to a previous version.
Select
File > New Sketch
from the Arduino IDE menus.
Select any ESP32 board from the Arduino IDE
Tools > Board
menu.
Select
Sketch > Verify/Compile
from the Arduino IDE menus.
Wait for the compilation to finish.
Scroll the black output panel at the bottom of the Arduino IDE window all the way up to the top.
Look for the line that starts with "
Using board ...
".
For example:
Using board 'esp32' from platform in folder: C:\Users\per\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.10
Use any text editor to open the file platform.txt
that you find under the path shown in that line of the compilation output.
Change line 192 of platform.txt
from this:recipe.hooks.core.prebuild.set_core_build_flag.pattern=bash -c "echo '-DARDUINO_CORE_BUILD' > {file_opts.path}"
to this:recipe.hooks.core.prebuild.set_core_build_flag.pattern=bash -c "echo -DARDUINO_CORE_BUILD > {file_opts.path}"
Change lines 195-197 from this:recipe.hooks.prebuild.set_core_build_flag.pattern.windows=cmd /c type nul > {file_opts.path}
recipe.hooks.core.prebuild.set_core_build_flag.pattern.windows=cmd /c echo "-DARDUINO_CORE_BUILD" > {file_opts.path}
recipe.hooks.core.postbuild.set_core_build_flag.pattern.windows=cmd /c type nul > {file_opts.path}
to this:recipe.hooks.prebuild.set_core_build_flag.pattern.windows=cmd /c type nul > "{file_opts.path}"
recipe.hooks.core.prebuild.set_core_build_flag.pattern.windows=cmd /c echo "-DARDUINO_CORE_BUILD" > "{file_opts.path}"
recipe.hooks.core.postbuild.set_core_build_flag.pattern.windows=cmd /c type nul > "{file_opts.path}"
Save the file.
Select File > Quit from the Arduino IDE menus.
Start Arduino IDE.
ⓘ Restarting Arduino IDE is necessary to cause it to recognize the changes you made to the platform.txt
file.
Now try compiling your sketch for an ESP32 board again. Hopefully this time the "Access is denied
" error will no longer occur.