ANR after sharing image from https://youcantdownloadthisimage.com/
Categories
(Firefox for Android :: Share, defect, P3)
Tracking
()
People
(Reporter: cpeterson, Unassigned)
References
()
Details
From github: https://github.com/mozilla-mobile/fenix/issues/22644.
Steps to reproduce
- Open https://youcantdownloadthisimage.com/
- Long-press the image
- Select "Share image"
Expected behaviour
The browser should not block when sharing fails.
Actual behaviour
The OS shows an ANR warning for the browser.
Device name
Sony Xperia Z2
Android version
Android 6.0.1
Firefox release type
Firefox Nightly
Firefox version
96.0a1 (Build #2015848873), 9fa9ae337+ AC: 96.0.20211130143618, 395aa21e64 GV: 96.0a1-20211130093553 AS: 86.2.0, 2021-12-01T05:13:00.119862
Device logs
No response
Additional information
This website does not close the connection after the image has been sent, see the description below the image when clicking "The answer".
Change performed by the Move to Bugzilla add-on.
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Comment 1•2 years ago
•
|
||
This bug was reproducible in Fenix 96 and 97. Is it still reproducible in a recent version of Fenix?
Comment 2•2 years ago
|
||
This issue is still reproducible with the latest Nightly 110.0a1 (2023-01-12) build.
It's not reproducible on Chrome with the same device.
Device used: LG Nexus 5 (Android 6.0.1).
Updated•2 years ago
|
Comment 3•2 years ago
|
||
The severity field is not set for this bug.
:cpeterson, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 4•2 years ago
|
||
Group triage result: Comparing Fenix behavior to other browsers, only Fenix leads to ANR, we could investigate that.
Comment 5•2 years ago
|
||
Related Code: startSharing and download
The main issue is when timeout (1000ms) , FileOutputStream(tempFile).use { output -> input.copyTo(output) } is not cancelled.
I have no idea why withTimeout not take effect.
Replace scope?.launch(coroutineExceptionHandler) to scope?.lauch(Dispatchers.IO) can prevent ANR but there's no exception throw and this block of code may still running.
Some related kotlin issue withTimeout does not work with CoroutineExceptionHandler?
Comment 6•2 years ago
|
||
this block of code may still running.
Besides, this image also bypass WebResponse's default read timeout (setReadTimeoutMillis(DEFAULT_READ_TIMEOUT_MS)) . It always transmits 1 or 2 bytes in a 30s period (DEFAULT_READ_TIMEOUT_MS=30000L).
Description
•