ninjadev64 / OpenDeck

OpenDeck is a desktop application that provides Stream Deck-like functionality, implementing the Elgato Stream Deck SDK for cross-compatibility.
https://discord.gg/26Nf8rHvaj
BSD 3-Clause "New" or "Revised" License
84 stars 3 forks source link

TypeError: cannot open device with path /dev/hidraw__ #2

Closed teras closed 8 months ago

teras commented 8 months ago

When I try to launch OpenDeck I get this error:

TypeError: cannot open device with path /dev/hidraw13

Any idea why this is happening?

ninjadev64 commented 8 months ago

Hmm, did you apply the udev subsystem rules? Check out the Installation section in the README for instructions on how to do so.

If you have and it still doesn't work, please do send the whole error trace as this looks like only part of it.

Please also do provide more information, e.g. Linux distro, Stream Deck model, etc :)

teras commented 8 months ago

Yes, permissions are OK, since I am able to use steamdeck-ui running as simple user. Also I am able to use hidapi myself (although I have zero experience on this library)

Linux Arch (rolling release). Steam deck Mini.

libva error: /usr/lib/dri/i965_drv_video.so init failed
(node:656881) UnhandledPromiseRejectionWarning: TypeError: cannot open device with path /dev/hidraw13
    at new HID (/usr/lib/opendeck/resources/app/node_modules/node-hid/nodehid.js:49:17)
    at new NodeHIDDevice (/usr/lib/opendeck/resources/app/node_modules/@elgato-stream-deck/node/dist/device.js:13:23)
    at openStreamDeck (/usr/lib/opendeck/resources/app/node_modules/@elgato-stream-deck/node/dist/index.js:82:20)
    at new ElgatoDevice (/usr/lib/opendeck/resources/app/build/devices.js:110:49)
    at /usr/lib/opendeck/resources/app/build/devices.js:217:104
    at Array.forEach (<anonymous>)
    at new DeviceManager (/usr/lib/opendeck/resources/app/build/devices.js:217:39)
    at Object.<anonymous> (/usr/lib/opendeck/resources/app/build/devices.js:261:25)
    at Module._compile (node:internal/modules/cjs/loader:1141:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1196:10)
(Use `opendeck --trace-warnings ...` to show where the warning was created)
(node:656881) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
ninjadev64 commented 8 months ago

Hmm, that is a rather nondescript error message. Could it be due to the fact that streamdeck-ui is already running and therefore the device is already in use there? Try terminating that first before running OpenDeck.

teras commented 8 months ago

No, when checking your software, steamdeck-ui is not running. Out of curiosity I tried to run your software as root. I did have progress, but it failed for other security reasons (maybe because it shouldn't run as root).

ninjadev64 commented 8 months ago

No, when checking your software, steamdeck-ui is not running.

Out of curiosity I tried to run your software as root. I did have progress, but it failed for other security reasons (maybe because it shouldn't run as root).

That's a good idea - could you try running it with sudo instead of as root?

teras commented 8 months ago

Yes that's what I mean.

I also had to add "--no-sandbox" as well

Command line output -- click here ``` ~ sudo opendeck --trace-warnings --no-sandbox 19:53:04 [771270:1028/195314.327979:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") [771270:1028/195314.328002:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified [771296:1028/195314.401612:ERROR:angle_platform_impl.cc(43)] Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. ERR: Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. [771296:1028/195314.401716:ERROR:gl_display.cc(508)] EGL Driver message (Critical) eglInitialize: Could not open the default X display. [771296:1028/195314.401756:ERROR:gl_display.cc(920)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type Authorization required, but no authorization protocol specified [771296:1028/195314.402076:ERROR:angle_platform_impl.cc(43)] Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. ERR: Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. [771296:1028/195314.402255:ERROR:gl_display.cc(508)] EGL Driver message (Critical) eglInitialize: Could not open the default X display. [771296:1028/195314.402323:ERROR:gl_display.cc(920)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED [771296:1028/195314.402440:ERROR:gl_ozone_egl.cc(23)] GLDisplayEGL::Initialize failed. [771296:1028/195314.405930:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization [771270:1028/195314.663702:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") [771270:1028/195314.674948:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified [771270:1028/195314.694996:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type: Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified [771323:1028/195314.696515:ERROR:angle_platform_impl.cc(43)] Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. ERR: Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. [771323:1028/195314.696626:ERROR:gl_display.cc(508)] EGL Driver message (Critical) eglInitialize: Could not open the default X display. [771323:1028/195314.696715:ERROR:gl_display.cc(920)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type Authorization required, but no authorization protocol specified [771323:1028/195314.696874:ERROR:angle_platform_impl.cc(43)] Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. ERR: Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. [771323:1028/195314.696898:ERROR:gl_display.cc(508)] EGL Driver message (Critical) eglInitialize: Could not open the default X display. [771323:1028/195314.696923:ERROR:gl_display.cc(920)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED [771323:1028/195314.696941:ERROR:gl_ozone_egl.cc(23)] GLDisplayEGL::Initialize failed. [771323:1028/195314.697834:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified [771337:1028/195314.709139:ERROR:angle_platform_impl.cc(43)] Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. ERR: Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. [771337:1028/195314.709179:ERROR:gl_display.cc(508)] EGL Driver message (Critical) eglInitialize: Could not open the default X display. [771337:1028/195314.709196:ERROR:gl_display.cc(920)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type Authorization required, but no authorization protocol specified [771337:1028/195314.709236:ERROR:angle_platform_impl.cc(43)] Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. ERR: Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. [771337:1028/195314.709249:ERROR:gl_display.cc(508)] EGL Driver message (Critical) eglInitialize: Could not open the default X display. [771337:1028/195314.709262:ERROR:gl_display.cc(920)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED [771337:1028/195314.709273:ERROR:gl_ozone_egl.cc(23)] GLDisplayEGL::Initialize failed. [771337:1028/195314.710008:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified [771346:1028/195314.716864:ERROR:angle_platform_impl.cc(43)] Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. ERR: Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. [771346:1028/195314.716892:ERROR:gl_display.cc(508)] EGL Driver message (Critical) eglInitialize: Could not open the default X display. [771346:1028/195314.716903:ERROR:gl_display.cc(920)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type Authorization required, but no authorization protocol specified [771346:1028/195314.716941:ERROR:angle_platform_impl.cc(43)] Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. ERR: Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Could not open the default X display. [771346:1028/195314.716953:ERROR:gl_display.cc(508)] EGL Driver message (Critical) eglInitialize: Could not open the default X display. [771346:1028/195314.716965:ERROR:gl_display.cc(920)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED [771346:1028/195314.716976:ERROR:gl_ozone_egl.cc(23)] GLDisplayEGL::Initialize failed. [771346:1028/195314.717625:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified [771353:1028/195314.723761:ERROR:angle_platform_impl.cc(43)] DisplayVkXcb.cpp:59 (initialize): xcb_connect() failed, error 1 ERR: DisplayVkXcb.cpp:59 (initialize): xcb_connect() failed, error 1 [771353:1028/195314.723791:ERROR:angle_platform_impl.cc(43)] Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Not initialized. ERR: Display.cpp:1004 (initialize): ANGLE Display::initialize error 12289: Not initialized. [771353:1028/195314.723808:ERROR:gl_display.cc(508)] EGL Driver message (Critical) eglInitialize: Not initialized. [771353:1028/195314.723823:ERROR:gl_display.cc(920)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED [771353:1028/195314.723839:ERROR:gl_ozone_egl.cc(23)] GLDisplayEGL::Initialize failed. [771353:1028/195314.724516:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization Authorization required, but no authorization protocol specified Authorization required, but no authorization protocol specified [771360:1028/195314.727455:ERROR:gpu_init.cc(523)] Passthrough is not supported, GL is disabled, ANGLE is [771360:1028/195314.729027:ERROR:x11_software_bitmap_presenter.cc(142)] XGetWindowAttributes failed for window 96468995 ```
ninjadev64 commented 8 months ago

Strange - I'll have a look tomorrow

ninjadev64 commented 8 months ago

Make sure you've:

If it still doesn't work, try sudo chmod 666 /dev/hidraw13 while neither OpenDeck nor streamdeck-ui are running and then trying again. If this works, it means that the udev rules are not setup correctly.

This is an issue someone else on the Discord server experienced a while ago, but they got busy and we never solved it. It's also an identical issue to @node-hid/node-hid#454.

teras commented 8 months ago

The rules don't apply, I don't know why. I've manually changed the mode to 666 and at least the application runs.

There are some usability issues, but that's irrelevant with the original bug.

ninjadev64 commented 8 months ago

Alright, progress. Could you describe your rules setup in detail (e.g. path and filename of the rules file, lsusb output, etc)? Additionally, what are the usability issues you're experiencing with the software?

teras commented 8 months ago

Today it's working !?

After running as root I didn't run it again, and opened it again today. Maybe it created some files as root owner and now it works? I don't know.

I'd consider case closed :) I have no idea how to use it, but it seems to work now

ninjadev64 commented 8 months ago

Awesome! Make sure to leave a star on the repo :)