AMO's UA override stops working if 'Browsing & Download History' is cleared on exit Topic is solved

This board is for discussions, bug reports, etc. for pre-releases of the v27 milestone codenamed "Tycho".

Since the beta phase is over, this board is closed for new posts/topics.
coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

AMO's UA override stops working if 'Browsing & Download History' is cleared on exit

Unread post by coffeebreak » 2016-07-24, 16:38

If 'Browsing & Download History' is cleared on exit, after restart AMO (addons.mozilla.org) stops using the alpha's hard-coded user agent override, but instead appears to use its general UA.

As a consequence 1) if FF compatibility is "OFF" AMO displays the extra-large green buttons that say: "Only with Firefox -- get Firefox now!" and redirect you to download FF; 2) but if FF compatibility is "ON" AMO treats v27 as if it were FF 38.

This only happens when sanitizing on exit -- Not when clearing recent history -- And it returns to normal if the browser is restarted again with 'Browsing & Download History' deselected (until next time browsing/download history is cleared on exit). Also, I have only observed this on AMO. I did check a couple of other sites for which I'd added overrides and those worked as expected.

So this is looking and behaving similar to the login manager situation described here: http://forum.palemoon.org/viewtopic.php?f=56&t=12572#p88839.

This was reproducible for me:
A.
--Open tab for some AMO page with download buttons, observe that it sees the browser as FF 24.*; Keep it open;
--Turn off FF compatibility;
--In custom settings for clearing history, select to clear 'Browsing & Download History' on exit;
--Deselect everything else to be sure of what affects what;
--Restart;
--Observe the AMO page; It no longer recognizes PM27 as "Firefox" and offers a redirect to download Firefox;
B.
--Turn FF compatibility on;
--Refresh the AMO page;
--That page now displays whatever it would show to FF 38;
C.
--Turn FF compatibility back off if you wish (it won't affect what follows);
--In custom settings for clearing history, deselect to clear 'Browsing & Download History' on exit;
--Restart;
--Observe the AMO page; Once again It displays whatever it would show to FF 24.*

BROWSING & DOWNLOAD HISTORY WERE CLEARED ON EXIT;
COMPATMODE OFF.
amo1.png
amo-gmonkey1.png
SAME, BUT COMPATMODE ON
(Current ABP & Greasemonkey are formally compatible with FF 38+).
amo2.png
amo-gmonkey2.png
DESELECTED TO CLEAR BROWSING & DOWNLOAD HISTORY ON EXIT;
RESTARTED.
amo3.png
amo-gmonkey3.png

[/b] ERROR CONSOLE:
(Taken after restart with clear 'Browsing & Download History' on exit selected.
This was the page used: https://addons.mozilla.org/en-US/firefox/addon/flagfox/)

Code: Select all

PM Error: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDownloadManager.canCleanUp] Source File: chrome://browser/content/sanitize.jsLine: 333
 
PM Error: TypeError: Cc['@mozilla.org/rdf/datasource;1?name=charset-menu'] is undefined Source File: chrome://browser/content/browser.js Line: 11678

PM Error: TypeError: this.updateDisplay is not a function Source File: chrome://browser/content/search/search.xml Line: 79

PM Error: [Exception... "[JavaScript Error: "this.updateDisplay is not a function" {file: "chrome://browser/content/search/search.xml" line: 79}]'[JavaScript Error: "this.updateDisplay is not a function" {file: "chrome://browser/content/search/search.xml" line: 79}]' when calling method:[nsIBrowserSearchInitObserver::onInitComplete]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame ::  resource://gre/components/nsSearchService.js :: onSuccess :: line 4143"  data: yes] Source File: resource://gre/components/nsSearchService.js Line: 4145

PM Error: TypeError: Cc['@mozilla.org/rdf/datasource;1?name=charset-menu'] is undefined Source File: chrome://browser/content/browser.js Line: 11678

PM Warning: Use of getAttributeNode() is deprecated. Use getAttribute() instead. Source File: https://www.gstatic.com/recaptcha/api2/r20160718175036/recaptcha__en.js Line: 54

PM Warning: Key event not available on some keyboard layouts: key="r" modifiers="accel,alt" Source File: chrome://browser/content/browser.xul Line: 0

Login Manager: No alternate nsILoginManagerStorage registered

PwMgr json: Opening database at ...User\Palemoon\Profiles\Default\logins.json

GMforker

Re: AMO's UA override stops working if 'Browsing & Download History' is cleared on exit

Unread post by GMforker » 2016-07-24, 16:55

coffeebreak wrote:
[/b] ERROR CONSOLE:
(Taken after restart with clear 'Browsing & Download History' on exit selected.

Code: Select all

NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDownloadManager.canCleanUp]
See also Menu: "History-Clear Recent History..." / "Library-Clear Downloads" - throws an errors in the Error Console

Code: Select all

TypeError: Cc['@mozilla.org/rdf/datasource;1?name=charset-menu'] is undefined
See also Known issues in Alpha1
(The character set menu is unavailable, and the error console will list character set menu errors)

Code: Select all

TypeError: this.updateDisplay is not a function
See also Some other errors/warnings in the Error Console (will be updated)

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: AMO's UA override stops working if 'Browsing & Download History' is cleared on exit

Unread post by coffeebreak » 2016-07-24, 17:44

@developerofthisfork,
Thank you for your post.

Hopefully, the contents of the original post do not duplicate things already on the radar, but if they do please understand this...

I have no understanding of what the errors in the console mean. (To me they're basically gobbledygook). I only know what happens when I use the browser. And having not seen this "AMO / UA / Sanitize" situation described in any other post, I reported it.

We have been given to understand that problems we report should be accompanied by the contents of the error console (barring css), so I did that.

If the situation described in the original post is currently being addressed in the course of working on something else (something that would be non-obvious to a non-coder) it would be good to know about that too, from those who are working on those issues.

GMforker

Re: AMO's UA override stops working if 'Browsing & Download History' is cleared on exit

Unread post by GMforker » 2016-07-24, 18:07

coffeebreak wrote:Hopefully, the contents of the original post do not duplicate things already on the radar, but if they do please understand this...
It was just a comment :-)
coffeebreak wrote:If the situation described in the original post is currently being addressed in the course of working on something else (something that would be non-obvious to a non-coder) it would be good to know about that too, from those who are working on those issues.
Yes. I also confirmed this problem. I do not see it anywhere else...

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: AMO's UA override stops working if 'Browsing & Download History' is cleared on exit

Unread post by coffeebreak » 2016-07-24, 18:24

Apologies for misunderstanding your earlier comment.

And thank you very much for confirming! XD

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35633
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: AMO's UA override stops working if 'Browsing & Download History' is cleared on exit

Unread post by Moonchild » 2016-07-24, 20:06

If it's throwing the same errors as for other already reported issues, then the (known) download manager problems that are being addressed will likely also clear this up.
Downloads, download lists, clearing thereof and managing thereof is currently NOT working as it should. if you perform known-broken functions on shutdown, it's likely going to cause issues. So, for the time being, don't use "clear on shutdown" (unless you like torturing yourself) ;)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: AMO's UA override stops working if 'Browsing & Download History' is cleared on exit

Unread post by coffeebreak » 2016-07-24, 21:45

Moonchild wrote:If it's throwing the same errors as for other already reported issues, then the (known) download manager problems that are being addressed will likely also clear this up.

Thank you for communicating this. And unless told otherwise will apply this to the login manager problem as well.

GMforker

Re: AMO's UA override stops working if 'Browsing & Download History' is cleared on exit

Unread post by GMforker » 2016-10-16, 15:54

You can test the new version (after a new version - 27.0.0b3 - is released).

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: AMO's UA override stops working if 'Browsing & Download History' is cleared on exit

Unread post by coffeebreak » 2016-10-20, 16:48

I have not encountered any problems connected with sanitizing on shutdown for a while and believe, as predicted by Moonchild, that this and related issues must have been cleared up by the work done on the download manager. This holds as well for this thread (re saving/recalling passwords) and this post (concerning display of the file storage tab in GMX webmail).

Locked