-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
uBlock Origin breaks custom toolbars in Palemoon #1004
Comments
Unable to reproduce. Any error message in the browser console? Also I can't make sense of Moonchild's comment, uBO does not block chrome elements, it blocks HTTP requests or hide DOM elements on |
Closed by mistake clicking wrong button. |
today during my free time off and on I had the chance to test it on a handful of computers I have access to. I could successfully reproduce the problem on 2 of the Win7 machines as well as the Win2012R2 machine. I could not reproduce it on the 3rd Win7 machine. the curious part is that the machine i could NOT reproduce the problem on is the only machine NOT using an SSD. will test more when I have time and note the contents of the browser console. |
I have an SSD -- but I am using linux. Again, when the issue occurs: any error message in the browser console? |
Maybe you could give a try with latest dev build, |
I have the same problem (I think). I use Firefox ESR 38.4.0 on Linux, and when I enabled uBlock, it erased 3 custom toolbars. It wouldn't be such a problem if Firefox hadn't removed the ability to make custom toolbars now (or maybe I'm missing something in the Customize editor?). They reappeared after I disabled uBlock. You might have to try a Firefox version before they added the new weird toolbar Customize editor, as the only custom toolbars seem to be the ones lingering from previous versions. :( |
my apologies for not mentioning I was using windows in my very first post. this time around I installed uBlock Origin 1.3.6 in Palemoon 25.8.1 (x64) on Win7 (x64) just finished up some testing, to get the error console to log to file i installed an addon called Issuereporter. i set the addon up for the constant logging feature and it created a new HTML log file every time the browser was started and stopped. I collected, numbered and labelled about a dozen relevant log HTML files and uploaded them here: not sure how useful these will be as they seem a bit sparse. will look for a better browser console to log file addon/method/feature/etc, if you know of one please do tell, i couldn't readily find one EDIT: added more test results |
First thing that should be addressed is that Pale Moon fixes the following issue, which causes an error message in your console, line 200 in
The fact that you said it does not happen with your version on a computer without an SSD suggests there is a timing issue. Apparently the line above expects the |
I fixed a case of |
added another 1/2 dozen logs where the location bar is missing and ublock is active, all files prefixed with 10. all the new logs look the same aside from timestamps. that's the thing though, once the bar is gone the bar is gone until I disable ublock and restart the browser, upon restart the location bar comes back, then a few restarts later the location bar disappears again. will install the latest dev build and test later before bed. |
@MajorLunaC Are you using the legacy toolbar button? See in |
The two following errors are reported in your logs for every time you say the URL bar is gone:
At line 200 of uBO does modify some user prefs at start, to enforce the disabling of IP address leakage through WebRTC, network prefetchnig etc. So it appears this could trigger the above listener where Moonchild answer's to your report are not encouraging. Somehow he did notice some entries about uBO -- those are probably inconsequential as they occur at shutdown time, but yet failed to note the most interesting ones, the one related to the URL bar. The file |
I'm not sure why, but I can no longer reproduce the lost toolbars issue (1-time or 2-time thing!?). extensions.ublock0.forceLegacyToolbarButton is false, but toggling it and restarting firefox did not change anything. As a side-note, it does seem Firefox removed the "Add New Toolbar" button, so I used "Classic Theme Restorer" addon to allow more customization, including adding new toolbars. There have been no issues related to uBlock now. |
This what MC said:
Maybe this help @gorhill and @drivetheory? |
No. I reviewed the toolbar button code again today, line by line, and there is nothing left to explain the custom toolbar disappearing. So I will leave this as is. Personally I am currently assuming there is an issue specific to Pale Moon, and I won't spend any more time on my side about this -- especially given the flippant response from Pale Moon developer. |
Hey @gorhill: I was the one who suggested to him that you might be a little irritated with his response, so don't blame MC, blame me for his response back. And ok I was just trying to help you guys communicate better, but alright. |
Of course not. What I was expecting is some technical feedback as to why the uBlock does not remove anything from toolbars, it just inserts itself onto whatever toolbar the user wants it to be, nothing more, so I fail to see how the Pale Moon element On the other hand I don't think there were any tests using this change here, since only @drivetheory can reproduce the issue only him can tell whether this makes a difference or not. |
Well I don't much about coding, but I'm pretty sure you are correct that Firefox/Pale Moon automatically removes empty toolbars if a toolbar has only the url bar element and it is not present, the toolbar will be removed. Yeah I also can't reproduce this issue either, so we're just waiting on @drivetheory to confirm anything. Hey @wolfbeast can gives us some more insight this, what do you say MC? |
sorry for the late reply, didn't have anytime to myself this weekend... installed the latest dev build of ublock origin. added 2 more log files as 11 (working) & 12 (toolbar gone). will try to do some testing on my 2012R2 box tomorrow so that there's another set of results. and, again, if you know of a better logging method i could use please feel free to suggest it. EDIT: server wasn't in use so i messed around a bit before bed using dev build of ublock origin, posted results in .\2012R2 and if the toolbar was missing the file names got appended with "(missing)" EDIT 2: I also added the activity indicator to the same toolbar as the URL bar so that there were 2 components, both went missing and the toolbar disappeared. |
I carefully reloaded all the logs, and the first error occurring which is common to all the ones where the toolbar is missing is:
Still this does not provide any clue as to what causes this. So given this, I have to consider this issue unresolvable, unless someone comes with useful information eventually. Someone mentioned on the Pale Moon forum to get a similar issue, and found that installing Pale Moon 25.8.0 the issue disappeared, might be worth giving this a try. Sorry that I could not be of any help. |
Finally, out of nowhere I reproduce the issue, my URL bar is gone, with similar error messages in the browser console:
|
I've narrowed the issue to one single instruction: merely looking up The mere lookup of the
= Custom bar does not appear. While:
= Custom bar does appear. The issue started to be completely reproducible on my side after I decided to re-factor a little section of code which is not critical to be executed at launchtime, in order to defer the execution and hence remove a bit of overhead from uBO launch time. So something is occurring in the Pale Moon |
I'll have a look at the code involved, but the getter for gBrowser is stable code that has not been touched in... forever. It makes very little sense, but if it's an issue then it may be something caused by timing changes in the browser (potentially because of removing Mozilla telemetry or the likes speeding things up). Probably an inherited issue with touchy code that never hit a snag at Mozilla. Thanks for narrowing this down to the getter; without the specifics in this issue this would never have been pinpointed sufficiently to have a clear understanding where to look. As for the padlock code: that makes perfect sense to throw; if the element isn't there because the toolbar isn't there, then the padlock code will throw when trying to set attributes. Doesn't mean the padlock code is at fault, just means it can't access what it expects to always be there. EDIT: I had a look at the browser.js init code and win.gBrowser's getter (and setter) is initialized first thing, right at the top of the browser code. |
Oh silly me, I forgot that it's not an issue for Firefox any longer because custom toolbars don't exist anymore. As the credo goes: "Removed code is debugged code". I've been able to reproduce this issue with 1.3.6 also on the latest Goanna trunk builds of Pale Moon, so it's not a fluke of a single build. Not that I have been able to find a way around it, yet, or even an idea how to avoid this issue. I hope you don't mind keeping this hack in place for a while. |
Isn't a fault to try to access the URL bar without first checking if it's there? The unhandled exception in there cause the javascript execution to abort -- leaving exceptions unhandled does not sound like a good approach to me. For example, should an exception be thrown at line 200, this means the preferences observer won't be installed, I am pretty sure this is not the intended behavior. If you look in |
You're absolutely correct that the padlock code should check if the element is present before trying to change it. But, it's the other way around. It fails to check (which I've since corrected, actually, in a commit today) if the URL bar exists before using it, so the overlaid functions to set properties fail (which won't influence the browser's core scripting otherwise). That doesn't influence the toolbar being present or not, it just means that it is a symptom of the toolbar not being there. I've tested this as well by putting it in try/catch blocks in a built version, which prevents the errors, but makes no difference as far as uBlock Origin making the custom toolbar disappear as well as causing issues with lightweight themes when there's a low latency. I have to ask though, at what point in the browser's startup do you inject your code? Are you directly tying it into the appshell or something? (If that's the case, then please understand that things simply won't be guaranteed to be ready, including gBrowser and other globals, and there's very little I can do about changing that without completely rewriting the structure of the browser xul/core js, which I'm not going to do). |
Ok I see. So things are more complicated internally and I get that starting to touch all this is to be avoided. uBO is a bootstrapped extension, so its code starts to execute whenever the browser calls the The current workaround in uBO is trivial enough, I don't mind keeping it around -- it comes with a large notice explaining the purpose -- and it might end up also addressing whatever other difficult to reproduce issues which may have been reported for other flavor of FF browsers. |
I've researched this some more, and as far as I can gather, it may be a result of Mozilla's obsession with startup telemetry and shaving off as many ms as they can, and doing as much async and lazily as possible. From what I have been able to gather thus far from the behavior seen, it's a problem that the getter gets called by your startup script while it is already in the process of being gotten and filled, so it'd be a kind of race condition, or rather overlapping getter calls, clearing and re-getting the object from the call from uBO which breaks previously initialized code by removing the global object to repopulate it (as a "smart" getter does). Highly timing sensitive, and predictably hard to reproduce unless the conditions are just right. Also seems we're not the only ones having issues with this kind of thing. While investigating, I also ran across a SeaMonkey bug on Bugzilla dealing with something very, very similar. I do think your current workaround would avoid similar issues in other Mozilla-based browsers. It's likely a good idea to keep it in place to avoid these issues. |
FYI, something else to keep in mind: https://bugzilla.mozilla.org/show_bug.cgi?id=1161538 --- Comment 6 from Philip Chee 2015-12-10 14:25:27 PST --- |
Only problem is that |
Awesome then! I'm sure everyone running into this will be thankful :) |
uBlock Origin 1.3.4, 1.3.5, 1.3.6, 1.3.7 (dev build)
Palemoon 25.8.1 (x64)
my testing method
i also posted this on the Palemoon forum to which the developer did repsond.
http://forum.palemoon.org/viewtopic.php?f=15&t=10352
The text was updated successfully, but these errors were encountered: