hassio-addons / addon-log-viewer

Log Viewer - Home Assistant Community Add-ons
https://addons.community
MIT License
69 stars 7 forks source link

Disconnected/Retry Loop using any browser on a Mac #8

Closed plumbington closed 5 years ago

plumbington commented 5 years ago

I installed v3.0 of Log Viewer on Hass v0.80.3. The install seemed to go without issue, and I can connect to the defined port using any current browser (Safari/Firefox/Chrome). However in all cases, I get a 'Disconnected" then a “Retry in 3s…” count down before looping back to “Disconnected” and “Retry” again. Restarting either the Log Viewer, or Home Assistant produces the same.

Any thoughts as to what I might be doing wrong, or how to debug the problem?

addons-assistant[bot] commented 5 years ago

:wave: Thanks for opening your first issue here! If you're reporting a :bug: bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be usefull.

digitalyours commented 5 years ago

I'm seeing the exact same behavior on my newly flashed RPi3 (32bit image).

dale3h commented 5 years ago

@plumbington @digitalyours Could you please check the developer console to see if there are any errors? Also, which macOS version and browser versions are you guys using?

plumbington commented 5 years ago

Since my original report, I have updated to HA 0.81.0. AFAIK, there has been no change to Supervisor, nor HassOS, but I know that there are updates to all 3. I've also moved on to Mojave (macOS 10.14.2 Beta) and Safari 12.0.2. I was using High Sierra (10.13.6) and Safari 12.0.1. I also tested with Chrome 70.0.3538.77 and Firefox 63.0. I don't believe that the latter 2 have changed since.

I re-installed Log Viewer 0.3.0, and confirm that the connected/disconnected/re-connecting behaviour is still occurring in Safari. If, by developer console, you mean the panel at http://hassio.local:8123/dev-info, then there is nothing there regarding LogViewer.

The LogViewer Log doesn't show anything out of the ordinary when the looping occurs. Here is everything displayed currently.

-----------------------------------------------------------
 Hass.io Add-on: Log Viewer v0.3.0
 Browser-based log utility for Hass.io
 From: Community Hass.io Add-ons
 By: Franck Nijhof <frenck@addons.community>
-----------------------------------------------------------
 armhf / HassOS 1.12 / HA 0.81.0 / SU 139 / stable
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
INFO: Password is NOT in the Have I Been Pwned database! Nice!
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2018-11-08T21:19:48.619Z logview:debug start tailing /config/home-assistant.log
2018-11-08T21:19:48.778Z logview:info listening on port 4277 (HTTP)
2018-11-08T21:20:41.847Z logview:info client connected from ::ffff:192.168.2.98
2018-11-08T21:20:42.157Z logview:info client connected from ::ffff:192.168.2.98
2018-11-08T21:45:50.537Z logview:info client connected from ::ffff:192.168.2.98
2018-11-08T21:46:04.921Z logview:info client connected from ::ffff:192.168.2.98

I should also mention that, originally, I had experienced the connected/disconnected/re-connecting behaviour on Chrome and Firefox browsers. However after the HA 0.81.0 update these browsers connect, and seem to stay connected, but they don't display anything at all. The entire window is black and empty, except for the blue 'command' bar at the bottom. The Connect/Disconnect button at the lower right seems to work, in that clicking on either button changes the state displayed at the lower left. Note that the 4 connections at the bottom of the log above are me testing with Chrome and Firefox (see below).

Hope this helps...

plumbington commented 5 years ago

DOH - I clicked the wrong button - so, I'm re-opening this issue.

dale3h commented 5 years ago

That definitely helps, thank you. I am on 10.14, but I'm sure that will make no difference. I will test Safari (not sure which version I have, but will post results after). In the mean time if you haven't yet, please enable the logger component in your configuration.yaml: https://www.home-assistant.io/components/logger/

logger:
  default: debug

This will set the default log level to debug (which should print out a bunch of stuff if the log viewer is working correctly). After enabling the logger component, it is necessary to restart Home Assistant.

Home Assistant
Logger
Instructions on how to enable the logger component for Home Assistant.
dale3h commented 5 years ago

I am using Safari Version 12.0 (14606.1.36.1.9) on macOS Mojava 10.14. The log viewer is working correctly for me. 😒

As for the developer console, I meant the Javascript/debug console. In Chrome and Safari you can activate it by pressing Cmd+Option+I (uppercase i).

It might be necessary to refresh the page after showing the console. Please copy/paste any related information from the console. If there is nothing in the console, I may need to add some additional logging to the Log Viewer javascript source. Something else to check would be the Network tab in the debug console to see if all resources are loading properly.

One last thing to try just for the heck of it: in Safari please force-reload the page by pressing Cmd+Option+R. I added a polyfill a couple of versions back, so it's possible (albeit unlikely) that Safari is loading a cached version of the old script.

plumbington commented 5 years ago

Dale,

I added the 'logger' entry to configuration.yaml, and now I can see entries in Firefox and Chrome. However Safari is still looping. There was nothing in the 'Console' tab of the Web Inspector. The 'Network' tab showed all the resources loaded, then with each reconnect attempt, a new load of 'hassio.local'.

I'll try pasting an image of the 'Network' tab, below.

Hope this helps

image

plumbington commented 5 years ago

Oh yea, one more thing... I did try Cmd+Option+R - no change in behaviour.

dale3h commented 5 years ago

I was able to get with David and we discovered the error that is preventing Safari from connecting on his computer. While I'm attempting to fix, I will add some extra logging to the Javascript libraries so that we might have a better idea of what is going wrong on your end.

Mynasru commented 5 years ago

I got the exact same problem.

edgarveersel commented 5 years ago

Just curious. Any progress on this issue yet?

niemyjski commented 5 years ago

I'm also seeing this on macOS safari (everything latest)

niemyjski commented 5 years ago

My wbbsocket is getting all the frames but I keep getting these requested requests failing:

image

DavidFW1960 commented 5 years ago

Hi @dale3h is there any progress on this? My original issue was just closed because it was stale....

rosch100 commented 5 years ago

Same issue with Safari on MacOS. Firefox is working though.

haakonstorm commented 5 years ago

+1

waltlillyman commented 5 years ago

Same behavior for me in Safari Version 12.0.3 (14606.4.5) on MacOS Mojave 10.14.3

addons-assistant[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

DavidFW1960 commented 5 years ago

I think this is fixed/working now - from 0.92.x with the latest version of the addon it seems to be working on my iPad.

waltlillyman commented 5 years ago

Thanks, I’ll give it a go.

meichthys commented 5 years ago

I can also confirm that this seems to be fixed in 0.5.1 (I'm running the add-on in Ingress mode.)

addons-assistant[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

addons-assistant[bot] commented 5 years ago

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.