-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uBlock crashes on browser startup if Chromium is compiled without webrtc #533
Comments
This needs to be reported to Chromium devs. uBlock is written in javascript, and it's not supposed to crash -- if a crash occurs due to specific javascript code, it's a browser bug. (By "crash" I am assuming you refer to the "aww snap!" screen.) |
If that's the case I'll report it there — I know too little about Chromium to tell which component is at fault. By "crash" I mean this popup on start or on reloading the extension: And this is what I get in the terminal:
|
Yes, that balloon indicates a browser crash. Is this your own build of Chromium? If not, what is the origin of that special build? (Just want to understand how much people are possibly affected by this.) |
It's a build called "Inox": https://bbs.archlinux.org/viewtopic.php?id=198763 |
I do test here if the WebRTC preference exists in the browser. However I wonder if Since your first comment suggests you modified uBlock, would you mind changing the line above from:
To:
And see if this helps? |
Unfortunately it doesn't help, still crashes with the same symptoms. |
I thought the long-time idiom for testing non-function objects was |
Confirm. Same '-Denable_webrtc=0' :/ |
If you type typeof webkitRTCPeerConnection (or |
I get:
|
Can confirm this problem when compiling chromium without webrtc. The fix from lsfxz works for me. |
I am running Chromium 47.0.2526.80 with Creating an instance of Additionally, the Using this, the following code fixes the problem for version 1.4.0, file
If you don't want to instantiate an instance of webkitRTCPeerConnection, you can also pass in an empty Object into the constructor. Then a TypeError will be thrown instead. |
Thank you very much for the solution, I will import it. An empty object works fine on my side, including |
I also have a build of Chromium 41.0.2272.118 with WebRTC enabled. Using an empty object raises a |
I can confirm the 1.4.1b1 release resolves this issue on OpenBSD |
1.4.1b1 resolves this issue for Inox compiled with enable_webrtc=0 (tested on Arch Linux). |
There are bad side-effects to this fix, as reported in the Chrome store:
And:
For now I will disable this fix and publish a 1.5.2 version to the Chrome store -- the side effects are too serious and affect way more users than those suffering the crash. |
Thanks for the quick revert on this. I'm the first post about this in the Chrome store. Glad to see someone else noticed the same behavior too so it's not just a quirk of my setup or something. Something I've also just noticed is that if I disable uBo (1.5.1 still) then re-enable it I see the hung WebRTC connection. Clicking into the uBo options menu then clears the open connection and everything continues working well going forward. |
I pushed 1.5.2 to the Chrome store, but as usual it end up being in "Pending review" status, so hopefully it will be cleared tomorrow.
Maybe the solution can work but this will need more tuning/testing. When you say "clicking into the uBo options menu", do you mean toggling the option "Prevent WebRTC from leaking local IP addresses"? |
Sorry for being unclear. No, I mean from the chrome://extensions screen I don't even toggle any settings after that point, simply having the I can try to capture a video or something tomorrow if it would help to
|
Using 1.5.1 on Chrome 41.0.2272.118, I went to So, I came up with a solution to work-around this problem. When the browser is compiled without WebRTC, passing in an empty object into the constructor will cause a So here's the new solution:
With this change, no WebRTC connection will be created. |
If I use the dev console of a web page (the current one in my case), and call
|
Well I suppose I could test whether WebRTC is supported from within a temporary The unused connection above disappears when I close the dev console in which it was created. |
You're right. Testing for WebRTC support in a temporary Here's the code for the
|
I would like to have feedback about the latest fix, to confirm that ...
Fix available in latest dev build. |
1.5.3b2 solves the problem on OpenBSD, I can test some other platforms later today. |
code review: avoid special WebRTC test for non-Chromium browsers (gorhill#533)
uBlock crashes on startup if you try to load it with a Chromium version that's compiled without webrtc support ( -Denable_webrtc=0 ).
Removing
'webrtcIPAddress': !userSettings.webrtcIPAddressHidden
from start.js makes it work again so I guess that's roughly where things go wrong.The text was updated successfully, but these errors were encountered: