Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folder content not displayed (/Documents) getting "Server not available" seems to get unexpected server response #12005

Closed
4 tasks done
Shekesh opened this issue Oct 7, 2023 · 10 comments
Labels
bug performance: ISE/IAE 😕 Illegal State Exception / Illegal Argument Exception regression stable-3.26

Comments

@Shekesh
Copy link

Shekesh commented Oct 7, 2023

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Open "Documents" folder in root Directory

Expected behaviour

Getting "Documents" folder contents displayed

Actual behaviour

Getting "Server not found" and no folder contents listed

Android version

14

Device brand and model

Google Pixel 7a

Stock or custom OS?

Stock

Nextcloud android app version

3.26.0

Nextcloud server version

27.1.2

Using a reverse proxy?

Yes

Android logs

10-07 08:47:43.396 28706  4370 D RefreshFolderOperation: Remote folder / changed - starting update of local data 
10-07 08:47:43.396 28706  4370 D FileDataStorageManager: getFolderContent - start
10-07 08:47:43.424 28706  4370 D FileDataStorageManager: getFolderContent - finished
10-07 08:47:43.438 28706  4370 D FileDataStorageManager: Saving folder / with 63 children and 0 files to remove
10-07 08:47:43.460 28706  4370 D FileDataStorageManager: Sending 64 operations to FileContentProvider
10-07 08:47:43.461 28706  4370 D FileContentProvider: applying batch in provider com.owncloud.android.providers.FileContentProvider@7615ac3 (temporary: false)
10-07 08:47:43.562 28706  4370 D FileContentProvider: applied batch in provider com.owncloud.android.providers.FileContentProvider@7615ac3
10-07 08:47:43.568 28706  4370 D RefreshFolderOperation: Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
10-07 08:47:43.570 28706  4370 D OwnCloudClient #2: REQUEST GET /ocs/v2.php/apps/files_sharing/api/v1/shares
10-07 08:47:43.583 28706 28706 D FileDisplayActivity: Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
10-07 08:47:43.587 28706 28706 D FileDisplayActivity: Setting progress visibility to true
10-07 08:47:43.899  4974 10937 D ModemODPMPoller: Current Modem ODPM (mw): 35, threshold: 800
10-07 08:47:43.957 28706  4370 D GetSharesForFileRemoteOperation: Got 0 shares
10-07 08:47:43.962 28706  4370 D FileDataStorageManager: getFolderContent - start
10-07 08:47:43.996 28706  4370 D FileDataStorageManager: getFolderContent - finished
10-07 08:47:43.997 28706  4370 D FileDataStorageManager: Sending 63 operations to FileContentProvider
10-07 08:47:43.998 28706  4370 D FileContentProvider: applying batch in provider com.owncloud.android.providers.FileContentProvider@7615ac3 (temporary: false)
10-07 08:47:44.176 28706  4370 D FileContentProvider: applied batch in provider com.owncloud.android.providers.FileContentProvider@7615ac3
10-07 08:47:44.176 28706  4370 D RefreshFolderOperation: Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
10-07 08:47:44.177 28706 28706 D FileDisplayActivity: Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
10-07 08:47:44.179 28706 28706 D FileDisplayActivity: Setting progress visibility to false
10-07 08:47:44.180 28706 28706 D FileDataStorageManager: getFolderContent - start
10-07 08:47:44.183 28706 28706 D FileDataStorageManager: getFolderContent - finished
10-07 08:47:44.521  1477  1511 D RILClient: [OemClient]IND: (clientId = 0, msgId = 2015, dataLength = 148, channel = 0)
10-07 08:47:44.522  1382  2204 D RILClient: [OemClient]IND: (clientId = 1, msgId = 2015, dataLength = 148, channel = 0)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: Synchronized /Documents/: Unexpected exception
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:397)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.Gson.fromJson(Gson.java:1227)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.Gson.fromJson(Gson.java:1137)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.Gson.fromJson(Gson.java:1047)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.Gson.fromJson(Gson.java:982)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.common.network.WebdavEntry.<init>(WebdavEntry.kt:406)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation.readData(ReadFolderRemoteOperation.java:151)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation.run(ReadFolderRemoteOperation.java:88)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:205)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.operations.RefreshFolderOperation.fetchAndSyncRemoteFolder(RefreshFolderOperation.java:405)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:239)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:399)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at java.lang.Thread.run(Thread.java:1012)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:393)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:386)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	... 12 more

Server error logs

No response

Additional information

Could not find any log files on android so I obtained these logs via adb logcat
Every other folder on the server works without any problems

@Shekesh Shekesh added the bug label Oct 7, 2023
@ebildebil
Copy link

similar issue here:
#11982

@jdaviescoates
Copy link

I also have this issue, but for me it is randomly just one of the folders inside my InstantUpload folder that isn't working. Everything else seems fine.

@kirmaha
Copy link

kirmaha commented Nov 27, 2023

Same here than OP, on /e/OS (murena). Solved by downgrading to 3.25.

@Darklesss
Copy link

Darklesss commented Nov 28, 2023

Same for me on a Pixel 5a running CalyxOS. Will try downgrading to 3.25.

If it helps troubleshoot, when I click Activities in the hamburger menu I can still see my recent changes, and can (sometimes) retrieve the file I'm looking for. So the app is connected to the server, just not showing it in the main folder view.

@joshtrichards
Copy link
Member

10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: Synchronized /Documents/: Unexpected exception
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:397)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.Gson.fromJson(Gson.java:1227)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.Gson.fromJson(Gson.java:1137)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.Gson.fromJson(Gson.java:1047)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.Gson.fromJson(Gson.java:982)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.common.network.WebdavEntry.<init>(WebdavEntry.kt:406)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation.readData(ReadFolderRemoteOperation.java:151)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation.run(ReadFolderRemoteOperation.java:88)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:205)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.operations.RefreshFolderOperation.fetchAndSyncRemoteFolder(RefreshFolderOperation.java:405)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:239)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:399)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at java.lang.Thread.run(Thread.java:1012)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:393)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:386)
10-07 08:47:44.530 28706  4394 E ReadFolderRemoteOperation: 	... 12 more

Seems to be caused by the above crash. Possibly fixed in v3.27.0 by nextcloud/android-library#1242 (and, potentially by running the latest 27.1.x server-side since the metadata has been adjusted a bit).

@joshtrichards joshtrichards added stable-3.26 performance: misc lag, ANR, etc and rarer exceptions/errors that don't have their own labels performance: ISE/IAE 😕 Illegal State Exception / Illegal Argument Exception and removed performance: misc lag, ANR, etc and rarer exceptions/errors that don't have their own labels labels Dec 19, 2023
@chandlben
Copy link

This problem just showed up on my Pixel 6a device with version 3.27 where only certain folders gave this error. I have a OnePlus 7 Pro that doesn't have the same issue it would seem. Tried to recreate with both 3.26 and 3.27 on the OnePlus and couldn't get the problem to surface. Downgrading to 3.25 on the Pixel fixed the issue. Server side I'm on 28.0.1.

Dare I say it's Pixel related?

@panachoi
Copy link

I'm having the same issue(s) with the exact same output in the logcat above. And indeed, it only affects certain folders. However, I can use another account without issue. Version 3.25 just works.

@nimra98
Copy link

nimra98 commented Feb 15, 2024

Experiencing the same issues on 3.27.0 on Android 14, but with a different log output:

2-15 12:28:56.734  7263  9889 D RefreshFolderOperation: Checking changes in ***REDACTED***
02-15 12:28:56.736  7263  9889 D OwnCloudClient #0: REQUEST PROPFIND /remote.php/dav/files/***REDACTED***
02-15 12:28:56.935  7263  9889 I RefreshFolderOperation: Checked ***REDACTED***: changed
02-15 12:28:56.937  7263  9889 D OwnCloudClient #0: REQUEST PROPFIND /remote.php/dav/files/***REDACTED***
02-15 12:29:02.241  7263  9889 E ReadFolderRemoteOperation: Synchronized /***REDACTED***/: Unexpected exception
02-15 12:29:02.241  7263  9889 E ReadFolderRemoteOperation: java.lang.ClassCastException: org.apache.harmony.xml.dom.ElementImpl cannot be cast to java.util.ArrayList
02-15 12:29:02.241  7263  9889 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.common.network.WebdavEntry.<init>(WebdavEntry.kt:453)
02-15 12:29:02.241  7263  9889 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation.readData(ReadFolderRemoteOperation.java:151)
02-15 12:29:02.241  7263  9889 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.resources.files.ReadFolderRemoteOperation.run(ReadFolderRemoteOperation.java:88)
02-15 12:29:02.241  7263  9889 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:205)
02-15 12:29:02.241  7263  9889 E ReadFolderRemoteOperation: 	at com.owncloud.android.operations.RefreshFolderOperation.fetchAndSyncRemoteFolder(RefreshFolderOperation.java:405)
02-15 12:29:02.241  7263  9889 E ReadFolderRemoteOperation: 	at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:239)
02-15 12:29:02.241  7263  9889 E ReadFolderRemoteOperation: 	at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:399)
02-15 12:29:02.241  7263  9889 E ReadFolderRemoteOperation: 	at java.lang.Thread.run(Thread.java:1012)

The issue does occur on iOS/iPadOS.

Reverting back to 3.26.0 from F-Droid fixes the issue.

@joshtrichards
Copy link
Member

In hindsight, this seems to be the same as #12379 (which is good because we know what is causing that).

@joshtrichards
Copy link
Member

Fixed in nextcloud/android-library#1349

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug performance: ISE/IAE 😕 Illegal State Exception / Illegal Argument Exception regression stable-3.26
Projects
None yet
Development

No branches or pull requests

9 participants