[Android][Intercom SDK - 15.9.0] PdfRender crash | Community
Skip to main content

I want to report an issue we have encountered with the Intercom SDK on Android. When a user attempts to open a password-protected PDF sent by the support team, the application crashes with the following error:

Fatal Exception: java.lang.SecurityException: password required or incorrect password
       at android.graphics.pdf.PdfRenderer.nativeCreate(PdfRenderer.java)
       at android.graphics.pdf.PdfRenderer.<init>(PdfRenderer.java:172)
       at io.intercom.android.sdk.ui.preview.ui.PreviewUriKt$loadFilesAsBitmaps$1.invokeSuspend(PreviewUri.kt:269)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
       at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
       at androidx.compose.ui.platform.AndroidUiDispatcher.access$setScheduledFrameDispatch$p(AndroidUiDispatcher.android.kt:41)
       at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
       at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57)
       at android.os.Handler.handleCallback(Handler.java:958)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:230)
       at android.os.Looper.loop(Looper.java:319)
       at android.app.ActivityThread.main(ActivityThread.java:8919)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

This issue occurs specifically when trying to open a password-protected PDF file.

Intercom SDK version: 15.9.0

I would appreciate your investigating this issue and providing a fix or workaround. Please let me know if you need any additional information or logs, and I will be happy to provide them.

Hi It’s Mat from the Support Engineering Team 😀

Can you please upgrade your SDK to the latest version 15.10.1 and check if that does the trick please?


Hi @mateusz.leszkiewicz, I updated to version 15.10.1 but the application still crashes.

java.lang.SecurityException: password required or incorrect password
at android.graphics.pdf.PdfRenderer.nativeCreate(Native Method)
at android.graphics.pdf.PdfRenderer.<init>(PdfRenderer.java:172)
at io.intercom.android.sdk.ui.preview.ui.PreviewUriKt$loadFilesAsBitmaps$1.invokeSuspend(PreviewUri.kt:269)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@5076c91, androidx.compose.runtime.BroadcastFrameClock@6397f6, StandaloneCoroutine{Cancelling}@f8d7f7, AndroidUiDispatcher@bcb6664]

 


Hi there,

I’ve created an Intercom conversation for you. Our engineers will take over from here to investigate the issue, please continue this thread there.


Hi, any news here?


@Cristi Constantin 

I can see that your issue has been picked up by Jacques and resolved already.


Hi, we are still experiencing this issue in SDK version 15.13.0:

Fatal Exception: java.lang.SecurityException: Password required to access document
at android.graphics.pdf.PdfProcessor.create(PdfProcessor.java:145)
at android.graphics.pdf.PdfRenderer.<init>(PdfRenderer.java:197)
at io.intercom.android.sdk.ui.preview.ui.PreviewUriKt$loadFilesAsBitmaps$1.invokeSuspend(PreviewUri.kt:269)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$setScheduledFrameDispatch$p(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57)
at android.os.Handler.handleCallback(Handler.java:995)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:248)
at android.os.Looper.loop(Looper.java:338)
at android.app.ActivityThread.main(ActivityThread.java:9067)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:932)

I can’t see any mention of a fix for this in the release notes since this version.


Hey ​@Stuart Foulston

 

Version 15.13.0 is quite an old version of the Android SDK, we are currently on 17.1.1. Could you try and update to a newer version to see if this issue has since been resolved? We don’t always mention every fix in the release notes so this may have since been released.

 

Can you try updating and if you continue to have issues it might be a good idea to write into our team directly for further assistance ☺️