notes-android icon indicating copy to clipboard operation
notes-android copied to clipboard

Getting a runtime exception on a Samsung A53

Open staxas opened this issue 1 year ago • 4 comments

⚠️ Before posting ⚠️

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

Steps to reproduce

  1. Any selection in the Nextcloud Notes android app

Expected behaviour

Expect correct response

Actual behaviour

Get a runtime exception

Android version

12

Device brand and model

Samsung SM-A536B

Stock or custom OS?

Stock

Nextcloud android app version

4.2.0

Nextcloud server version

25.0.13

Using a reverse proxy?

No

Android logs

App Version: 4.2.0
App Version Code: 40020090
App Flavor: play

Files App Version Code: 30280090 (PROD)

---

OS Version: 5.10.177-android12-9-27775596-abA536BXXS8DXC1(A536BXXS8DXC1)
OS API Level: 34
Device: a53x
Manufacturer: samsung
Model (and Product): SM-A536B (a53xnaeea)

---

java.lang.RuntimeException: Unable to start receiver it.niedermann.owncloud.notes.widget.notelist.NoteListWidget: java.lang.IllegalArgumentException: it.niedermann.owncloud.notes: Targeting U+ (version 34 and above) disallows creating or retrieving a PendingIntent with FLAG_MUTABLE, an implicit Intent within and without FLAG_NO_CREATE and FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT for security reasons. To retrieve an already existing PendingIntent, use FLAG_NO_CREATE, however, to create a new PendingIntent with an implicit Intent use FLAG_IMMUTABLE.
	at android.app.ActivityThread.handleReceiver(ActivityThread.java:4905)
	at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2498)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:230)
	at android.os.Looper.loop(Looper.java:319)
	at android.app.ActivityThread.main(ActivityThread.java:8893)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Caused by: java.lang.IllegalArgumentException: it.niedermann.owncloud.notes: Targeting U+ (version 34 and above) disallows creating or retrieving a PendingIntent with FLAG_MUTABLE, an implicit Intent within and without FLAG_NO_CREATE and FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT for security reasons. To retrieve an already existing PendingIntent, use FLAG_NO_CREATE, however, to create a new PendingIntent with an implicit Intent use FLAG_IMMUTABLE.
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3073)
	at android.os.Parcel.createException(Parcel.java:3053)
	at android.os.Parcel.readException(Parcel.java:3036)
	at android.os.Parcel.readException(Parcel.java:2978)
	at android.app.IActivityManager$Stub$Proxy.getIntentSenderWithFeature(IActivityManager.java:7021)
	at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:561)
	at android.app.PendingIntent.getActivity(PendingIntent.java:537)
	at android.app.PendingIntent.getActivity(PendingIntent.java:501)
	at it.niedermann.owncloud.notes.widget.notelist.NoteListWidget.updateAppWidget(NoteListWidget.java:44)
	at it.niedermann.owncloud.notes.widget.notelist.NoteListWidget.onReceive(NoteListWidget.java:75)
	at android.app.ActivityThread.handleReceiver(ActivityThread.java:4896)
	... 9 more
Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.am.ActivityManagerService.getIntentSenderWithFeatureAsApp(ActivityManagerService.java:6460)
	at com.android.server.am.ActivityManagerService.getIntentSenderWithFeature(ActivityManagerService.java:6403)
	at android.app.IActivityManager$Stub.onTransact$getIntentSenderWithFeature$(IActivityManager.java:11842)
	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3381)
	at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3195)


Server error logs

No response

Additional information

No response

staxas avatar Mar 28 '24 07:03 staxas

Duplicate of https://github.com/nextcloud/notes-android/issues/2091?

nspo avatar Mar 28 '24 15:03 nspo

Hmm not completely, removing the widget does not fix my issue as noted as a possible fix in the linked issue. Im using Smart Launcher 6 as a launcher btw (which also renders my widgets Im guessing)

staxas avatar Mar 28 '24 16:03 staxas

Are you sure you removed the widget on every home screen? Can you reproduce with a different launcher?

I really think this is a duplicate because other than the third android.os.RemoteException stack trace (and some minor line number differences) this is the exact same stack trace as #2091.

strugee avatar Apr 12 '24 22:04 strugee

I have reproduced this with both Smart Launcher and One UI, both with all Nextcloud Notes widgets removed, and the problem persists. Guessing the widgets might be cached somewhere?

staxas avatar Apr 13 '24 07:04 staxas