Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Catch unhandled URISyntaxException when parsing URLs for UA override. Fixes #848 #857

Merged
merged 1 commit into from
Nov 27, 2018

Conversation

bluemarvin
Copy link
Contributor

No description provided.

@bluemarvin bluemarvin requested a review from cvan November 27, 2018 18:26
Copy link
Contributor

@cvan cvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still get a crash when I load JavaScript: (0) (https://webxr.sh/javascript-url) or when I click the hamburger nav on https://amazon.com

https://gist.github.com/cvan/302b10d09e8a39c5b3e11d021750d068

11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1 ("main")
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: java.net.URISyntaxException: Illegal character in opaque part at index 11: javascript: void(0)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at java.net.URI$Parser.fail(URI.java:2856)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at java.net.URI$Parser.checkChars(URI.java:3029)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at java.net.URI$Parser.parse(URI.java:3066)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at java.net.URI.<init>(URI.java:590)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at java.net.URI.create(URI.java:852)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at org.mozilla.vrbrowser.browser.UserAgentOverride.lookupOverride(UserAgentOverride.java:46)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at org.mozilla.vrbrowser.browser.SessionStore.onLoadRequest(SessionStore.java:949)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at org.mozilla.geckoview.GeckoSession$3.handleMessage(GeckoSession.java:452)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at org.mozilla.geckoview.GeckoSession$3.handleMessage(GeckoSession.java:402)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at org.mozilla.geckoview.GeckoSessionHandler.handleMessage(GeckoSessionHandler.java:79)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at org.mozilla.gecko.EventDispatcher$3.run(EventDispatcher.java:356)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at android.os.Handler.handleCallback(Handler.java:751)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at android.os.Handler.dispatchMessage(Handler.java:95)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at android.os.Looper.loop(Looper.java:154)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at android.app.ActivityThread.main(ActivityThread.java:6143)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at java.lang.reflect.Method.invoke(Native Method)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
11-27 17:12:14.388 23464 23464 E GeckoCrashHandler: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

@cvan cvan added P1 Fix in the current development iteration crash 🔥 i.e. severity=critical: crashes, loss of data, severe memory leak labels Nov 27, 2018
@cvan cvan added this to the v1.1 milestone Nov 27, 2018
@bluemarvin
Copy link
Contributor Author

@cvan I can tell from the call stack that you aren't testing with my fix.

Copy link
Contributor

@cvan cvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bluemarvin heh, I should've known better. you're 💯 totally right.

I made sure I'm on the correct commit (b631c30), and the crash is fixed 👍

@bluemarvin bluemarvin merged commit c5f1b17 into master Nov 27, 2018
@bluemarvin bluemarvin deleted the ua-crash branch November 27, 2018 23:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crash 🔥 i.e. severity=critical: crashes, loss of data, severe memory leak P1 Fix in the current development iteration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants