Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

I cannot upload a code in arduino, every time appears this error message: Unhandled exception when cleaning up build "Uploading": {} #1615

Closed
foxyisnotsalt opened this issue Mar 5, 2023 · 9 comments

Comments

@foxyisnotsalt
Copy link

foxyisnotsalt commented Mar 5, 2023

My code works and uploads perfectly in Arduino IDE but when i use vscode it doesn't work at all

Unhandled exception when cleaning up build "Uploading": {}

@github-actions github-actions bot added the triage New issues that have not been reviewed. label Mar 5, 2023
@trethaller
Copy link

I also have this problem

@Pharap
Copy link

Pharap commented Mar 8, 2023

Same here.

I also haven't been able to manually select a port for weeks, I've been having to manually edit the arduino.json. That may or may not be related (it's likely that both actions interface with whatever serial API is in use).

@gcampbell-msft
Copy link
Contributor

@Pharap
I'm curious about you not being able to manually select a port for weeks. When did this issue begin? We recently updated the extension such that it depends on the Serial Monitor extension, so I'd like to hear more about this issue, what the UI looks like when you attempt to select a port, what versions of the extension that it broke on, etc. When you try to manually select a port, is it failing? Or is it not showing any ports?

Any additional information that you can provide would be great!

@gcampbell-msft gcampbell-msft added needs-more-info More details about this issue are needed for it to be actionable. and removed triage New issues that have not been reviewed. labels Mar 8, 2023
@trethaller
Copy link

I also cannot select ports. Nothing happens (no error) when I click on the "select port" button.

@Pharap
Copy link

Pharap commented Mar 8, 2023

@gcampbell-msft

When you try to manually select a port, is it failing? Or is it not showing any ports?

Like @trethaller, I click the <Select Serial Port> button on the bottom right and nothing happens. No menu, no error message, nothing.

When did this issue begin?

I'm not certain. Some time after the move to CLI. Possibly coincident with that.

what versions of the extension that it broke on

I'm currently on Arduino v0.5.0 and Serial Monitor v0.7.0.

@gcampbell-msft
Copy link
Contributor

@Pharap Could you update the Serial Monitor to v0.8.0? This is the version that should be installed in order to work with Arduino v0.5.0.

@trethaller Same question for you, do you have Serial Monitor v0.8.0 installed? If so, could you confirm what issue is happening? A gif is always helpful if it's hard to explain.

@trethaller
Copy link

@gcampbell-msft thanks for catching the issue, that was indeed fixed by upgrading Serial Monitor to 0.8+, which version didn't appear because it depended on a newer VScode build and I had auto-updates disabled.
Now I experience a different error when uploading through CLI (unknown flag: --build-path) but at least this one issue is now fixed. Thanks.

@Pharap
Copy link

Pharap commented Mar 8, 2023

@gcampbell-msft

I actually primarily use VSCodium to avoid telemetry. The unfortunate trade-off is that it's unable to use Microsoft's extension network, it has to maintain a separate network (to which only some extensions are published) so I tend to put off updating extensions until I really need to.

Hence I had to update/reinstall VSCode before I could update Serial Monitor.

It took quite a while. In addition to the seven extensions that I actually use, VSCode insisted on installing a load of extensions I didn't really want and then had to uninstall (e.g. Learn Markdown, Python, Pylance, Jupyter - I almost never use Python and already know Markdown). After three or four restarts I was finally up-to-date.

Then for good measure I updated VSCodium and copied across the extensions...

Only to discover that Serial Monitor thinks VSCodium is VSCode version 1.68 and says it won't work with anything lower than version 1.74.

I can at least confirm that it works on VSCode, not even a build flag warning. It's just VSCodium that it won't work with yet, so it seems I'll just have to make do without it for now. (Or perhaps roll back a few versions to see if I can get something working.)


Edit: I went into the serial monitor's package.json and told it to accept version 1.68 instead and everything started working.

For some reason it seems to be asking avrdude to be unnecessarily verbose, but that aside it's working.


Edit 2: Spoke too soon, now I get "Error during build: unable to read contents of the source item: open I:<redacted>\output\compile_commands.json: The system cannot find the file specified."

@gcampbell-msft
Copy link
Contributor

gcampbell-msft commented Mar 9, 2023

@Pharap Your most recent issue is posted here at arduino/arduino-cli#1646, so please reference that issue to track the progress.

For your issue related to VS Codium: VS Codium is not officially supported.

Closing this bug in favor of arduino/arduino-cli#1646.

@github-actions github-actions bot removed the needs-more-info More details about this issue are needed for it to be actionable. label Mar 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants