File Manager attempts to upload last file on tab wake
-
The FM seems to have an issue where if the window/tab goes to sleep (Chrome based browser) and then wakes up, it attempts to upload the last file that was uploaded. (so make sure to upload a test file before sleeping the tab)
Of course this fails and generates an error one must click through.
Somehow the FM session is remembering things it shouldn't when it reconnects.
Can you check how vars are cleaned up please?
-
@robi maybe you could also specify which exact browser you are using, and possibly which tab sleep plugin ? Most Chromium-based browsers heavily customize this kind of stuff.
Honestly, this seems more of a browser bug IMO. This does not mean Cloudron should not try and work-around this bug, but still.
-
@nebulon Open up a few tabs, select one that is NOT this tab, and set the browser to remember the last session. Then close it.
Once you reopen the browser, it will ask if you want to restore the previous session tabs, and when you do, it will bring up the last selected tab. Then select the FM tab that is not fully loaded.
-
@robi I took a look at this, and it seems the browser is calling the onchange event again. Essentially it loads the application and then auto-fills the form elements with previous values, which does trigger the onchange. I have no real clue how to fix this though as there is no previous active javascript state where we could stash like the last successful upload or so. Does anyone have an idea how this is usually dealt with? I guess we could delay the change handler attaching artificially, but that sounds quite hacky.
-
-
@girish so I tried more things and my initial observation cannot be reproduced anymore, so I think I might have been misguided by persistent console logs here.
Now I am not able to reproduce the double upload trigger at all anymore in chromium or firefox. @robi can you maybe explain in more detail how to reliably reproduce this? Do you have any additional extensions installed and can anyone else here see the issue?