Android Client - Unable to upload with wifi.. but 4g works?

@denNorske I actually meant the nextcloud config option… The file location is at nextcloud/config/config.php However it might as well not be the problem

  'trusted_domains' =>
  array (
    0 => '192.168.0.29',
    1 => 'cloud.example.com',
  ),

as stupid as it sounds, check if your device-settings allow wifi-access for the nextcloud-client.
if you haven’t already, try to open your nextcloud-installation in a webbrowser (on your phone) while you’re on wifi.

to see the log of your phone, enable developer options (i think you have to tap the build-number seven times) and if you have adb installed on a computer you can connect your phone with usb and use adb logcat to get the log (which should tell you something).
GOOD LUCK!

Thanks again! I checked that part of the configuration and it is correct according to my documentation. What I meant about the proxy, was that if the trusted domains were wrong, 4g should also have been affected, since all connections go through a reverse proxy through another ip/address.

@pete.dawgg thanks for the tip! I finally got the logs from the dev client, and it appears to be ssl related. Not sure what though. Here is a link: https://gist.github.com/simeneriks1/c4714c96dd3bdf28cf0f30d03fa2237d

Here is an error I see:

2019-09-19T12:47:24.149+0200;V;UploadsStorageManager;Updating /storage/emulated/0/Download/Billett (2).pdf with status:UPLOAD_FAILED and result:NETWORK_CONNECTION (old:/storage/emulated/0/Download/Billett (2).pdf status:UPLOAD_IN_PROGRESS result:-1)
2019-09-19T12:47:24.149+0200;V;UploadsStorageManager;Updating /storage/emulated/0/Download/Billett (2).pdf with status=UPLOAD_FAILED
2019-09-19T12:47:24.151+0200;D;UploadsStorageManager;updateUpload returns with: 1 for file: /storage/emulated/0/Download/Billett (2).pdf
2019-09-19T12:47:24.151+0200;D;UploadsStorageManager;notifyObserversNow
2019-09-19T12:47:24.152+0200;D;FileUploader;NotifyUploadResult with resultCode: NO_NETWORK_CONNECTION
2019-09-19T12:47:24.154+0200;D;FileUploader;Stopping command after id 1```

@denNorske try this:

From the logs it looks like the directories you browse through are being updated from the server. just file transfers fail.

Thanks!

Yes nextcloud works 100% fine elsewise. Got smb drive attached locally in Windows, I have Web interface working flawlessly, but android app fails on WiFi. I can also use phone browser and upload normally there.

When I installed the dev version of the app, shortly after adding the server, the uploading worked nicely. This morning though, it did not work.

I also notice, if I try to add the server over again as a “new” account in the app, the app will complain that this server/user is already added. Then I close the warning and go back to the app. After I get that notification, the uploads works again on WiFi. Until it stops working again sometime later…

Edit: I also checked pure DAV over WiFi, and it works, while the android client doesn’t.

That’s odd! I guess increasing log verbosity on your reverse proxy won’t help? Have you tried that?

Found this tho… Seems pretty similar…

Thanks again, yes that sounds very similar to the issue I have.

I just ensured that the application on my device have full rights to WiFi and Internet, and it should. It lists directories just fine (GET and PROPFIND requests) but no traffic is sent out when there are PUT requests. Neither reverse proxy nor the nextcloud host see any traffic PUT traffic. I have had trace level 4 in apache to determine traffic on both servers (I run reverse proxy between two servers) and there’s nothing to gain from it.

How far I can see, is that the application is having issues. Is the application bugged? What if I create you an account in my server, would you experience the same issue after a day?
Pm me if you’re up to test that.

I just started having this same issue on Android. Also running 16.0.4. Images upload fine over Verizon 4G but not on any wifi. I am able to create a folder manually through the Android app and it is synced. It also seems I can delete anything through the app. But it will not upload any files I try.

I am able to login to Nextcloud via Chrome and upload files over wifi, but the Android app always fails.

1 Like

UPDATE: I uninstalled the 3.8 Android app and reinstalled 3.7.2 and it’s back to working. So it must be a bug in 3.8?

Does it work for a longer period?

For me it stops working after a day or so, sometimes 15 minutes…

Edit: could you show your server Config, so I can compare with mine? To see if there’s anything in common. Remember to remove sensitive data

@denNorske I can confirm your issue. I have the exact same problem with your nextcloud server while not having any issues with my server. So the core problem should be on the server side… Uploads via app don’t work on WiFi, while downloads and everything else works fine… the web interface works without issues at any time. And if I use mobile data instead of WiFi I can do everything with the android app again… This is a very strange issue indeed. I would create an issue on GitHub. I don’t have an idea yet, what the cause could be

1 Like

Thanks! I’ll try to make an issue. A bit scared away by pages on pages with information required, but hopefully someone will be able to help.

Thank you very much for testing!!

1 Like

So I created an issue on GitHub under the server repository today.

Here is a link for tracking: https://github.com/nextcloud/server/issues/17226

My initial thoughts are:

  1. Either the server is doing some operation that makes the client fail to sync over WiFi
  2. Or the Server doesn’t like clients over Wifi.

It could reside on either of the sides, so I would need further digging to solve this one…

Thank you for the info. Well, if you try to re-add the account on a new update, does the same happen?

Could it be our memcache causing it or something? :slight_smile:

I’ll try that. Have you tried downgrading to 3.7.2 to see if it works for you?

I’ll try that, im currently at android 3.8.0 app and the dev version, thanks

Are you behind cloudflare by any chance?

I am, yes.

So I think I got it working by disabling cloudflare proxy on the domain… It only worked for a few minutes so far, I will need to check later.

Problem could be dns towards the webpage, or something like that, since phone network provider use a different dns server than I do with my ISP / router.

I will try to add the following ips to the trusted proxy ones in my config and see if it works any better wirh cloudflare enabled… https://www.cloudflare.com/ips/

Disabling cloudflare proxy to my domain where my nextcloud reside, seems to solve the issue.

@bozrdang please try that you as well!