Arduino IDE V2 can't see most Linux folders

I recently installed Arduino IDE Version 2.0.0-rc9 in Manjaro Linux, and I immediately noticed a major problem: it can only see about half of the subdirectories of my root directory, and cannot see the one that contains my Arduino sketchbook.

Here is what the Arduino IDE V1 vs V2 "File/Open" dialogs see:

Note that many directories are missing, including "/d/Industrial-Park/Arduino" where my sketchbook is. So, how can this be resolved?

Does the IDE talk to the port/USB/Arduino? (this would be a dialout usermod issue - not sure if dialout privs also sees the "missing" folders)

If by "talk to" you mean "upload sketches to", yes, my IDE V2 successfully compiled a test sketch and successfully uploaded it to a board (a "Doit ESP32 Devkit V1", not an Arduino).

But even if it hadn't been able to do those those things, those are separate issues, no? The problem isn't compiling or uploading (those work fine); the problem is, my installation of IDE V2 can't see or access-the-contents-of any directories other than those on the right side of the image I uploaded.

For instance, if I do some field work on my notebook, then come home and dock it to my network, then get on my desktop PC running in Linux mode (it's a Linux/Windows dual-booter), the notebook's C:, D:, and E: drives show up in Linux as folders /n, /o, /p (via SMB4). But, IDE V2 can't see those directories, so "/p/Industrial-Park/Arduino" is invisible. Nor can it see "/d" or "/e", so it can't see most of the data on my PC. Including my Arduino sketchbook.

I've have to say that Arduino IDE V2 not being able to see my existing Arduino sketchbook is a real show-stopper. If a fix can't be found, I can't use this product. I'll have to revert to MSVS-Code + Platformio or some such. I'd rather use Arduino; but until a fix or workaround for this bug can be found, I can't.

Yes, I should have written "upload sketches"

Linux comm ports are part of the file system... which can allow or denied access. The USB ports are located in /dev/bus/usb/ and their connected devices can be identified using $lsusb

I will guess the PC directories are mounted read-only or even hidden. Way back in my Win* days, when I mounted a windows drive, it mounted as read-only until I gave it the ol' mount -o (or -rw), chown and chmod as admin or su. I have not kept up with how to break into secure windows file systems freely run Linux on an existing operating system, so I can not add more (my memory fades).

I have a normal installed system (based on Ubuntu), with all the user files under the 'home' folder and the new 2.0.0-rc9 sees every folder in the root.

Re "Linux comm ports are part of the file system... which can allow or denied access": Mostly no. That's not really how Linux does access control, no. Access control is usually done at the level of files and directories being accessed, not at the level of the access protocol (SATA or USB or SMB4 or whatever).

Re "The USB ports are located in /dev/bus/usb/ and their connected devices can be identified using $lsusb": None of the missing directories use USB; they're all either SATA (for local devices) or SMB4 (for mapped network drives). The associated devices are in "/dev/sdxx" directories, not "/dev/bus":

%lsblk -o NAME,TYPE,PATH,MODE,FSTYPE,FSSIZE,MOUNTPOINT
NAME TYPE PATH MODE FSTYPE FSSIZE MOUNTPOINT
sda disk /dev/sda brw-rw----
├─sda1 part /dev/sda1 brw-rw---- vfat 512M /boot/efi
├─sda2 part /dev/sda2 brw-rw---- swap [SWAP]
├─sda3 part /dev/sda3 brw-rw---- ext4 121.5G /
├─sda4 part /dev/sda4 brw-rw---- ext4 52.6G /home
├─sda5 part /dev/sda5 brw-rw---- vfat
└─sda6 part /dev/sda6 brw-rw---- ntfs 278.9G /c
sdb disk /dev/sdb brw-rw----
├─sdb1 part /dev/sdb1 brw-rw---- ntfs 300G /d
└─sdb2 part /dev/sdb2 brw-rw---- ntfs 631.5G /e
sdc disk /dev/sdc brw-rw----
└─sdc1 part /dev/sdc1 brw-rw---- ntfs
sdd disk /dev/sdd brw-rw----
sr0 rom /dev/sr0 brw-rw----

Re "I will guess the PC directories are mounted read-only or even hidden": The missing directories are accessible by every other program on my system, including Arduino IDE V1 (as you can see in the image I included); it's only Arduino IDE V2 that can't see them.

And there does not appear to be any correlation between directory-level permissions and IDE V2's inclusion/exclusion either:

%ll
total 352
drwxr-xr-x 30 root root 4096 2022-07-10 14:44 ./
drwxr-xr-x 30 root root 4096 2022-07-10 14:44 ../
lrwxrwxrwx 1 root root 7 2022-06-09 00:53 bin -> usr/bin/
drwxr-xr-x 5 root root 4096 2022-07-18 17:27 boot/
drwxrwxrwx 1 root root 8192 2022-07-22 22:24 c/
drwxr-xr-x 4 root root 4096 2022-04-04 13:12 .config/
drwxrwxrwx 1 root root 12288 2022-07-22 22:24 d/
drwxr-xr-x 20 root root 4240 2022-07-27 11:36 dev/
drwxrwxrwx 1 root root 8192 2022-07-22 22:24 e/
drwxr-xr-x 145 root root 12288 2022-07-26 16:25 etc/
drwxr-xr-x 2 root root 4096 2022-03-27 14:23 f/
drwxrwxrwx 2 root root 4096 2022-01-29 09:18 g/
drwxrwxrwx 2 root root 4096 2022-01-29 09:18 h/
drwxr-xr-x 4 root root 4096 2022-01-28 04:19 home/
lrwxrwxrwx 1 root root 7 2022-06-09 00:53 lib -> usr/lib/
lrwxrwxrwx 1 root root 7 2022-06-09 00:53 lib64 -> usr/lib/
drwx------ 2 root root 16384 2022-01-27 11:44 lost+found/
drwxr-xr-x 5 root root 4096 2022-02-04 02:47 media/
drwxr-xr-x 2 root root 4096 2022-07-10 14:42 Mike/
drwxr-xr-x 2 root root 4096 2022-07-10 14:44 Mike-Card/
drwxr-xr-x 6 root root 4096 2022-04-19 17:51 mnt/
drwxr-xr-x 2 aragorn root 8192 2022-07-21 17:15 n/
drwxr-xr-x 2 aragorn root 8192 2022-07-22 22:24 o/
drwxr-xr-x 6 root root 4096 2022-07-02 00:53 opt/
drwxr-xr-x 2 aragorn root 4096 2022-07-22 22:24 p/
dr-xr-xr-x 340 root root 0 2022-07-26 16:23 proc/
drwxr-x--- 17 root root 4096 2022-07-04 16:08 root/
drwxr-xr-x 33 root root 880 2022-07-26 16:24 run/
lrwxrwxrwx 1 root root 7 2022-06-09 00:53 sbin -> usr/bin/
drwxr-xr-x 5 root root 4096 2022-02-06 18:10 srv/
dr-xr-xr-x 13 root root 0 2022-07-26 16:23 sys/
drwxrwxrwt 18 root root 440 2022-07-27 13:27 tmp/
drwxr-xr-x 11 root root 4096 2022-07-26 16:25 usr/
drwxr-xr-x 12 root root 4096 2022-07-23 04:27 var/
-rw-r--r-- 1 root root 19449 2021-09-07 09:35 desktopfs-pkgs.txt
-rw-r--r-- 1 root root 8 2021-09-07 09:35 .manjaro-tools
-rw-r--r-- 1 root root 4952 2021-09-07 09:29 rootfs-pkgs.txt

Indeed, IDE V2 can see some directories it should never access (such as "/dev" and "/proc"), and some directories which don't even exist (such as "/bin" and "/sbin", which, on my system, are both just links to "/usr/bin"), whereas it can not see folders which it needs to access (such as "/d" and "/e"). It's almost as if whoever programmed IDE V2 used a stock list of "typical folders which one might see in a Linux root directory" rather than looking at what's actually there.

The /boot does not show in your screendump and your /boot is the same as my /boot and I can see it with the 2.0.0-rc9.

So there is indeed a difference that goes further than just the added folders.
Did you copy it over a older version ?
Do you have Java installed that could cause a conflict ?
Did you download the AppImage ?

I have downloaded the zip-file, did not install something and just run the arduino-ide.
With a AppImage I sometimes have to feeling of going back in time a few years.

Re "I have a normal installed system (based on Ubuntu)": I think that when testing beta software, one should make one's system as abnormal as possible, purposely testing edge cases, lest one fall prey to survivorship bias.

Re "with all the user files under the 'home' folder": If one is a corporate employee with limited permissions sharing a Linux mainframe with hundreds of fellow employees, I can see the point of that. Otherwise, not so much.

In my case, my Linux system is for my own use only, so I violate a lot of guidelines which corporate sysadmins would enforce. I have files in many directories, mostly single-letter subfolders of "/", and I purposely keep most files out of "/home", because I have multiple TB of files, where my system's "/home" partition is only 100GB. All of the single-letter folders in "/" are mounted to various 1TB and 2TB devices, both local and network, with the dir letter corresponding to the Windows drive letter.

Re "the new 2.0.0-rc9 sees every folder in the root [on my system]": If you mount some devices to subfolders of "/" and compare between IDE V1 and IDE V2, and I think you'll find different. [Addendum, later: and, I'm guessing you'll see a difference between 2.0.0.rc9 and 2.0.0-rc9-1, as the former has the bug whereas the latter appears not to.]

Well, my "/boot" itself isn't actually a mountpoint for anything, it's just a subdir of "/". Now, "/" is, of course, a mountpoint (for "/dev/sda3"). And "/boot/efi" is another mountpoint (for "/dev/sda1").

It is odd that "/boot" shows up in IDE V1 but not IDE V2, yes. For that matter, it occurs to me that the only directories specifically mentioned in "/etc/fstab" that IDE V2 can see are "/" and "/tmp". All the single-letter directories (c,d,e,f,g,h,n,o,p), V2 ignores. (I use those because it vastly simplifies a dual-boot Linux/Windows system: C: = /c, D: = /d, E: = /e, etc.)

Re "copy it over": I have IDE V1 and IDE V2 installed side-by-side. V1 works (though for Arduino only, not ESP32). V2 can compile and upload sketches to ESP32 boards, but has this weird "can't see half the folders" bug. But that does bring up a question of whether V1 is interfering with V2. Lemme try uninstalling both then installing V2 only.... Nope, didn't help; problem persists.

Re "Java": Yep, my Linux does have Java installed (necessary for LibreOffice, Glade, and other programs that use Java). But it doesn't interfere with anything; all apps (including Ard. IDE V1, but not V2) work fine in spite of (or because of) Java.

Re "Appimage", doesn't ring a bell, but when I search Pamac for "Appimage" it refers me to "Discover", which is installed, but I never use. Let me uninstall that... Nope, didn't help; problem persists.

Hmmm... I'm wondering if the fact that I'm using the "flatpak" version of V2 is relevant? Lemme try uninstalling that and installing the AUR version instead. (I'd use a "repository" version, but Manjaro's Pamac doesn't list one, just flatpak or AUR.). Ok, trying that... uninstalled ALL Arduino-related programs, restarted, installed "arduino-ide-beta-bin", revision "2.0.0.rc9-1", via AUR... restarted system again... AH-HA, THIS version can see all the folders! Gives some "library already installed" errors on first run, due to arduino-related stuff in my ~ folder which I didn't delete. Also gives "grpc: error while marshaling: proto: Marshal called with nil" error, but I see why: no "board" or "port" is set. OK, set those, and now it compiles and uploads my test sketch (from a file on drive "/o", which is actually on another computer. Let's check serial monitor... yep, the sketch is working (the ESP32 board is chattering lines of poetry back to the Arduino IDE's serial monitor).

So, that's fixed. As for the cause... either Arduino IDE V2 doesn't like "flatpak", or there's been an update in 2.0.0.rc9-1 which fixes a bug in 2.0.0-rc9. I'm guessing the latter, as I'm not seeing how flatpak could have anything to do with it.

Ok, I figured it out! It was "flatpak" that was causing the problem. My Arduino IDE V1 was via "repository", V2 was via "flatpak".

When I uninstalled V1, then re-installed the flatpak version of V1, both V1 and V2 then had the "half the folders are missing" bug.

But when I uninstalled both, then installed the "repository" version of V1 and the "AUR" version of V2, Arduino IDE versions V1 and V2 can now both see all subdirectories of "/".

Lesson learned: Arduino and Flatpak don't get along, so all Arduino software should be installed by repository, AUR, or download-and-manually-build, not via Flatpak.

1 Like

Where did you download a flatpack from ?

I don't use the repository, I use the newest version from the download page: https://www.arduino.cc/en/software

The AppImage is on the download page of Arduino and is a official download:

2 Likes

On my Linux computer, by default I use the Manjaro Linux repositories and Manjaro's "Pamac" package manager to download and install all software, as I get automatic updating that way. Their repositories include "normal", "extra", "community", "flatpak", and "AUR" (Arch User Repository). Normally my preference is in that order, as AURs are generally source code and require compiling and linking, which can take hours for a large program, and often fails due to dependency issues.

Flatpak distributions have the advantages of very fast install (5 seconds) and auto-updating via the Flatpak program (which is both a virtual machine and a package manager). Flatpak programs aren't ran directly, but as plugins to the Flatpak program. A typical command line for a launcher icon might read something like "flatpak run /mypath/myprogram".

But Arduino doesn't work well with Flatpak, probably because it's running through the flatpak program instead of directly. One of the things that gets "lost in translation" is access to directories; some go missing.

So I got rid of any Arduino-related flatpak programs. My IDE V1 is now from a regular repository, and my IDE V2 is from AUR; both work fine.

(I could download and install the IDEs manually, but I prefer the automation of installations and updates offered by Pamac, and I only use the "manual" approach if no other option is feasible.)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.