-
-
Notifications
You must be signed in to change notification settings - Fork 71
Compiling for Mega2560: "TypeError: Cannot read property 'length' of undefined" #374
Comments
I tried to just verify against the Arduino Mega or Mega 2560 board with the 1.8.3 avr core, and it worked on macOS. I did not do upload because I do not have such a board. Please help us to narrow down the issue: |
I don't see any errors appear in the Dev Tools when I press the verify button, but there is a relevant error when I change the board and select the Mega: As already stated, I don't see anything obvious in the server log (what I meant by "trace level logging"). |
It is hard to say why, but somehow, your local storage got corrupted for the Arduino Mega or Mega 2560 board 😕 Can you please try to remove the invalid entry?
Thanks! |
That has indeed fixed the issue, thanks. So just playing around a little:
|
Brilliant. Thank you so much for the steps. I try to do something with this issue, but honestly, I think it's a problem with the core: arduino/arduino-cli#620 This is how it works in the new IDE:
Or maybe, we should unselect the board, so at least with this behavior, we would force users to pick the board instead of corrupting the boards data store. Do you have any other suggestions on how to handle this, @ubidefeo, @per1234? Thanks! |
I figured out how to solve this; it requires a bigger change, but it should be doable. |
Not sure if it is related but I get the same error when trying to upload to a Nano. Previously there were no issues and both compile and upload were working fine. The only thing that I think was changed was in the regular Arduino IDE. I updated boards and libraries (it has been some time since I used the 'old' IDE). After updating I was unable to upload a sketch in the Pro IDE. Maybe this is just a coincidence, IIRC the libraries are shared. I thought I would comment in case it is relevant. Also. Issuing the |
@DeeEmm +1. I got the same problem using |
I am ready with a preview. This is the logically correct way how the IDE should handle board name conflicts. The UX might be strange, though. What do you think, @ubidefeo? Since the board names can change, the new IDE should handle this gracefully. Originally posted by @per1234 here:
How it works (UX):
How it works (technical):
For the future:
|
@kittaakos |
@ubidefeo I love it. It's the perfect combination of taking advantage of the information provided by the package index, but not imposing the unreasonable expectation for it to match the information in boards.txt. Great work coming up with this solution @kittaakos! |
this should not be an issue anymore, right? |
Correct. |
Testing using nightly build arduino-pro-ide_nightly-20201022_Linux_64bit, on Linux 5.8.15-201.fc32.x86_64 with Xfce4.
Arduino AVR Boards 1.8.3
Compiling sketch for Arduino Micro and Uno proceeds as normal.
Compiling sketch for Mega2560 fails before it starts with the following pop-up tooltip:
Doesn't matter whether actual hardware attached or not. Nothing at all output to Problems or Output areas. Nothing apparently related in the trace level logging.
To reproduce: open IDE with a sketch, select Mega2560 board for build, click verify button.
The text was updated successfully, but these errors were encountered: