Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't access camera(s) #3477

Closed
xxxserxxx opened this issue Dec 9, 2023 · 2 comments
Closed

Can't access camera(s) #3477

xxxserxxx opened this issue Dec 9, 2023 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@xxxserxxx
Copy link

Cameras are not found for any device on which I run the UI.

I'm running zwavejs in a container (docker.io/zwavejs/zwave-js-ui:latest) on a remote (LAN) server. I'm accessing the UI directly via exposing port 8091; SSL is disabled. I've tried Firefox and luakit (WebKit) on a Linux laptop, and Firefox on an Android phone. In all cases, no camera is found, and the JS console reports:

[QrReader] Error: No available camera found
    initialize http://media.lan:8091/assets/QrReader-bfce9e2b.js:1
[index-822e6be1.js:59:1869](http://media.lan:8091/assets/index-822e6be1.js)
    d http://media.lan:8091/assets/index-822e6be1.js:59
    createDefaultHandler http://media.lan:8091/assets/index-822e6be1.js:59
    invoke http://media.lan:8091/assets/index-822e6be1.js:59
    error http://media.lan:8091/assets/index-822e6be1.js:59
    initialize http://media.lan:8091/assets/QrReader-bfce9e2b.js:1

I do not get a camera access pop-up from Firefox, and there is no rule denying access to the site in the prefs. The camera is available to other web apps (e.g. meet.jit.si).

I'm certain this is user error in how I'm running the container, or something; I'm at a loss on how to proceed. I've found no tickets that seem similar, and web search engines turn up no results.

If I port forward over ssh and access the web page through the forward, it does work; on my phone (with termux):

ssh -L 8091:localhost:8091

and then access http://localhost:8091 on my phone, the camera is found and I can scan QR codes. It's only accessed remotely that fails. The only thing I can think of is a firewall interference; port 8091 is open, and for good measure I tried opening the API port (3030, mapped to port 3000 in the container), but exposing the API port didn't help.

Any ideas?

@xxxserxxx xxxserxxx added the question Further information is requested label Dec 9, 2023
@kpine
Copy link
Contributor

kpine commented Dec 9, 2023

Web browsers require HTTPS to use cameras. Firefox allows access via localhost. Here's a blog post from 2019 mentioning it.

@xxxserxxx
Copy link
Author

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants