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

Cannot read properties of undefined (reading 'importKey') #1912

Closed
011V32 opened this issue Nov 14, 2024 · 5 comments
Closed

Cannot read properties of undefined (reading 'importKey') #1912

011V32 opened this issue Nov 14, 2024 · 5 comments

Comments

@011V32
Copy link

011V32 commented Nov 14, 2024

Describe the bug
I use the HA Add-On, which changed from version 1.3.0 to 1.5.0.
After the change, I can no longer establish a connection and get an dialog and afterwards the following error.

Error message

Ein Fehler ist aufgetreten:

Cannot read properties of undefined (reading 'importKey')
TypeError: Cannot read properties of undefined (reading 'importKey')
at AESECBCipher._importKey (http://homeassistant.local:8123/api/hassio_ingress/ESchz347LQg8DJKlC152P9l-Qk_1kL372Wbw_kcDr8w/core/crypto/aes.js:17:48)
at AESECBCipher.importKey (http://homeassistant.local:8123/api/hassio_ingress/ESchz347LQg8DJKlC152P9l-Qk_1kL372Wbw_kcDr8w/core/crypto/aes.js:12:22)
at LegacyCrypto.importKey (http://homeassistant.local:8123/api/hassio_ingress/ESchz347LQg8DJKlC152P9l-Qk_1kL372Wbw_kcDr8w/core/crypto/crypto.js:50:20)
at RFB._negotiateARDAuthAsync (http://homeassistant.local:8123/api/hassio_ingress/ESchz347LQg8DJKlC152P9l-Qk_1kL372Wbw_kcDr8w/core/rfb.js:1737:43)

To Reproduce
Changed version 1.3.0 to 1.5.0 without any additional configuration changes.
Connect to my Mac with screen sharing (not ARD) activated.

Expected behavior
Normally, the connection was successfully connected with the password only.
(Previously, no additional dialog appeared at all)

Screenshots
image
image

Client

  • OS: Windows 11 / Mac 15.1
  • Browser: Edge / Safari
  • Browser version: 129.0.2792.89 / latest

Server

  • noVNC version: 1.5.0
  • VNC server: HomeAssistant VNC-Viewer from Poeschl
  • WebSocket proxy: websockify

Additional context
Add any other context about the problem here.

@CendioOssman
Copy link
Member

Modern web features unfortunately do not work without TLS enabled. So you need to set up your noVNC web server to support https. If you are using websockify, then there are some suggestions here:

https://github.com/novnc/websockify/wiki/Encrypted-Connections

@CendioOssman CendioOssman closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2024
@011V32
Copy link
Author

011V32 commented Nov 26, 2024

@CendioOssman Thx for your reply.
But why it worked with V1.3.0 and no longer with v1.5.0?
Has there been a change that requires the new TLS features in the v1.5.0, or can we switch to the old features?
(I couldn't find any informations in the release notes.)

@CendioOssman
Copy link
Member

The reason is that noVNC now supports the more advanced authentication methods of ARD. That's also why you got a user entry now.

I'm afraid we don't have any settings to control the authentication used.

@011V32
Copy link
Author

011V32 commented Nov 27, 2024

However, I only have screen sharing activated on my Mac and not ARD.
You don't need a user name for screen sharing... Is there possibly a mistake here?
In any case, thank you for taking the time.

@CendioOssman
Copy link
Member

Those are part of the same thing. I think Apple just calls the client and server portion different things.

noVNC will prefer the username method, even if it is optional. On some systems you get more restricted access without the username.

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

No branches or pull requests

2 participants