korapp / plasma-homeassistant

Add Home Assistant to your plasma desktop
GNU General Public License v3.0
57 stars 4 forks source link

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

Closed CleanShirtUK closed 5 months ago

CleanShirtUK commented 8 months ago

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.

korapp commented 8 months ago

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

CleanShirtUK commented 8 months ago

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?

korapp commented 8 months ago

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.

NWAF-NAN00K commented 8 months ago

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".

github-actions[bot] commented 7 months ago

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

D3SOX commented 6 months ago

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

korapp commented 6 months ago

Can you see HomeAssistant entry in kwalletmanager?

github-actions[bot] commented 5 months ago

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

github-actions[bot] commented 5 months ago

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