PDF content uri cannot be used in an isolated process
Categories
(GeckoView :: General, defect, P3)
Tracking
(firefox143 fixed)
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | fixed |
People
(Reporter: calixte, Assigned: m_kato)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid] [geckoview] )
Attachments
(2 files)
11-14 11:15:42.339 E/ContentInputStream( 6802): Cannot read the uri: content://org.mozilla.geckoview.test.provider/pdf
11-14 11:15:42.339 E/ContentInputStream( 6802): java.lang.SecurityException: Isolated process not allowed to call getContentProvider
11-14 11:15:42.339 E/ContentInputStream( 6802): at android.os.Parcel.readException(Parcel.java:1683)
11-14 11:15:42.339 E/ContentInputStream( 6802): at android.os.Parcel.readException(Parcel.java:1636)
11-14 11:15:42.339 E/ContentInputStream( 6802): at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:4169)
11-14 11:15:42.339 E/ContentInputStream( 6802): at android.app.ActivityThread.acquireProvider(ActivityThread.java:5434)
11-14 11:15:42.339 E/ContentInputStream( 6802): at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2267)
11-14 11:15:42.339 E/ContentInputStream( 6802): at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1515)
11-14 11:15:42.339 E/ContentInputStream( 6802): at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1129)
11-14 11:15:42.339 E/ContentInputStream( 6802): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:982)
11-14 11:15:42.339 E/ContentInputStream( 6802): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:905)
11-14 11:15:42.339 E/ContentInputStream( 6802): at org.mozilla.geckoview.ContentInputStream.isReadable(ContentInputStream.java:123)
11-14 11:15:42.339 E/ContentInputStream( 6802): at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
11-14 11:15:42.339 E/ContentInputStream( 6802): at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:659)
Updated•2 years ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 1•1 year ago
•
|
||
I'll start investigating this.
Recently locally tested w/isolated processes on:
org.mozilla.geckoview.test.PdfCreationTest#saveAContentPdfDocumentorg.mozilla.geckoview.test.PdfCreationTest#dontTryToOpenNullContent- Appears fixed locally, I'll open and test on CI w/other test
Log:
04-18 12:17:41.013 6020 6045 D ContentInputStream: The uri is readable: content://org.mozilla.geckoview.test.provider/pdf
04-18 12:17:41.019 6061 6077 E ContentInputStream: Cannot read the uri: content://org.mozilla.geckoview.test.provider/pdf
04-18 12:17:41.019 6061 6077 E ContentInputStream: java.lang.SecurityException: Isolated process not allowed to call getContentProvider
Relevant lines:
I think some Android function in those referenced lines is indirectly is calling getContentProvider right now, I'll see if I can narrow down the caller.
Comment 2•1 year ago
|
||
Read the full stack:
04-18 13:09:08.187 8189 8205 E ContentInputStream: Cannot read the uri: content://org.mozilla.geckoview.test.provider/pdf
04-18 13:09:08.187 8189 8205 E ContentInputStream: java.lang.SecurityException: Isolated process not allowed to call getContentProvider
04-18 13:09:08.187 8189 8205 E ContentInputStream: at android.os.Parcel.readException(Parcel.java:1683)
04-18 13:09:08.187 8189 8205 E ContentInputStream: at android.os.Parcel.readException(Parcel.java:1636)
04-18 13:09:08.187 8189 8205 E ContentInputStream: at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:4169)
04-18 13:09:08.187 8189 8205 E ContentInputStream: at android.app.ActivityThread.acquireProvider(ActivityThread.java:5434)
04-18 13:09:08.187 8189 8205 E ContentInputStream: at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2267)
04-18 13:09:08.187 8189 8205 E ContentInputStream: at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1515)
04-18 13:09:08.187 8189 8205 E ContentInputStream: at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1129)
04-18 13:09:08.187 8189 8205 E ContentInputStream: at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:982)
04-18 13:09:08.187 8189 8205 E ContentInputStream: at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:905)
04-18 13:09:08.187 8189 8205 E ContentInputStream: at org.mozilla.geckoview.ContentInputStream.isReadable(ContentInputStream.java:139)
04-18 13:09:08.187 8189 8205 E ContentInputStream: at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
04-18 13:09:08.187 8189 8205 E ContentInputStream: at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:498)
It is openAssetFileDescriptor that needs a workaround.
Comment 3•1 year ago
|
||
- PdfCreationTest#dontTryToOpenNullContent appears to be working for
isolated process.
| Assignee | ||
Comment 4•1 year ago
|
||
It is openAssetFileDescriptor that needs a workaround.
This channel isn't e10s compatible. getContentProvider should be called on chrome process. I think we must have IPC for geckoview content channel like bug 1666725 (this issue is for GIOChannel. Linux's content process is under sandbox.)
Updated•1 year ago
|
Comment 6•1 year ago
|
||
Thanks for identifying the root cause, m_kato! I'll pass this bug on to you - thanks for offering. The bug is more complicated than I was expecting.
Comment 7•1 year ago
|
||
| bugherder | ||
| Assignee | ||
Comment 9•1 year ago
|
||
| Assignee | ||
Comment 10•1 year ago
|
||
GeckoViewContentChannel runs on content process, so this doesn't work
with isolated process. So we should add the IPC to handle this channel
on parent process.
Comment 11•1 year ago
|
||
Comment 12•1 year ago
|
||
| bugherder | ||
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Description
•