Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    File Manager attempts to upload last file on tab wake

    Support
    filemanager
    4
    7
    280
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • robi
      robi last edited by girish

      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?

      Life of Advanced Technology

      nebulon 1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff @robi last edited by

        @robi how does one force a tab to go to sleep for easy reproduction of the issue?

        robi 1 Reply Last reply Reply Quote 0
        • mehdi
          mehdi App Dev last edited by

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

          1 Reply Last reply Reply Quote 1
          • robi
            robi @nebulon last edited by

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

            Life of Advanced Technology

            nebulon 1 Reply Last reply Reply Quote 0
            • nebulon
              nebulon Staff @robi last edited by

              @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 1 Reply Last reply Reply Quote 0
              • girish
                girish Staff @nebulon last edited by

                @nebulon can we clear the form after the upload is complete?

                nebulon 1 Reply Last reply Reply Quote 1
                • nebulon
                  nebulon Staff @girish last edited by

                  @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?

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Powered by NodeBB