octo4a icon indicating copy to clipboard operation
octo4a copied to clipboard

Error while scanning for serial ports: "Permission denied: '/dev'"

Open Kaassouffleetje opened this issue 2 years ago • 14 comments

I have setup Octo4a on an old Samsung, running LineageOS 18.1 (A11), rooted, without GApps. Everything went well, the app recognizes the printer and it asks for serial permissions. Even though I gave these permissions, when I go to the web interface it says that no serial ports have been found. I found the following error in the logs:

🐙 Traceback (most recent call last):
🐙   File "/usr/lib/python3.10/site-packages/octoprint/util/comm.py", line 202, in serialList
🐙     with os.scandir("/dev") as it:
🐙 PermissionError: [Errno 13] Permission denied: '/dev'``

Kaassouffleetje avatar Feb 07 '23 20:02 Kaassouffleetje

I'm having the same issue. OnePlus 7 Pro.

Mr-Savag3 avatar Mar 04 '23 07:03 Mr-Savag3

I've installed Octo4a on my android smartphone (Xiaomi MI A3) and run it as OctoPi. I can access it from my laptop and install Plugins etc., but it cannot connect the printer (Flsun Q5) via my phone. I get always 'no serial port found' so I suspect there is no, or bad, connection to the actual port from the printer.

I use the original cable that comes with the printer. It seems to work as I connected the cable directly to the laptop and the printer can be managed through the laptop via Repetier.

Whwre is the issue? Screenshot_2023-04-09-18-31-20-875_com google android apps photos

Screenshot_2023-04-09-18-31-25-991_com google android apps photos

fritzbaratto avatar Apr 09 '23 16:04 fritzbaratto

Screenshot_2023-04-09-19-36-01-006_com whatsapp

fritzbaratto avatar Apr 09 '23 17:04 fritzbaratto

Screenshot_2023-04-09-19-36-01-006_com whatsapp

fritzbaratto avatar Apr 10 '23 06:04 fritzbaratto

Screenshots from the app and the laptop

fritzbaratto avatar Apr 10 '23 07:04 fritzbaratto

i am also getting the same error on my B131DL phone... but some other user got it to work.. not sure how..

protocold avatar Jun 04 '23 08:06 protocold

Same here on android nougat NVidia shield tablet. The app does not have permission to open devices. On a separate note, I was only able to install octo4a after rooting the device and troubleshooting a million things about the install. It is very raw. UPDATE: I managed to fix this by simply chmod 666 /dev/ttyS? My device is rooted therefore I am not sure whether this will work in non-rooted ones

Drzet avatar Jun 04 '23 21:06 Drzet

My old phone was not rooted and @Drzet's command did not work for me. But connecting to the printer works and when connected it stops trying to scan dev so it stops spamming the log.

SvDvorak avatar Jul 13 '23 18:07 SvDvorak

Also happens on both my Android phones, Motorola 5GS and Huawai P30 Pro. But at least on Motorola, octoprint server works fine, except it drains so much battery that charging via OTG can't keep up. This may not be caused by this permission denied issue though.

n808 avatar Jul 27 '23 06:07 n808

The same here...

WMSDevelop avatar Oct 01 '23 21:10 WMSDevelop

Working for me after configuring SELinux to permissive mode.

See my comment on issue 439

mattmon avatar Dec 08 '23 20:12 mattmon

same here, is possible to solve it and run on a non-rooted device?

manudevelopia avatar Jan 04 '24 17:01 manudevelopia

Having the same problem on not rooted Sony Xperia Compact X.

kardashov avatar Apr 19 '24 14:04 kardashov

Same issue on Motorola One 5G ace, running version 1.2.6

bhellema avatar Apr 28 '24 00:04 bhellema

Hi, this message is mostly harmless - octo4a's serial driver will still be functional, as its hardcoded to use /dev/ttyOcto4a as a serial port. The log is displayed when OctoPrint tries to scan /dev/ serial ports periodically, which is not functional - nor necessary. Octo4a 2.0.0 suppresses this error by default, by disabling "autorefresh" in OctoPrint's serial settings.

feelfreelinux avatar May 17 '24 23:05 feelfreelinux