I have seen a few topic headers on this issue but they ended without resolving it and thought i would let people looking know how to fix it. The answer is actually in the error message.
the avrdude states right at the start of the error that the Serial monitor is open.
avrdude: ser_open(): can't open device "\.\COM6": Access is denied.
That error message in english says -
serial monitor is open, this is denying the bootloader the access to be able to open the device on COM port 6.
All you have to do is turn off the serial monitor. If you are unsure if it is running or not - at the bottom of the sketch is the output window that swaps to be the serial monitor window.
If written above the bottom window you see both the word "output" and the words "serial monitor" it means serial monitor is running, it is just running behind the output window. Close the serial monitor window entirely. You should only see above the bottom window the word "output" and nothing else.
Once the serial monitor window is officially closed this error notification will stop appearing and you will upload to the boards without this issue giving you headaches.
hopefully that clears it up for everyone having the issue. BTW i am using a PC version of Arduino IDE2.3.3 on windows 11. I hope this helped remove the frustration.
i cant see why you wouldnt close the serial monitor. It is exactly what the error message is telling you to do. Not to mention that doing that has worked for me not occasionally but every single time.
At least in version 1.8.x, the IDE would automatically close and re-open the Serial monitor for you, during "upload." Is that feature missing in 2.x? Is it broken?
honestly dont tell them but i much prefer 1.8 and 2.3.3 has libraries that are altered so an old sketch that you need to upload to like an esp32 might have troubles because the system cant find a .h that used to be fundamental to the entire sketch. One thing i hate doing is reinstalling or updating arduino software versions . hopefully they get 2.3.3 to run as well as 1.8 and then dont touch it. or just get copilot to write ide version 1233435354233323t4.1 and be done with upgrading it constantly. lol
oh and how the new version highlights is weird and completely unnecessary. it also auto fills like brackets in a way that actually makes you waste time running around erasing the close bracket , its like it ws meant to assist you writing but in fact it is like having another person helping write doing things to help at bad times. also too many windows. i dont need all the managers on one side it takes up real estate on the screen. If you cant remember a shift key to access things then code isnt for you lol.
With everyone using AI to build their code its 2 days of writing a sketch can be knocked off now in 45 min. but you have to proof read copilot it is a bit of a plagiarist and isnt very smart, leaves a lot out and plays dumb often. lol if you are not careful it can give you a 200 line sketch that could be done with 6.
You must get your facts straight. IDE 2.x does not use different libraries compared to 1.x. It's what you install.
ESP32 stuff is the responsibility of Espressif, not of Arduino (with the exception of the board package for the Arduino Nano ESP32). Espressif did the breaking changes in their board package, not the IDE nor Arduino.
mate sorry i was only saying nothing before. honestly i dont give a rat arse about the programs or te modules or dev boards they are all missing something or too big or just have simple things like the positive and negative right beside each other just to me with your day.
Think about this. soon a 4 year old will not need to understand code at all or boars or anything. They though will make programs that will make all of this arduino era irrelevant. i can write sketches that are many thousands of line now in under a day with copilot. "Espressif did the breaking changes" . you consider that breaking changes do you? in a year someone in their room with copilot and chat gpt wil make something that will make these breaking changes look like a bug fix. on an bselete programming method. ppl dont need legal teams with 100 paralegals searching for the best defence for you, copilot will do all of their jobs vin a millionth of the time for free. anyone right now not using AI for any part of their business is going to fail. AI see the failures not in the sketch but in the programming it will make a new system that will make linux look like a 1980s casio pocket calculator. if thats not where your head is at with the potential AI can provide then you are gone. all the tech guys are there ubtil what platform they are embbedded with becomes irrelevant overnight because little jimmy just invented with copilot a 4 digit computer chip using dna. then only to find out we are all a product of AI as we thriugh little jimmy now understand muscle memory and brain how the brin learns and retains and why dreams and visual thought exist which then leqds to their first multi fell self moboile self learning computer and we all go hmmm. did we just make a human without requiring birth? are we really just that? a robot and something has to be in it. no souls needed?
to me that is a real possibility very soon living the blade runner from all of this. So whatever espressif did for this development board stuff are not breaking changes, it is the way to be very underwhelming. AI is going to make us 100000000 times faster than last year and then the same next year. so i dont care whats what now honestly i a few years a kid named jimmy is going to look at you and say get your facts straight. i want to make stuff, i dont need to have a better knowledge f software or hardware than you nor do i have to have my facts straight.vAll i need to have is a better idea than yours or make better use of the tools to make something that changes everything. worrying about my facts is a complete waste of your time brother.
sorry for saying it was arduino and not espressif.
its ok i am an italian australian. i am already forgiven.
mate i never ever said that. what i said is that they new software cant find things like the webserver.h file even though it is right there in the library sticking out like a sore thumb. The software is having issues finding .h files within certain libraries.
and it was you that said breaking changes not me read the second paragraph of your own post. Thats why i had a dig calling them sarcastically "breaking changes". They are nothing of the sort. You literally wrote that yourself and then attacked me on. I interpreted your message as you saying espressif 's "ground breaking changes" otherwise that sentence doesnt parse well if trying to say something contrary. Any way you have jumped in and said nothing that says my post is incorrect, because it is correct. So why are you trolling other peoples conversations, misunderstanding what is written and replying in ways that show a failed comprehension because you accuse me of writing something i clearly did not say? And case closed is what 5 year olds say. Seriously you need a girlfriend. or at least a lot more sex so you dont worry yourself on posts put on the internet. If you knew who i was you would realise you put your foot in it.
Select the "Preferences: Open Settings (UI)" command from the menu. ⓘ You can scroll down through the list of commands to find it or type the name in the field.
A "Preferences" tab will open in the Arduino IDE main panel.
Type editor.autoClosingBrackets in the "Search Settings" field of the "Preferences" tab.
Select "never" from the menu under the "Editor: Auto Closing Brackets" setting.
Close the Preferences tab by clicking its X icon.
If you don't like the "Auto Closing Brackets" feature, you might also prefer to disable the "Editor: Auto Closing Quotes" setting as well.
It has no problem finding it when I use it, and the same goes for thousands of other users. So this is not caused by some fundamental insurmountable flaw in Arduino IDE. That means we can probably help you solve that problem. Since it is distinct from the stated subject of this forum topic, I recommend opening a new forum topic with a detailed description of the exact conditions under which you are experiencing this problem. Please make sure to use a polite and professional tone instead of the infantile rudeness you adopted here.
When others have reported similar observations, we often found that it was caused by a bug in the sketch/library code, or by a misunderstanding of how to correctly use the Arduino framework. In some rare cases, it could be caused by a bug in the development tools, but there are workarounds for those.
Not quite
avrdude: ser_open(): can't open device ".\COM6": Access is denied.
This error message means that when avrdude tried to execute the ser_open() function for COM6 it was denied access to the port by the operating system. It has nothing to do with the bootloader. The actual cause of the error is unknown but most likely something has COM6 already open or something did not properly close COM6 when it was finished using it.
It does not not specifically indicate that the IDE serial monitor is open but that could be one of the possible causes among others. This error can also occur even when the serial monitor is closed.