plasma-homeassistant icon indicating copy to clipboard operation
plasma-homeassistant copied to clipboard

QWebSocketPrivate::processHandshake: Unhandled http status code: 404 (Not Found).

Open CleanShirtUK opened this issue 1 year ago • 8 comments

Describe the bug After installation, I created a token on my HA instance and input the details. When attempting to load, I get a spinning cog on the 'items' menu and nothing loads, as well as the following error on a banner: QWebSocketPrivate::processHandshake: Unhandled http status code: 404 (Not Found).

To Reproduce Steps to reproduce the behavior:

  1. Install the plasmoid through 'Get new plugins'
  2. input the required information

Expected behavior The plasmoid to get information from my HA instance

Desktop (please complete the following information): Operating System: Arch Linux KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.114.0 Qt Version: 5.15.12 Kernel Version: 6.7.0-zen3-1-zen (64-bit) Graphics Platform: Wayland

Additional context I'm sure I'm missing something painfully obvious. I can access HA by posting the same URL in a browser without issue.

CleanShirtUK avatar Jan 22 '24 20:01 CleanShirtUK

Does visiting [your_ha_ur]/api/ also return a 404? (Trailing slash is important)

korapp avatar Jan 23 '24 09:01 korapp

Visiting http://[SERVER-IP]:8123/api/ results in 401: Unauthorized... So I'm assuming that means I'm barking up the wrong tree right, and something in my HA setup?

CleanShirtUK avatar Jan 23 '24 10:01 CleanShirtUK

401 in this case is expected because no token was passed. The step was to make sure the API is reachable.

Is it possible that you don't have a default_config: or at least frontend: entry in the server configuration? In most instances, the default_config component is enabled which indirectly provides the WebSocket API (dependency chain: default_config > frontend > websocket_api) but maybe you have a more custom configuration.

korapp avatar Jan 23 '24 10:01 korapp

I was getting the same error when I used the url of homeassistant with a trailing slash at the end, ie http://homeassistant.local:8123/. With traling slash You can see wrong profile url in applet config: http://homeassistant:8123//profile. Without the trailing slash, the applet connected to homeassistant without errors. However, I also created a special - non admin user for the plasma applet.

However, the applet behaves strangely when entering the url. When the traling slash is deleted from existing url, the apply button not became active. The applet does not take this as a "change".

NWAF-NAN00K avatar Feb 03 '24 23:02 NWAF-NAN00K

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Mar 08 '24 00:03 github-actions[bot]

I think I have the same issue

Is it possible that you don't have a default_config: or at least frontend: entry in the server configuration?

I don't think so

image

Homeassistant logs says:

WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from xxx.xxx.xxx.xxx. Requested URL: '/api/websocket'. (None)

I can connect via Insomnium image

D3SOX avatar Mar 16 '24 14:03 D3SOX

Can you see HomeAssistant entry in kwalletmanager?

korapp avatar Mar 18 '24 22:03 korapp

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Apr 22 '24 00:04 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 08 '24 00:05 github-actions[bot]