nextcloud / nextcloud/notes-android

BadParcelableException NoCurrentAccountSelectedException during adding a new account without Notes installed on server

Open
#1,951 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
1.1k
Forks
168
Avg merge
1d 17h
Merged PRs (30d)
31

Description

Please use GitHub reactions 👍 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Describe the bug

App crashes when I try to add the second Nextcloud account among existing one. The new one is located on server without Notes app installed. As a result I can't go back to my first account. There is an error loop.

To Reproduce
Steps to reproduce the behavior:

  1. Tap on user avatar
  2. Select Add new account
  3. Select the account added before in Nextcloud app, different than the current one
  4. App shows an empty avatar in the background, there is an error attached below. After hitting Close button I can see an "empty" app.

Expected behavior

See and error and do not dead loop.

Screenshots

Smartphone (please complete the following information):

  • Nextcloud Notes-Version (android app): 4.1.0
  • F-Droid or Play Store: F-Droid
  • Android-Version: 13, GrapheneOS up to date
  • Device: Google Pixel 6 (oriole)

Server

  • Nextcloud version: 27.1.4
  • Nextcloud Notes version (server app): not installed

Stacktrace

App Version: 4.1.0
App Version Code: 40010090
App Flavor: fdroid

Files App Version Code: 30260090 (PROD)

---

OS Version: 5.10.200-android13-4-gb559d5ab185a(2023120800)
OS API Level: 34
Device: oriole
Manufacturer: Google
Model (and Product): Pixel 6 (oriole)

---

android.os.BadParcelableException: Parcelable encountered IOException writing serializable object (name = com.nextcloud.android.sso.exceptions.NoCurrentAccountSelectedException)
	at android.os.Parcel.writeSerializable(Parcel.java:2799)
	at android.os.Parcel.writeValue(Parcel.java:2565)
	at android.os.Parcel.writeValue(Parcel.java:2364)
	at android.os.Parcel.writeList(Parcel.java:1417)
	at android.os.Parcel.writeValue(Parcel.java:2508)
	at android.os.Parcel.writeValue(Parcel.java:2364)
	at android.os.Parcel.writeArrayMapInternal(Parcel.java:1300)
	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1845)
	at android.os.Bundle.writeToParcel(Bundle.java:1389)
	at android.os.Parcel.writeBundle(Parcel.java:1369)
	at android.os.Parcel.writeValue(Parcel.java:2481)
	at android.os.Parcel.writeValue(Parcel.java:2371)
	at android.os.Parcel.writeArrayMapInternal(Parcel.java:1300)
	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1845)
	at android.os.Bundle.writeToParcel(Bundle.java:1389)
	at android.os.Parcel.writeBundle(Parcel.java:1369)
	at android.os.Parcel.writeValue(Parcel.java:2481)
	at android.os.Parcel.writeValue(Parcel.java:2371)
	at android.os.Parcel.writeArrayMapInternal(Parcel.java:1300)
	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1845)
	at android.os.Bundle.writeToParcel(Bundle.java:1389)
	at android.os.Parcel.writeBundle(Parcel.java:1369)
	at android.os.Parcel.writeValue(Parcel.java:2481)
	at android.os.Parcel.writeValue(Parcel.java:2371)
	at android.os.Parcel.writeArrayMapInternal(Parcel.java:1300)
	at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1845)
	at android.os.Bundle.writeToParcel(Bundle.java:1389)
	at android.os.Parcel.writeBundle(Parcel.java:1369)
	at android.os.Parcel.writeValue(Parcel.java:2481)
	at android.os.Parcel.writeValue(Parcel.java:2371)
	at android.os.BaseBundle.dumpStats(BaseBundle.java:1919)
	at android.os.BaseBundle.dumpStats(BaseBundle.java:1956)
	at android.app.servertransaction.PendingTransactionActions$StopInfo.collectBundleStates(PendingTransactionActions.java:123)
	at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:139)
	at android.os.Handler.handleCallback(Handler.java:958)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at android.app.ActivityThread.main(ActivityThread.java:8216)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
	at com.android.internal.os.ExecInit.main(ExecInit.java:49)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
Caused by: java.io.NotSerializableException: android.content.Intent
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1240)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1620)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1581)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1490)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1234)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:354)
	at android.os.Parcel.writeSerializable(Parcel.java:2794)
	... 43 more

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the account-switching flow with a second account whose server lacks the Notes app, then trace the NoCurrentAccountSelectedException and BadParcelableException from the stack trace. Done means switching accounts no longer enters an error loop or leaves the app empty, and the original account remains accessible.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
authentication, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.