Hi everyone,
I had experience problem while executing code for esp32 arduino module only, not even running a simple blink code. Compiling for arduino boards (i'd tried for arduino UNO) doesn't experience this error.
This is the error i get:
Arduino: 1.8.20 Hourly Build 2021/12/20 07:33 (Windows 10), Board: "DOIT ESP32 DEVKIT V1, 80MHz, 921600, None"
fork/exec C:\Windows\system32\cmd.exe: Operation did not complete successfully because the file contains a virus or potentially unwanted software.
Error compiling for board DOIT ESP32 DEVKIT V1.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
What i had tried so far:
Reinstall every related board managers (with system restart)
Reinstall Arduino
Install different version of Arduino (portable and install version, as well as nightly beta version)
Install Arduino in different location
Whitelist cmd and esp32 library in windows defender
Run sfc check in cmd (according to general solution when experiencing this potential virus detection situation)
How does it started:
I was trying to do a firebase-esp32 project, i had install this "Firebase Arduino Client Library for ESP8266 and ESP32", i try to compile a Basic example and i got the error. Afterwards no matter what code i run for esp32 module will get the cmd error
The version of packages i used:
Arduino: 1.8.20
ESP32 by espressif: 2.0.2
Firebase Arduino Client Library for ESP8266 and ESP32: 3.1.5
Thanks in advance for helping me out, and tell me if i need any further declaration. Also feel free to tell me if my formatting doesn't meet the forum rules because i am new here
J-M-L
April 18, 2022, 2:00pm
2
I'm not a windows person, but this looks like a Windows core executable program not something you get from Arduino. So may be it did get contaminated somehow. In which case reinstalling arduino won't change anything to the matter...
I recommend that you follow this suggestion to get a better idea of what step is failing and why.
Ya it shows a cmd problem, it having problems whenever running for ESP32.
Any suggestions from your side?
Thank you
The message says
Arduino: 1.8.20 Hourly Build 2021/12/20 07:33
Why do you use the hourly build and not the stable version 1.8.19?
Thanks for the reply, this is what i got after activating showing verbose output
Arduino: 1.8.20 Hourly Build 2021/12/20 07:33 (Windows 10), Board: "DOIT ESP32 DEVKIT V1, 80MHz, 921600, None"
E:\Coding\Arduinoo\arduino-nightly\arduino-builder -dump-prefs -logger=machine -hardware E:\Coding\Arduinoo\arduino-nightly\hardware -hardware C:\Users\user\AppData\Local\Arduino15\packages -tools E:\Coding\Arduinoo\arduino-nightly\tools-builder -tools E:\Coding\Arduinoo\arduino-nightly\hardware\tools\avr -tools C:\Users\user\AppData\Local\Arduino15\packages -built-in-libraries E:\Coding\Arduinoo\arduino-nightly\libraries -libraries E:\Coding\ESP32\libraries -fqbn=esp32:esp32:esp32doit-devkit-v1:FlashFreq=80,UploadSpeed=921600,DebugLevel=none -ide-version=10820 -build-path C:\Users\user\AppData\Local\Temp\arduino_build_704300 -warnings=none -build-cache C:\Users\user\AppData\Local\Temp\arduino_cache_575119 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.riscv32-esp-elf-gcc.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\gcc8_4_0-esp-2021r2 -prefs=runtime.tools.riscv32-esp-elf-gcc-gcc8_4_0-esp-2021r2.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\gcc8_4_0-esp-2021r2 -prefs=runtime.tools.mklittlefs.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\mklittlefs\3.0.0-gnu12-dc7f933 -prefs=runtime.tools.mklittlefs-3.0.0-gnu12-dc7f933.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\mklittlefs\3.0.0-gnu12-dc7f933 -prefs=runtime.tools.mkspiffs.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.xtensa-esp32s2-elf-gcc.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32s2-elf-gcc\gcc8_4_0-esp-2021r2 -prefs=runtime.tools.xtensa-esp32s2-elf-gcc-gcc8_4_0-esp-2021r2.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32s2-elf-gcc\gcc8_4_0-esp-2021r2 -prefs=runtime.tools.esptool_py.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.1.0 -prefs=runtime.tools.esptool_py-3.1.0.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.1.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2 -prefs=runtime.tools.xtensa-esp32-elf-gcc-gcc8_4_0-esp-2021r2.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2 -verbose E:\Coding\ESP32\ESP_Lab1_Blink\ESP_Lab1_Blink.ino
E:\Coding\Arduinoo\arduino-nightly\arduino-builder -compile -logger=machine -hardware E:\Coding\Arduinoo\arduino-nightly\hardware -hardware C:\Users\user\AppData\Local\Arduino15\packages -tools E:\Coding\Arduinoo\arduino-nightly\tools-builder -tools E:\Coding\Arduinoo\arduino-nightly\hardware\tools\avr -tools C:\Users\user\AppData\Local\Arduino15\packages -built-in-libraries E:\Coding\Arduinoo\arduino-nightly\libraries -libraries E:\Coding\ESP32\libraries -fqbn=esp32:esp32:esp32doit-devkit-v1:FlashFreq=80,UploadSpeed=921600,DebugLevel=none -ide-version=10820 -build-path C:\Users\user\AppData\Local\Temp\arduino_build_704300 -warnings=none -build-cache C:\Users\user\AppData\Local\Temp\arduino_cache_575119 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.riscv32-esp-elf-gcc.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\gcc8_4_0-esp-2021r2 -prefs=runtime.tools.riscv32-esp-elf-gcc-gcc8_4_0-esp-2021r2.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\gcc8_4_0-esp-2021r2 -prefs=runtime.tools.mklittlefs.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\mklittlefs\3.0.0-gnu12-dc7f933 -prefs=runtime.tools.mklittlefs-3.0.0-gnu12-dc7f933.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\mklittlefs\3.0.0-gnu12-dc7f933 -prefs=runtime.tools.mkspiffs.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3 -prefs=runtime.tools.xtensa-esp32s2-elf-gcc.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32s2-elf-gcc\gcc8_4_0-esp-2021r2 -prefs=runtime.tools.xtensa-esp32s2-elf-gcc-gcc8_4_0-esp-2021r2.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32s2-elf-gcc\gcc8_4_0-esp-2021r2 -prefs=runtime.tools.esptool_py.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.1.0 -prefs=runtime.tools.esptool_py-3.1.0.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.1.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2 -prefs=runtime.tools.xtensa-esp32-elf-gcc-gcc8_4_0-esp-2021r2.path=C:\Users\user\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2 -verbose E:\Coding\ESP32\ESP_Lab1_Blink\ESP_Lab1_Blink.ino
Using board 'esp32doit-devkit-v1' from platform in folder: C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2
Using core 'esp32' from platform in folder: C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2
cmd /c if exist "E:\\Coding\\ESP32\\ESP_Lab1_Blink\\partitions.csv" COPY /y "E:\\Coding\\ESP32\\ESP_Lab1_Blink\\partitions.csv" "C:\\Users\\user\\AppData\\Local\\Temp\\arduino_build_704300\\partitions.csv"
cmd /c if not exist "C:\\Users\\user\\AppData\\Local\\Temp\\arduino_build_704300\\partitions.csv" if exist "C:\\Users\\user\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.2\\variants\\doitESP32devkitV1\\partitions.csv" COPY "C:\\Users\\user\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.2\\variants\\doitESP32devkitV1\\partitions.csv" "C:\\Users\\user\\AppData\\Local\\Temp\\arduino_build_704300\\partitions.csv"
cmd /c if not exist "C:\\Users\\user\\AppData\\Local\\Temp\\arduino_build_704300\\partitions.csv" COPY "C:\\Users\\user\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.2\\tools\\partitions\\default.csv" "C:\\Users\\user\\AppData\\Local\\Temp\\arduino_build_704300\\partitions.csv"
1 file(s) copied.
cmd /c IF EXIST "E:\\Coding\\ESP32\\ESP_Lab1_Blink\\bootloader.bin" ( COPY /y "E:\\Coding\\ESP32\\ESP_Lab1_Blink\\bootloader.bin" "C:\\Users\\user\\AppData\\Local\\Temp\\arduino_build_704300\\ESP_Lab1_Blink.ino.bootloader.bin" ) ELSE ( IF EXIST "C:\\Users\\user\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.2\\variants\\doitESP32devkitV1\\bootloader.bin" ( COPY "C:\\Users\\user\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.2\\variants\\doitESP32devkitV1\\bootloader.bin" "C:\\Users\\user\\AppData\\Local\\Temp\\arduino_build_704300\\ESP_Lab1_Blink.ino.bootloader.bin" ) ELSE ( COPY /y "C:\\Users\\user\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.2\\tools\\sdk\\esp32\\bin\\bootloader_dio_80m.bin" "C:\\Users\\user\\AppData\\Local\\Temp\\arduino_build_704300\\ESP_Lab1_Blink.ino.bootloader.bin" ) )
fork/exec C:\Windows\system32\cmd.exe: Operation did not complete successfully because the file contains a virus or potentially unwanted software.
Error compiling for board DOIT ESP32 DEVKIT V1.
Sorry for the long message, but i still can't understand about what it means
Cyrus_Wong:
fork/exec C:\Windows\system32\cmd.exe: Operation did not complete successfully because the file contains a virus or potentially unwanted software.
It looks like some anti-virus software is preventing the ESP32 build process from copying one of the files it wants to copy. Do a scan on your files to make sure there is no virus and then try again with the anti-virus disabled.
Oh that's because i was trying different version of Arduino to see whether the problem could solved by that. This is the one i trying currently.
Having the same problem with that version (1.8.19) at the first place actually.
Thanks again for replying,
Ya i had fully scanned my system, and also disabling my antivirus as well as whitelist related file and path (cmd and esp32 library).
The issue still persists.
Then I would Google "file contains a virus or potentially unwanted software" to see if you can find out what software generates that error.
As what i stated in my question and i replied just now, what they suggested and i had tried were:
run sfc /SCANFILE=c:\windows\explorer.exe and sfc /SCANFILE=C:\Windows\SysWow64\explorer.exe in cmd in administrator mode
disable windows defender
whitelist the file or folder that might cause false positive report
J-M-L
April 18, 2022, 3:58pm
13
get a Mac?
as I said, I'm not a windows person. can you run cmd.exe manually without having the issue ?
Lol i don't have another computer to run
But yes, I can run cmd.exe without issues.
The command that fails is:
cmd /c IF EXIST "E:\Coding\ESP32\ESP_Lab1_Blink\bootloader.bin" ( COPY /y "E:\Coding\ESP32\ESP_Lab1_Blink\bootloader.bin" "C:\Users\user\AppData\Local\Temp\arduino_build_704300\ESP_Lab1_Blink.ino.bootloader.bin" ) ELSE ( IF EXIST "C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\variants\doitESP32devkitV1\bootloader.bin" ( COPY "C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\variants\doitESP32devkitV1\bootloader.bin" "C:\Users\user\AppData\Local\Temp\arduino_build_704300\ESP_Lab1_Blink.ino.bootloader.bin" ) ELSE ( COPY /y "C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2\tools\sdk\esp32\bin\bootloader_dio_80m.bin" "C:\Users\user\AppData\Local\Temp\arduino_build_704300\ESP_Lab1_Blink.ino.bootloader.bin" ) )
I think you should scan:
E:\Coding\ESP32,
C:\Users\user\AppData\Local\Arduino15\packages\esp32,
and
C:\Users\user\AppData\Local\Temp
Yes i did, nothing was detected in these locations
I had solve the problem by reverting my esp32 version from 2.0.2 all the way back to 1.0.6 and it compile successfully.
Thanks for everybody that spending time helping me
system
Closed
October 15, 2022, 4:43pm
18
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.