Skip to content

[1.5.7] Automatic upload over Wi-FI jumped to cellular #529

Closed

Description

Traveled abroad yesterday and noticed something strange with the automatic upload of pictures. My default setting is to only upload when connected to Wi-Fi. All was well until I connected my phone to the airport network that requires me too start the browser and accept the TOS. Only after that do I get a connection to the Internet.

What happened was that before I had a chance to accept the TOS, ownCloud started to try and upload 400 images (3-400MB in total) that I took during my visit. And of course the upload failed. But after accepting the TOS, the upload worked. And then it was time for me to board my flight and I switched off Wi-Fi and expected the upload to stop, but no, instead the upload jumped over to the cellular network and started to eat away my precious 20 MB/day quota when I’m abroad. Managed to switch off the cellular network and the uploads started to fail, after killing the app in the Android settings did the madness stop.

Android did notify me when I connected to the airport Wi-Fi that I needed to sign in/accept the TOS. Is it possible to get the ownCloud app to halt the upload until there actually is a working connection to the Internet and not just a connection to a local Wi-Fi/AP network? It should try to “ping” the server and see if it gets a valid response back before starting the automatic upload.

Expected behaviour

Upload should have stopped when the Wi-Fi connection was turned off.

Actual behaviour

When Wi-Fi was turned off, the ownCloud resumed the automatic upload over the cellular network instead of just stop the upload and wait for a Wi-Fi connection.

Environment data for Samsung Galaxy Note 2

Android version: 4.1.2

Device model: Samsung Galaxy Note II

Stock or customized system: Stock

ownCloud app version: 1.5.7


Server runs 6.0.3

Activity

  1. davivel commented on Jun 5, 2014

    @davivel
    Contributor

    This is a very interesting use case. Definitely, needs to be fixed.

  2. javl commented on Jul 7, 2014

    @javl

    Apple solves the 'ping' part by requesting the following url:
    http://www.apple.com/library/test/success.html
    There can be three responses:
    No response: there is no internet connection
    Body contains 'success': internet access found so can sync / do something else.
    Other response: redirect or captive portal found, in which case they show the portal page.

    Maybe the OC installation can contain such a page?

    This only helps with the failing uploads in between connecting and accepting the ToS of the connection though, not the sync over 3g problem.

  3. davivel commented on Jul 10, 2014

    @davivel
    Contributor

    Thanks for the idea, @javl.

    In this case, besides the problem of captive portals (there is other issue about that somewhere), there is other problem issue in the logic of our uploads service. The network and the option about 'only Wifi' are checked in the moment that the pictures are detected, but they are not checked again later when the service really uploads the file. Then, if the photo is taken with Wifi it is 'approved' to upload; if for any circumstance it is uploaded later (it failed, then it's retried), it will be uploaded no matter the state of network.

  4. dvdbng commented on Dec 9, 2014

    @dvdbng

    I lost 5€ of data today because of this :( Phone auto-conected to a WiFi network and then timed out, while roaming...

  5. tobiasKaminsky commented on Oct 16, 2015

    @tobiasKaminsky
    Contributor

    Implemented in #1191

  6. davivel commented on Feb 26, 2016

    @davivel
    Contributor

    The fix has been merged and will be released with version 1.9.2.

    Thanks, @tobiasKaminsky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions