Get an error message even when verifing sample sketches.

I got an Arduino uno R3 for Christmas, a genuine one, Everything worked fine for a few attempts (absolute beginner)tried a few samples and all went well, then tried writing code from a book, got an error message but it did not highlight a line.

Went to reinstall 1.6.13 but installed 1.8 instead.

This seemed to fix the problem ( I verified and uploaded the "blink" sketch to check ) so I started writing the SOS sketch from "Earthshine electronics Arduino starter kit". I verified after every two or three lines which seemed OK, only the last line was highlighted, then it gave the listed error and did not highlight a line.

After a while I tried to check all is ok by verifing the "blink" sketch from the samples but still got the same error message.

I tried reinstalling 1.8 but immediately got the same error message again when verifying a sample sketch.

Had a quick look on google and there are a couple of similar questions on this site but not with the same full error code included and with two conflicting answers. Now when I paste the error message into google it says "error 400 that's all we know".

The following error message was copied after I tried to verify the "button" sketch from the samples.

This is the error message;

Arduino: 1.8.0 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\New\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10800 -build-path C:\Users\New\AppData\Local\Temp\arduino_build_522060 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\New\AppData\Local\Temp\arduino_modified_sketch_980333\Button.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\New\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10800 -build-path C:\Users\New\AppData\Local\Temp\arduino_build_522060 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\New\AppData\Local\Temp\arduino_modified_sketch_980333\Button.ino
Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10800 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\New\AppData\Local\Temp\arduino_build_522060\sketch\Button.ino.cpp" -o "nul"
Generating function prototypes...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10800 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\New\AppData\Local\Temp\arduino_build_522060\sketch\Button.ino.cpp" -o "C:\Users\New\AppData\Local\Temp\arduino_build_522060\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\New\AppData\Local\Temp\arduino_build_522060\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10800 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\New\AppData\Local\Temp\arduino_build_522060\sketch\Button.ino.cpp" -o "C:\Users\New\AppData\Local\Temp\arduino_build_522060\sketch\Button.ino.cpp.o"
Compiling libraries...
Compiling core...
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\wiring_pulse.S.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\WInterrupts.c.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\hooks.c.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\wiring.c.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\wiring_analog.c.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\wiring_digital.c.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\wiring_pulse.c.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\wiring_shift.c.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\CDC.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\HardwareSerial.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\HardwareSerial0.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\HardwareSerial1.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\HardwareSerial2.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\HardwareSerial3.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\IPAddress.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\PluggableUSB.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\Print.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\Stream.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\Tone.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\USBCore.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\WMath.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\WString.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\abi.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\main.cpp.o
Using previously compiled file: C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\new.cpp.o
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\core.a" "C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\wiring_pulse.S.o"
c:\program files (x86)\arduino\hardware\tools\avr\bin\../lib/gcc/avr/4.9.2/../../../../avr/bin/ar.exe: unable to rename 'C:\Users\New\AppData\Local\Temp\arduino_build_522060\core\core.a'; reason: Permission denied

exit status 1
Error compiling for board Arduino/Genuino Uno.

The last three lines in the error area ( "C:\Program Files(x86)\Arduino"..... etc) the error code is orange, if you scroll up all previous error code is white.

Not sure if I should include so much error code ( all of it ) but I am very new to this and totally lost. Thanks in advance for any help you can give.

I assume it is the last line with "permission denied" that is the deal-breaker.

But I am no longer familiar with Windows so I don't know why it would be like that.

If you have nothing better to do it may be worth deleting and re-installing the Arduino IDE.

It should also be possible to install one of the earlier versions of the IDE (in addition to 1.8 ) so that you could check if the problem is specific to 1.8

...R

The standard get of this well known problem is to run the IDE as Admin. (right click the icon)

Mark

Thanks for the answers but I have uninstalled, restarted, reinstalled, restarted and run as administrator, right click the icon (thanks, I did not know that) and still it comes up with the same verification error.

If it were a mechanical thing I could take it apart and figure it out but I'm still very lost with this.

If it were a mechanical thing I could take it apart and figure it out but I'm still very lost with this.

The IDE will continue to use the same build directory as long as it runs. Shut down the IDE, and delete that build directory. Start the IDE, and try again. Do you get the same problem?

Yes (this is a problem I have with the IDE) - I get round it by running as admin.

Problem appears to be with the destination file not the source file.

Mark

Whilst considering uninstalling Arduino again I noticed some anti malware that didn't look familiar so I got rid of that and it looks like the problem is solved.

For future reference I think it was adbyte anti malware but I'm not sure.

Thanks to all anyway.

Rinky: Whilst considering uninstalling Arduino again I noticed some anti malware that didn't look familiar so I got rid of that and it looks like the problem is solved.

For future reference I think it was adbyte anti malware but I'm not sure.

Thanks to all anyway.

Not everything that says it's anti malware is anti malware!

Paul

AS I said have - I HAD - this problem!

In the end I found that it was a corrupt user profile. I think this happened just after I switched from windows 8 to 10. One of the Microsoft updates was wrong and they provided a "FIX" which invoved running some long complex command from the command line.

SOLUTION

Set up a new user, give it admin privileges just as your main/normal account has

Use the new account - no need to reinstall the Arduino IDE. DO NOT DELETE THE OLD ACCOUNT!

You will find that some of the desktop ICONs are missing and that your app's (eg browser) are missing stuff but these can be moved across - details depend on the app.

You may wish to copy files from your old account (eg the contents of the documents folder) if so copy things folder by folder.

DO NOT copy every thing in the old account!. There are some files in the old account which define the profile of the user and it is one of these file which is corrupt.

Take your time move thins to the new account one thing at a time. When and only when you are happy with the new account should you even think about deleting the old account.

Mark

MODS - can you copy this info to the getting started/trouble shooting forum