You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[1.5.7] Automatic upload over Wi-FI jumped to cellular #529
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.
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.
Activity
davivel commentedon Jun 5, 2014
This is a very interesting use case. Definitely, needs to be fixed.
javl commentedon Jul 7, 2014
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.
davivel commentedon Jul 10, 2014
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.
dvdbng commentedon Dec 9, 2014
I lost 5€ of data today because of this :( Phone auto-conected to a WiFi network and then timed out, while roaming...
tobiasKaminsky commentedon Oct 16, 2015
Implemented in #1191
davivel commentedon Feb 26, 2016
The fix has been merged and will be released with version 1.9.2.
Thanks, @tobiasKaminsky