Refresh

I'm using Repetier-server with Raspberry Pi image. I access it through Safari on MacOS. I'm having a problem with webpage refresh. If I don't click in the website for a couple of minutes, I need to refresh it again. After more some minutes, refresh again. Otherwise If I click it any button it does nothing. Always needing to refresh is a pain. 
«1

Comments

  • Which OS X/Safari version are you using. I develop on mac but normally use Chrome as browser. Now I have it running on Safari but it does not stop working.

    Is there anything else needed to make it not work, like screensaver must get active, sleep mode active, ...

    Even if you loose connection due to sleep or whatever it would normally just reconnect automatically.

    If you open debug console, do you see any problems there?
  • I'm using Safari on macOS Catalina. I also had this problem in the earlier version of macOS and in 2 different Macs (iMac and Macbook). No screensaver active, energy settings are unchanged (default).

    There is no problem with printer connection. Just the website doesn't respond to clicks in different icons or tabs. I don't have this problem with octoprint or other sites. It does work very well if I'm working continually with it, but if for some reason I don't click in any place of the website for a couple of minutes, it stops responding to the clicks, but I can still see the website running and printer connection. For example, if I try to change temperature or change X position, I can click on the button but it does nothing. After refreshing it works as supposed.
  • When that happens next time can you right click on the button and select inspect element or however it is named in english or your language and them make a screenshot.

    That sounds like some element is on top of the button that is invisible. Just can't imagine which since I never have that problem and also have no other reports. But that should show the element in inspector so I can see and hopefully detect what it is and if it is from us or comes maybe from a plugin you have installed.
  • By the way, please correct this two language errors in portuguese: "Acutalizar" must be "Actualizar" and "extrusir" must be "extrudir". 
  • So the home and emergency button layout selection did not react any more?
    From the selection there seems nothing on top of them. So that is not the reason.
    Could you also check the console content when it happens. These send javascript commands so the other reason to not work would be a javascript error and console would show it.

    Will try to find the translation errors.
  • In the video you send me along I saw also that server uuid/name was not visible. Is that after reload the same or only after the pause. Seems more important to check the browser console for errors. Must be something gone wrong so data is missing.
  • "extrusir" must be "extrudir"

    What is the difference? Google translates both the same. There are many sentences containing "extrusir" - are they always wrong or only when it is used alone. Or is it grammatical difference and inside sentences extrusir is then correct?

  • Repetier said:
    So the home and emergency button layout selection did not react any more?
    From the selection there seems nothing on top of them. So that is not the reason.
    Could you also check the console content when it happens. These send javascript commands so the other reason to not work would be a javascript error and console would show it.

    Will try to find the translation errors.
    No buttons react anymore, only after a webpage refresh. I will check the console content. The server uuid/name was not visible only when it stops working. After refresh I can see server uuid name as supposed and everything works well.

    Portuguese dictionaries only have "extrudir". "Extrusir" doesn't exist. I think som e people says or writes that but is totally wrong. I rechecked it on the 3 most important portuguese dictionaries.
  • Thanks for translation explaination. Have now fixed all occurences to extrudir.

    Regarding the bug I have no real idea. The error you showed is quite vage and does not say the real reason. Assuming they happen when the error starts. Is there a special page you have open before it happens? What do you do to get it? Had a page open for 30 minutes and continued without problems, so not sure how to recreate is. Which plugins do you have installed? I have only my password manager plugin and nothing else.

    Also did you test with a different browser? Chrome, Firefox, Brave to see if it only happens on Safari in your case.
  • Maybe I have found something. Do you use a webcam with mjpg? My tests show that safari does never close them in my current version  13.0.2 (15608.2.30.1.1). Other browsers do that. This causes at some point to occupy all possible server connections just with jpg updates. After a reload these get released and it works again until the limit is exceeded. Does not really depend on pause, more on switching between pages with webcam view.

    You can avoid that by disabling mjpg in printer configuration so only static images get loaded. Or use a browser without that bug. I'm searching for a solution but since it looks like a browser bug it might not be solvable apart form not using mjpg.
  • Repetier said:
    Thanks for translation explaination. Have now fixed all occurences to extrudir.

    Regarding the bug I have no real idea. The error you showed is quite vage and does not say the real reason. Assuming they happen when the error starts. Is there a special page you have open before it happens? What do you do to get it? Had a page open for 30 minutes and continued without problems, so not sure how to recreate is. Which plugins do you have installed? I have only my password manager plugin and nothing else.

    Also did you test with a different browser? Chrome, Firefox, Brave to see if it only happens on Safari in your case.

    I have this problem even if repetir-server is the first webpage opened on Safari. I think it doesn't matter what page I open next. I tried different websites but with the same problem on Repetier-Server webpage. I don't have any plugin installed on Safari. It's a fresh install. I didn't test it with different browser...

    Repetier said:
    Maybe I have found something. Do you use a webcam with mjpg? My tests show that safari does never close them in my current version  13.0.2 (15608.2.30.1.1). Other browsers do that. This causes at some point to occupy all possible server connections just with jpg updates. After a reload these get released and it works again until the limit is exceeded. Does not really depend on pause, more on switching between pages with webcam view.

    You can avoid that by disabling mjpg in printer configuration so only static images get loaded. Or use a browser without that bug. I'm searching for a solution but since it looks like a browser bug it might not be solvable apart form not using mjpg.

    I have a Raspberry Pi connected but is not active in Repetier-Server. I will try to disable Raspberry Pi on Raspi-Config...

  • HesiRe said:
    Repetier said:
    Thanks for translation explaination. Have now fixed all occurences to extrudir.

    Regarding the bug I have no real idea. The error you showed is quite vage and does not say the real reason. Assuming they happen when the error starts. Is there a special page you have open before it happens? What do you do to get it? Had a page open for 30 minutes and continued without problems, so not sure how to recreate is. Which plugins do you have installed? I have only my password manager plugin and nothing else.

    Also did you test with a different browser? Chrome, Firefox, Brave to see if it only happens on Safari in your case.

    I have this problem even if repetir-server is the first webpage opened on Safari. I think it doesn't matter what page I open next. I tried different websites but with the same problem on Repetier-Server webpage. I don't have any plugin installed on Safari. It's a fresh install. I didn't test it with different browser...

    Repetier said:
    Maybe I have found something. Do you use a webcam with mjpg? My tests show that safari does never close them in my current version  13.0.2 (15608.2.30.1.1). Other browsers do that. This causes at some point to occupy all possible server connections just with jpg updates. After a reload these get released and it works again until the limit is exceeded. Does not really depend on pause, more on switching between pages with webcam view.

    You can avoid that by disabling mjpg in printer configuration so only static images get loaded. Or use a browser without that bug. I'm searching for a solution but since it looks like a browser bug it might not be solvable apart form not using mjpg.

    I have a Raspberry Pi connected but is not active in Repetier-Server. I will try to disable Raspberry Pi on Raspi-Config...

    I mean Raspberry Pi Camera 2.0
  • It is sufficient to go to printer settings and set webcam to jpg only. In fact not doing so will not close the found problem.

    Good news is that I have an idea how to work around the mjpg problem at least for next release.
  • Disabling mjpg or disabling totally Raspberry Pi camera didn't solve the problem. It looks that running new safari webpages in a different window than Repetier-server webpage doesn't have this problem.
  • You mean server runs in a tab and you switch to another tab and when you come back the problem is there when there was a delay?
  • 1) One Safari window with Retetier-server webpage running and other Safari window with other websites: it looks fine, but I'm still testing

    2) One Safari window with Repetier-server and other websites running in different tabs: problem!
  • edited November 1
    That's it. Repetier-server webpage alone on one window just works. It looks something is blocking webpage from running when other websites are opened in the same window. Do you think there is something you can do or it can be a Safari related problem?
  • Hard to say. My guess is that safari puts invisible tabs into a sleep condition at least in your case. Still can't reproduce it. And when it comes back the sleep condition causes a problem. Server will disconnect websockets when not pinged every 5 seconds. Now with all other browsers this is no big deal. Client will detect that and just reconnects and work continues.  For unknown reasons that does not seem to happen with Safari in your case.

    Are you running it on a laptop maybe so there are different energy savings then on my desktop imac?
    In safari settings->advanced there is a setting to stop plugins for power saving. I had this enabled. Just disabled for testing if that is the problem, but what is your setting there.
  • Also maybe of importance - which safari version are you using? Version 13.0.2 (15608.2.30.1.1) is what I currently use.
  • Ok found a bit more. When tab is not active the setTimeout function in javascript gets throttled - the longe tab is inactive the more throtteling happens. This causes the websocket to get closed. It will then get reopened and closed again in a loop. No problem normally, but in your case it seems to lead to a problem. So as a solution I will in next release tell server that the client is throttled so it extends timeout from 15 to 300 seconds. That hopefully keeps the connection alive so you do not get the problem at reconnect any more. Also it is strange that you get such errors. During testing I got many reconnects all successful. 

    Do you get that problem every time you switch back after 2 minutes or does it only happen sometimes?
  • Repetier said:
    Hard to say. My guess is that safari puts invisible tabs into a sleep condition at least in your case. Still can't reproduce it. And when it comes back the sleep condition causes a problem. Server will disconnect websockets when not pinged every 5 seconds. Now with all other browsers this is no big deal. Client will detect that and just reconnects and work continues.  For unknown reasons that does not seem to happen with Safari in your case.

    Are you running it on a laptop maybe so there are different energy savings then on my desktop imac?
    In safari settings->advanced there is a setting to stop plugins for power saving. I had this enabled. Just disabled for testing if that is the problem, but what is your setting there.
    I tried with both Macbook and iMac with default energy settings. I tried disabling settings->advanced -> stop plugins for power saving, but without success. I think this option is enabled by default.

    Repetier said:
    Also maybe of importance - which safari version are you using? Version 13.0.2 (15608.2.30.1.1) is what I currently use.

    I'm using the latest version of Safari available, but I think I had this problem already before upgrading to macOS Catalina: 13.0.3 (15608.3.10.1.4).Repetier said:
    Ok found a bit more. When tab is not active the setTimeout function in javascript gets throttled - the longe tab is inactive the more throtteling happens. This causes the websocket to get closed. It will then get reopened and closed again in a loop. No problem normally, but in your case it seems to lead to a problem. So as a solution I will in next release tell server that the client is throttled so it extends timeout from 15 to 300 seconds. That hopefully keeps the connection alive so you do not get the problem at reconnect any more. Also it is strange that you get such errors. During testing I got many reconnects all successful. 

    Do you get that problem every time you switch back after 2 minutes or does it only happen sometimes?

    There is something I can change or some file just to check if extending timeout from 15 to 300 seconds works? 

    It happens always. It's a contacts problem. I can repeat it easily. The only way it works is opening other sites in different windows. If I open in the same window of Repetier-Server it just stops, then I must refresh. It's annoying because I need to to that a lot of times a day.
  • In the next days I release an update where at least the disconnect from setTimeout throtteling does not happen any more and also the webcam problem is solved. So I found at least some parts of it. But why reconnect seems to not work in your case is strange. For me it works 100%. At least I assume that this is why it does not work as what you are missing in the video was what you get from websocket. So lets see if it helps or not.
  • edited November 4
    Server connection with the printer is always working. In printer LCD I don’t see any change and IP number is always there. So I think it’s not related with printer connection.
  • I just updated Repetier-Server to v0.93.0 but I have the same problem. Sadly, it looks your changes didn't made any effect on this problem. 
  • So maybe it is time to test chrome or firefox if  they get same problem in your computer. Also I found some things on Safari I never got your problem on the reconnect. Hope was that it would not need to reconnect and the error does not happen again. The fact that no one joins your problem is also strange since you have it on 2 macs as far as I understood. Might also mean that something in your server config plus safari problems only cause it. Hard to say.

    Would be interesting if you could open debug tools->network tab and see if you get more connection to "socket" when the problem appears resp. when tab is invisible. My changes should prevent the need and at max. add one new socket when tab is activated (only when it still was disconnected). Before it would open several connections per minute and close them.
  • I don't have this problem with Chrome. Just with Safari. 
  • I don't see "socket" information on debug tools. Where it is?
  • It is in network tab. You can write sock in filter to see only these files. 
Sign In or Register to comment.