Skip to main content
Answered

Fatal Exception: java.net.MalformedURLException: no protocol

  • October 21, 2024
  • 1 reply
  • 132 views


We are experiencing a few crashes with the following exception on Intercom Android SDK 15.10.13. 

Fatal Exception: java.net.MalformedURLException: no protocol: 
       at java.net.URL.<init>(URL.java:601)
       at java.net.URL.<init>(URL.java:498)
       at java.net.URL.<init>(URL.java:447)
       at io.intercom.android.sdk.ui.preview.viewmodel.PreviewViewModel.prepareBitmap(PreviewViewModel.kt:275)
       at io.intercom.android.sdk.ui.preview.viewmodel.PreviewViewModel.access$get_state$p(PreviewViewModel.kt:35)
       at io.intercom.android.sdk.ui.preview.viewmodel.PreviewViewModel.access$prepareBitmap(PreviewViewModel.kt:35)
       at io.intercom.android.sdk.ui.preview.viewmodel.PreviewViewModel$saveImage$1.invokeSuspend(PreviewViewModel.kt:89)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
       at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.java:111)
       at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
       at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:584)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)
        

Best answer by Jacques Reynolds

Hey @Muneeb 👋 Jacques here from support engineering.

The error java.net.MalformedURLException: no protocol typically indicates that a URL is missing its protocol (e.g., http:// or https://). In this case, it seems that the PreviewViewModel in the Intercom SDK is attempting to process a URL, but it’s encountering a malformed or incomplete URL, leading to the crash.

The first thing to check here would be the URL Inputs. If you are using any custom image URLs or other URLs in your app that are passed to the Intercom SDK, ensure they include the protocol (http:// or https://). If possible, add a check before passing URLs to verify their completeness and correct format.

If the issue persists, then I would recommend reaching out to our support team via the Messenger so that they can dive deeper into this issue. There might be some configuration issues in your app or this could be a bug so we would need to dig into this a bit to find the cause.

View original
Did this topic help you find an answer to your question?

1 reply

Jacques Reynolds
Intercom Team
Forum|alt.badge.img+4

Hey @Muneeb 👋 Jacques here from support engineering.

The error java.net.MalformedURLException: no protocol typically indicates that a URL is missing its protocol (e.g., http:// or https://). In this case, it seems that the PreviewViewModel in the Intercom SDK is attempting to process a URL, but it’s encountering a malformed or incomplete URL, leading to the crash.

The first thing to check here would be the URL Inputs. If you are using any custom image URLs or other URLs in your app that are passed to the Intercom SDK, ensure they include the protocol (http:// or https://). If possible, add a check before passing URLs to verify their completeness and correct format.

If the issue persists, then I would recommend reaching out to our support team via the Messenger so that they can dive deeper into this issue. There might be some configuration issues in your app or this could be a bug so we would need to dig into this a bit to find the cause.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings