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

NextcloudApiNotRespondingException #162

Open
David-Development opened this issue Jan 20, 2020 · 16 comments · Fixed by #163
Open

NextcloudApiNotRespondingException #162

David-Development opened this issue Jan 20, 2020 · 16 comments · Fixed by #163

Comments

@David-Development
Copy link
Member

David-Development commented Jan 20, 2020

By now two apps are having issues with the NextcloudApiNotRespondingException Bug.

A few days ago I was experiencing the same issue on my device (I think right after I updated the news app via the play store). Several restarts of the app did not help. Only setting up the account again solved the problem for me. Still not sure if the Nextcloud Files App has something to do with it or if the problem is on the "client" side. @stefan-niedermann Do you have new insights into why this error happens? Or any ideas if the files app is involved in this?

Maybe some old Service Connections are reused which are broken? But that wouldn't make sense in terms of the app restarts I performed. Maybe restarting the phone helps..? That would be interesting to find out.

Confirmed devices

Android Version Device Original issue Disable 🔋-Opt solved
Android 5.1 Nubia N1 nextcloud/notes-android#710 (comment)
Android 6 / 8 Meizu M5s
Android 7 Huawei MediaPad T3 nextcloud/notes-android#907 ✅ (clear storage after)
Android 10 Pixel 4 XL
Android 10 Xiaomi Mi 8
MiUI 12.5.1 Xiaomi Mi 10 Pro 5G nextcloud/notes-android#1312
@stefan-niedermann
Copy link
Member

@tobiasKaminsky just said, this is reproducable when the files app is updated and SSO should recreate the API instance after a 5s timeout 🤷‍♂

@David-Development
Copy link
Member Author

Okay, I tried reproducing the issue. I installed the news app and put it into debugging mode. I updated the nextcloud files app using the following command:

./adb install ~/Downloads/gplay-release-30100090.apk

As I would expect I was able to see the following in the LogCat:

2020-01-21 17:41:06.987 5245-5245/de.luhmer.owncloudnewsreader E/com.nextcloud.android.sso.api.AidlNetworkRequest: Nextcloud Single sign-on: ServiceDisconnected
2020-01-21 17:41:06.987 5245-5245/de.luhmer.owncloudnewsreader D/com.nextcloud.android.sso.api.AidlNetworkRequest: reconnecting lost SingleSignOn service connection
2020-01-21 17:41:06.987 5245-5245/de.luhmer.owncloudnewsreader V/com.nextcloud.android.sso.api.NetworkRequest: Nextcloud Single sign-on connect() called [main] Account-Type: [nextcloud]
2020-01-21 17:41:07.334 5245-5245/de.luhmer.owncloudnewsreader V/com.nextcloud.android.sso.api.AidlNetworkRequest: Nextcloud Single sign-on: onServiceConnected [main]

So the lost connection (due to the reinstall process) is re-established successfully. So at this point I'm not able to reproduce the issue. I'll need to investigate a little further..

@teras
Copy link

teras commented Feb 13, 2020

I've tried connecting with both, the "stable" version of NextCloud Files and the dev version, from the F-Droid repository, as well as the Google Play version. None worked properly. Is there any solution for this yet?

@David-Development
Copy link
Member Author

@teras Unfortunately not. I'm on my way back from my vacation and hopefully I'll have some time in the next few days to investigate further. I didn't update my nextcloud files app on the phone yet so I am hoping to be able to reproduce the error and grab some logcat output from it. Like I said before manually reinstalling the files app using adb does not help much as everything works as expected during my tests (the api reconnects immediately).

Call for action: If anyone wants to help to investigate this issue, it would be very helpful to grab the logcat output (of both the nextcloud files app as well as the client app; e.g. nextcloud news / nextcloud notes) while updating the nextcloud files app trough the app store.

@David-Development
Copy link
Member Author

Looks like I was able to fix this issue today. Planning on releasing a new version in the next couple days.

Reference: #163

@stefan-niedermann
Copy link
Member

Here we go again :(

SSO-Version 0.5.0-rc3

nextcloud/notes-android#752

@stefan-niedermann
Copy link
Member

stefan-niedermann commented Feb 29, 2020

Another one: nextcloud/notes-android#753 (comment)

Though i find the different stack traces interesting. The first one looks like 5 retrys, the second one has only one entry.

@stefan-niedermann
Copy link
Member

Another one with 2 stack traces:

nextcloud/notes-android#710 (comment)

(If i receive another stacktrace i will merge all references to one comment to not flood this thread)

@FredMa01

This comment has been minimized.

@PinkFreud
Copy link

I'm seeing this issue as well:

App Version: 2.11.3
App Version Code: 2011003
Files App Version Code: 30100190

---

OS Version: 4.14.150-g05fe60fb845b-ab6126650(6156912)
OS API Level: 29
Device: coral
Model (and Product): Pixel 4 XL (coral)

---

com.nextcloud.android.sso.exceptions.NextcloudApiNotRespondingException: Nextcloud files app api is not responding. Please report this issue.
	at com.nextcloud.android.sso.api.AidlNetworkRequest.waitForApi(AidlNetworkRequest.java:147)
	at com.nextcloud.android.sso.api.AidlNetworkRequest.performAidlNetworkRequestV2(AidlNetworkRequest.java:278)
	at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:165)
	at com.nextcloud.android.sso.api.NextcloudAPI.performNetworkRequestV2(NextcloudAPI.java:148)
	at it.niedermann.owncloud.notes.persistence.NotesClient.requestServer(NotesClient.java:162)
	at it.niedermann.owncloud.notes.persistence.NotesClient.getNotes(NotesClient.java:98)
	at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper$SyncTask.pullRemoteChanges(NoteServerSyncHelper.java:451)
	at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper$SyncTask.doInBackground(NoteServerSyncHelper.java:358)
	at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper$SyncTask.doInBackground(NoteServerSyncHelper.java:320)
	at android.os.AsyncTask$3.call(AsyncTask.java:378)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:919)

@stefan-niedermann
Copy link
Member

stefan-niedermann commented Mar 28, 2020

And did you follow the steps we mentioned earlier in this thread @PinkFreud ?

Edit Sorry @PinkFreud i was in the wrong issue - Please read starting here: nextcloud/notes-android#752 (comment)

TL;DR: Clear Storage of both apps, Notes and the main Nextcloud android app.

@PinkFreud
Copy link

And did you follow the steps we mentioned earlier in this thread @PinkFreud ?

Edit Sorry @PinkFreud i was in the wrong issue - Please read starting here: stefan-niedermann/nextcloud-notes#752 (comment)

TL;DR: Clear Storage of both apps, Notes and the main Nextcloud android app.

This was almost a month ago (sorry, I seem to have missed your reply, argh!), but I did manage to get it working. I don't recall what I did now, but I may very well have done that.

@eyenalxai
Copy link

Relevant closed Meizu issue: nextcloud/notes-android#753

I installed Notes and Deck apps for Android on Meizu M5s, and they both didn't work because of the NextcloudApiNotRespondingException error.

I fixed the issue by disabling Smart Background feature and allowing all Nextcloud related apps to run in the background.

Previously I tried clearing cache, storage and reinstalling apps multiple times without any positive results.

Logs are the same as above, so I won't provide them.

@dasbiswajit
Copy link
Contributor

dasbiswajit commented Jun 21, 2020

@David-Development Good Day! Count 3 apps now!! Nextcloud-bookmark I wished to integrate SSO with Nextcloud bookmark. the latest code is here. However, this is stopping me from releasing the fix for SSO. This feature is already live however this issue blocking SSO feature.

@stefan-niedermann
Copy link
Member

For documentation @David-Development another one where disabling battery optimization worked as solution: nextcloud/notes-android#710 (comment)

@grinapo
Copy link

grinapo commented Aug 4, 2021

Just reiterating what I said in nextcloud/notes-android#1312

For me battery optim or autostart (or basically anything) haven't fixed it.

But scratching app storage did: Notes re-requested the NC account then re-pulled the data and now it works. However I have the suspicion that if I do not use the app for a while (weeks?) it will be stopped by the chinese communist party MIUI 12.5.1 and after that it will not be able to reconnect until another full data clear.

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

Successfully merging a pull request may close this issue.

9 participants