arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.08k stars 353 forks source link

"Built-in" examples fail to open #1586

Closed SuperNinja-4965 closed 1 year ago

SuperNinja-4965 commented 1 year ago

Describe the problem

The Arduino IDE installation includes a collection of "built-in" example sketches that demonstrate fundamental sketch concepts. These are accessed via the "01.Basics" section of the File -> Examples menu.

These "built-in" example sketches fail to open.

The following is shown in the log:

root ERROR Request cloneExample failed with error: Sketch does not exist: [object Object]

I have verified that they do exist.

I have also reset the IDE (and all related folders) to see if that fixes it, it doesn't.

To reproduce

  1. Select File -> Examples -> 01.Basics > Blink from the Arduino IDE menus.

🐛 Nothing at all happens. The "Blink" sketch does not open. No error message is shown in the IDE UI.

Expected behavior

New window should open with example.

Arduino IDE version

2.0.1

Operating system

Linux

Operating system version

Additional context

The bug does not occur when opening library example sketches or normal sketches.

Issue checklist

SuperNinja-4965 commented 1 year ago

Worth mentioning that the error is reproducible inside and outside of flatpak.

maxmbed commented 1 year ago

I am facing this is issue as well with latest version of IDE 2.0 available on Arduino website (appimage). Example cannot be loaded with same error of OP.

per1234 commented 1 year ago

Thanks for the report!

I am able to reproduce it and bisected the introduction of the bug to da22f1ed11826f4a153c8b638f453bc0fc93cb30 / https://github.com/arduino/arduino-ide/pull/1333 (does not occur when using the AppImage built from the previous commit 32b70efd5ca1379bd65ee4fc8f01ee77db2342b0

SuperNinja-4965 commented 1 year ago

@per1234 you changed my report to add the line:

The bug does not occur when using the ZIP package of the IDE.

but this is incorrect. ALL of my testing was done with the zip package. I never tested with the appimage

per1234 commented 1 year ago

Thanks for the correction. For me, opening the "built-in" examples works perfectly when using the ZIP package. However, when using the AppImage package I am able to reproduce the bug.

I am using Ubuntu 20.04

I would suggest that anyone experiencing this bug who is using the AppImage package try the ZIP package as a workaround. Evidently that is not guaranteed to fix it, but it works for me at least.

kittaakos commented 1 year ago

AppImage:

Unpacked:

kittaakos commented 1 year ago

The bug does not occur when using the ZIP package of the IDE.

but this is incorrect. ALL of my testing was done with the zip package. I never tested with the appimage

@joshuag1000, could you please tell us the exact command you executed to start the app zip package? How did you unarchive the ZIP? We found and fixed the problem in #1621, but we could not reproduce the defect with the ZIP version. It only happened with the app image. Thank you!

SuperNinja-4965 commented 1 year ago

The bug does not occur when using the ZIP package of the IDE.

but this is incorrect. ALL of my testing was done with the zip package. I never tested with the appimage

@joshuag1000, could you please tell us the exact command you executed to start the app zip package? How did you unarchive the ZIP? We found and fixed the problem in #1621, but we could not reproduce the defect with the ZIP version. It only happened with the app image. Thank you!

I'm not at my computer right now but I was running the app in a read only environment (the same way the app image does it) so they are probably related by that. I will double check though

SunyataZero commented 1 year ago

Hi all, i'm a complete newbie to Arduino and the IDE, and have just bought the starter kit today, i'm excited about this!

I had the same problem (loading example files) when using the AppImage, but not when running from the extracted .zip file

Just wanted to let you people know. Hope this helps

I am running Ubuntu 22.04

M15071060 commented 1 year ago

I just wanted to add my testing. On popOS 22.04.

Legacy app version from the app store also work as expected, for what that's worth.

SuperNinja-4965 commented 1 year ago

I just wanted to add my testing. On popOS 22.04.

* Using the 2.0.1 AppImage downloaded from the site fails to load example files.
  • Installing 2.0.1 from the app store (flatpak) (pop shop) fails to load example files. - this is because of the read only nature like app images so will most likely be fixed with the same fix as the appimage

    • Running from .zip works as anticipated, correctly loading examples in a new window.

Legacy app version from the app store also work as expected, for what that's worth.

@kittaakos after retesting this is also what i get. I might have gotten confused with my testing last time. sorry for the confusion

Rayl11 commented 1 year ago

Sorry, I'm pretty knew to Linux and Arduino. I'm getting the same error, even with the zip.

I used the guide at https://docs.arduino.cc/software/ide-v1/tutorials/Linux#extract-the-package , but there is no install.sh in the unzipped directory. When I run ./arduino-ide the built-in examples won't load. Am I missing a step?

I unzipped the package to my home folder using 'unzip arduino-ide_2......'

I can open examples from the Aruino Uno but not the built-in examples.

Using Fedora 36 btw

per1234 commented 1 year ago

I'm getting the same error, even with the zip.

Thanks for your report @Rayl11. Please try it again using the nightly build of Arduino IDE and then let us know whether the problem still occurs. The bug fix is in the nightly, so we would expect you can open the examples when using the nightly. The download links for the nightly build are listed here:

https://www.arduino.cc/en/software#nightly-builds

I used the guide at https://docs.arduino.cc/software/ide-v1/tutorials/Linux#extract-the-package , but there is no install.sh in the unzipped directory.

Those are the instructions for Arduino IDE 1.x. You can find the instructions for Arduino IDE 2.x here:

https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing

M15071060 commented 1 year ago

@Rayl11

Sorry, I'm pretty knew to Linux and Arduino. I'm getting the same error, even with the zip.

Never apologize for being new.

I just tested 2.0.1 (not nightly) in a Fedora 36 VM and, once the .zip is expanded, and it ran without issue, including examples. Are you in the unzipped folder when running the ./arduino-ide command? Sorry if that's obvious as well, (I'm new too) but figured I'd try to help out.

Rayl11 commented 1 year ago

@per1234 Wow! Didn't expect such a quick response. When I had commented I had given up for the night. Using the nightly build fixed it! Thanks!

@M15071060 I was inside the unzipped folder, but still no dice. I don't think that would be too obvious to suggest for someone who is new. Thanks for the help :)