New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 797479 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

[Restrict-View-Google] Chrome app crashes

Project Member Reported by twinkl...@samsung.com, Dec 23 2017

Issue description

Chrome Version: 62.x
OS:8.0

What steps will reproduce the problem?
(1)Go to Apps --> Open Chrome.
(2)Download any image
(3)In Recent Apps, swipe to left or right to close Google Chrome app
(4)Swipe down to open notification panel and click on downloaded image.

What is the expected result?
The image should open properly and no crash is expected.

What happens instead?
Chrome crashes.
 
dumpState_G950USQU2ZQLB_201712210847.zip
4.5 MB Download
Crash Observed:-
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime: Process: com.android.chrome, PID: 14995
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at android.os.AsyncTask$3.done(AsyncTask.java:353)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at java.util.concurrent.FutureTask.run(FutureTask.java:271)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:764)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime: Caused by: android.os.FileUriExposedException: file:///storage/emulated/0/Download/images%20(3).jpeg exposed beyond app through ClipData.Item.getUri()
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at android.os.StrictMode.onFileUriExposed(StrictMode.java:1958)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at android.net.Uri.checkFileUriExposed(Uri.java:2348)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at android.content.ClipData.prepareToLeaveProcess(ClipData.java:944)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at android.content.Intent.prepareToLeaveProcess(Intent.java:10480)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at android.content.Intent.prepareToLeaveProcess(Intent.java:10465)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at android.app.PendingIntent.getActivity(PendingIntent.java:345)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at android.app.PendingIntent.getActivity(PendingIntent.java:307)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at org.chromium.chrome.browser.download.DownloadUtils.getMediaViewerIntentForDownloadItem(DownloadUtils.java:170)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at org.chromium.chrome.browser.download.DownloadManagerService.getLaunchIntentFromDownloadId(DownloadManagerService.java:372)
12-21 08:46:50.742 10118 14995 15059 E AndroidRuntime:    at org.chromium.chrome.browser.download.DownloadManagerService$2.doInBackground(DownloadManagerService.java:13) 
Cc: sandeepkumars@chromium.org
Labels: Needs-triage-Mobile Triaged-Mobile Needs-Feedback
Tested the issue in Android and could not reproduce the issue. No Crash is observed 

Steps Followed:
1. Launched Browser
2. Downloaded image
3. In Recent Apps, swiped to left to close Google Chrome app
4. Swiped down to opened notification panel and clicked on downloaded image.
5. Able to open the image and No Crash is observed 

Chrome versions tested:
63.0.3239.111

OS
Android 7.0.0

Android Devices
7.0.0; SM-J710F Build/NRD90M

@twinkle: Could you please update your Chrome to the latest version #63.0.3239.111, since you're using M62 and also help us with OS & details of your device and a Crash I'd from chrome://crashes if you still reproduce the issue in latest?

Thanks!!

Comment 3 by cmasso@google.com, Jan 25 2018

Components: UI>Browser>Downloads
Labels: -Pri-3 M-66 Pri-2
Owner: qin...@chromium.org
Status: Assigned (was: Untriaged)

Comment 5 by qin...@chromium.org, Jan 25 2018

I am not able to repro this on my nexus 6P android 8.0 with latest trunk build. Chrome passes a content URI to the customtab, and I don't see the FileUri being used.



01-25 14:54:42.585  4229  3689 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.google.android.apps.chrome.FileProvider/downloads/download.jpeg flg=0x10000000 pkg=com.google.android.apps.chrome cmp=com.google.android.apps.chrome/org.chromium.chrome.browser.document.ChromeLauncherActivity (has extras)} from uid 10107
01-25 14:54:42.653  7139  7139 I cr_InstantAppsHandler: Not handling with Instant Apps (other)
01-25 14:54:42.670  4229  4469 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=customtab://fd9e9bba-d6e1-4939-ba08-27bcab5c54b2?content://com.google.android.apps.chrome.FileProvider/downloads/download.jpeg flg=0x18080000 pkg=com.google.android.apps.chrome cmp=com.google.android.apps.chrome/org.chromium.chrome.browser.customtabs.SeparateTaskCustomTabActivity (has extras)} from uid 10107

Issue is not occurring in 64.x chrome version.It seems that it has been fixed in latest version.Thanks for the analysis.

Updated logs and video
20181129_100658_576x324.mp4
18.1 MB Download
dumpsstate.7z
8.4 MB Download
We can see a FileUriExposedException when downloading images from chrome to SDCard.
The logs and video is attached in comment 7.

11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: FATAL EXCEPTION: CrAsyncTask #4
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: Process: com.android.chrome, PID: 27309
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at aoP.done(SourceFile:15)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at java.util.concurrent.FutureTask.run(FutureTask.java:271)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:764)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: Caused by: android.os.FileUriExposedException: file:///storage/724E-59EE/Android/data/com.android.chrome/files/Download/_104518356_fellanin_getty.jpg exposed beyond app through ClipData.Item.getUri()
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at android.os.StrictMode.onFileUriExposed(StrictMode.java:1978)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at android.net.Uri.checkFileUriExposed(Uri.java:2371)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at android.content.ClipData.prepareToLeaveProcess(ClipData.java:966)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at android.content.Intent.prepareToLeaveProcess(Intent.java:10889)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at android.content.Intent.prepareToLeaveProcess(Intent.java:10874)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at android.app.PendingIntent.getActivity(PendingIntent.java:350)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at android.app.PendingIntent.getActivity(PendingIntent.java:312)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at aUz.a(SourceFile:19)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at org.chromium.chrome.browser.download.DownloadManagerService.a(SourceFile:381)
11-29 09:53:04.148 10160 27309 27346 E AndroidRuntime: 	at org.chromium.chrome.browser.download.DownloadManagerService.a(SourceFile:389)
Cc: qin...@chromium.org
Owner: xingliu@chromium.org

Sign in to add a comment