Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Crash IllegalArgumentException: Unsupported URI scheme when downloading icon #7142

Closed
ekager opened this issue May 28, 2020 · 2 comments · Fixed by #7160
Closed

Crash IllegalArgumentException: Unsupported URI scheme when downloading icon #7142

ekager opened this issue May 28, 2020 · 2 comments · Fixed by #7160
Assignees
Labels
💥 crash E5 Estimation points: 5 <fetch> Components: concept-fetch, lib-fetch-httpurlconnection/okhttp/geckoview, tooling-fetch-tests <icons> Components: ui-icons, browser-icons

Comments

@ekager
Copy link
Contributor

ekager commented May 28, 2020

Originally reported here: mozilla-mobile/fenix#10880

Steps to reproduce

Visit https://www.gruppoapi.com/ricerca-stazioni-servizio

2020-05-27 20:00:14.677 9383-9590/org.mozilla.fenix.debug D/HttpIconLoader: IllegalArgumentException while trying to download icon resource https://www.gruppoapi.com/ricerca-stazioni-servizio/images/logo-gruppoapi-shared.png

java.lang.IllegalArgumentException: Unsupported URI scheme
    at org.mozilla.geckoview.GeckoWebExecutor.fetch(GeckoWebExecutor.java:128)
    at mozilla.components.browser.engine.gecko.fetch.GeckoViewFetchClient.fetch(GeckoViewFetchClient.kt:64)
    at mozilla.components.browser.icons.loader.HttpIconLoader.load(HttpIconLoader.kt:54)
    at mozilla.components.browser.icons.BrowserIconsKt.load(BrowserIcons.kt:276)
    at mozilla.components.browser.icons.BrowserIconsKt.access$load(BrowserIcons.kt:1)
    at mozilla.components.browser.icons.BrowserIcons.loadIconInternal(BrowserIcons.kt:127)
    at mozilla.components.browser.icons.BrowserIcons.access$loadIconInternal(BrowserIcons.kt:77)
    at mozilla.components.browser.icons.BrowserIcons$loadIcon$1.invokeSuspend(BrowserIcons.kt:110)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:919)

I confirmed catching the IllegalArgumentException in HttpIconLoader fixes this, which we should probably do because crashing on fetching icons seems silly, but I thought this was interesting to bring up before catching it because it's unclear to me why this website would be an Unsupported URI scheme.

┆Issue is synchronized with this Jira Task

@ekager ekager added <icons> Components: ui-icons, browser-icons <fetch> Components: concept-fetch, lib-fetch-httpurlconnection/okhttp/geckoview, tooling-fetch-tests 💥 crash labels May 28, 2020
@Amejia481 Amejia481 self-assigned this May 28, 2020
@Amejia481
Copy link
Contributor

Amejia481 added a commit to Amejia481/android-components that referenced this issue May 28, 2020
@Amejia481 Amejia481 added the E3 Estimation points: 3 label May 28, 2020
@Amejia481
Copy link
Contributor

Amejia481 added a commit to Amejia481/android-components that referenced this issue Jun 1, 2020
Amejia481 added a commit to Amejia481/android-components that referenced this issue Jun 1, 2020
@Amejia481 Amejia481 added this to the 44.0.0 milestone Jun 1, 2020
@Amejia481 Amejia481 linked a pull request Jun 1, 2020 that will close this issue
4 tasks
@pocmo pocmo modified the milestones: 44.0.0, 45.0.0 Jun 2, 2020
@Amejia481 Amejia481 added E5 Estimation points: 5 and removed E3 Estimation points: 3 labels Jun 3, 2020
bors bot pushed a commit that referenced this issue Jun 3, 2020
7160:  Closes #7142: Sanitize url in HttpIconLoader  r=pocmo a=Amejia481



Co-authored-by: Arturo Mejia <[email protected]>
bors bot pushed a commit that referenced this issue Jun 3, 2020
7160:  Closes #7142: Sanitize url in HttpIconLoader  r=pocmo a=Amejia481



7196: Closes #7176: Add to the configuration file for instrumentation tests components that use Room r=gabrielluong,pocmo,isabelrios a=Amejia481

Closes #7176


Co-authored-by: Arturo Mejia <[email protected]>
@bors bors bot closed this as completed in 98158c8 Jun 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💥 crash E5 Estimation points: 5 <fetch> Components: concept-fetch, lib-fetch-httpurlconnection/okhttp/geckoview, tooling-fetch-tests <icons> Components: ui-icons, browser-icons
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants