Pasting large images into address bar causes crash with composable toolbar enabled [@ java.lang.RuntimeException: at android.content.ClipboardManager.setPrimaryClip(ClipboardManager.java)]
Categories
(Firefox for Android :: Toolbar, defect, P2)
Tracking
()
People
(Reporter: ke5trel, Assigned: petru)
References
(Regression)
Details
(Keywords: crash, regression, Whiteboard: [fxdroid][group3][composable toolbar])
Crash Data
Attachments
(3 files)
STR:
- Ensure "Composable Toolbar" is enabled in secret settings on latest Android Nightly 148.0a1.
- Open Gallery app on Samsung S20, select a large photo (at least 4MB), tap three-dots > "Copy to clipboard".
- Focus address bar.
- Long-press address bar and tap "Paste".
Expected:
Nothing happens or characters pasted like before.
Actual:
App crashes.
Does not happen with composable toolbar disabled but previously worked with it enabled.
Regression window (paste missing):
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=6bcf80824ecafc424e41b136705ba08370d66254&tochange=ebd252259b1b0cb286e12edc2e14b9f483444920
Regression window (paste appears but crashes):
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d87cd04072b041911d218cec1baf59de7f2a5ede&tochange=2aa1a620ba9a855c06761428259e9e881d8db785
Possibly regressed by Bug 1994009.
Crash report: https://crash-stats.mozilla.org/report/index/a8a04b04-cc23-4aa7-a7db-540710251218
Top 10 frames:
0 android.os.BinderProxy transactNative BinderProxy.java:-2
1 android.os.BinderProxy transact BinderProxy.java:662
2 android.content.IClipboard$Stub$Proxy setPrimaryClip IClipboard.java:311
3 android.content.ClipboardManager setPrimaryClip ClipboardManager.java:132
4 androidx.compose.ui.platform.AndroidClipboard setClipEntry AndroidClipboard.android.kt:29
5 mozilla.components.compose.browser.toolbar.ui.PasteSanitizerTextToolbar$sanit... invokeSuspend InlineAutocompleteTextField.kt:180
6 kotlin.coroutines.jvm.internal.BaseContinuationImpl resumeWith ContinuationImpl.kt:9
7 kotlinx.coroutines.DispatchedTask run DispatchedTask.kt:122
8 androidx.compose.ui.platform.AndroidUiDispatcher access$performTrampolineDispatch AndroidUiDispatcher.android.kt:24
9 androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1 run AndroidUiDispatcher.android.kt:3
| Assignee | ||
Comment 1•6 months ago
•
|
||
Thank you for the all the details @Kestrel!
Tested that this reproduces with the composable toolbar while it isn't an issue with the new toolbar.
Deobfuscated stack trace from my device:
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1515140 bytes
at android.content.ClipboardManager.setPrimaryClip(ClipboardManager.java:192)
at androidx.compose.ui.platform.AndroidClipboard.setClipEntry(AndroidClipboard.android.kt:29)
at mozilla.components.compose.browser.toolbar.ui.PasteSanitizerTextToolbar$sanitizeAvailableTextClip$1.invokeSuspend(InlineAutocompleteTextField.kt:180)
Don't see the value in supporting this or very long URLs, do remember issues with long data URLs also in the past, we should probably catch the exception and prevent it from crashing the app first. Optionally we can show a message to the user about the operation failing.
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
| Assignee | ||
Comment 2•6 months ago
|
||
Updated•6 months ago
|
Comment 4•6 months ago
|
||
| bugherder | ||
Comment 5•6 months ago
|
||
The patch landed in nightly and beta is affected.
:petru, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox147towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•6 months ago
|
Comment 6•6 months ago
|
||
Managed to reproduce the issue on an earlier Nightly build (148.0a1 from 2025-12-18).
Verified as fixed on the latest Nightly build (148.0a1 from 2025-12-29).
The app does no longer crash on the latest build.
A 34Mb file was used to create the situation that caused the crash before.
Device used: Samsung Galaxy S25 Ultra (Android 15).
Marking the ticket as verified on 148.
Updated•6 months ago
|
Comment 7•6 months ago
|
||
:petru, 147.0b9 builds on Wednesday and is the last beta for the cycle.
If this is safe for a beta uplift request?
| Assignee | ||
Comment 8•6 months ago
|
||
(In reply to Donal Meehan [:dmeehan] from comment #7)
:petru, 147.0b9 builds on Wednesday and is the last beta for the cycle.
If this is safe for a beta uplift request?
Thank you for the ping!
The patch would solve two scenarios of possible crashes through relatively small changes so I think we should have this in preparation of a wider release of the composable toolbar.
Comment 9•6 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: Potential crash when pasting large objects in the toolbar or resources owned by other apps - like images.
- Code covered by automated testing: no
- Fix verified in Nightly: yes
- Needs manual QE test: yes
- Steps to reproduce for manual QE testing: https://bugzilla.mozilla.org/show_bug.cgi?id=2006921#c0
- Risk associated with taking this patch: low
- Explanation of risk level: Small targeted fix.
- String changes made/needed: --
- Is Android affected?: yes
| Assignee | ||
Comment 10•6 months ago
|
||
Users can still choose "Paste & Go" in the contextual popup menu to load
longer URLs but the length of text pasted to edit is now limited to a more
manageable size.
Original Revision: https://phabricator.services.mozilla.com/D277506
Updated•6 months ago
|
Updated•6 months ago
|
Comment 11•6 months ago
|
||
| uplift | ||
Comment 12•6 months ago
|
||
Managed to reproduce the issue on an earlier Beta build (1470b8).
Verified as fixed on the latest Beta build (147.0b9).
The app does no longer crash on the latest build.
The same 34Mb file was used (As on Nightly verifying) to create the situation that caused the crash before.
Device used: Samsung Galaxy S25 Ultra (Android 15).
Marking the ticket as verified on 147 as well.
Updated•6 months ago
|
Description
•