Jump to content

Firefox plugin above 6.9.3 fails to send authenticationToken


Recommended Posts

diff -uN a/js/main/Account.js  b/js/main/Account.js 
--- a/js/main/Account.js	2017-08-02 01:18:23.729526636 +0200
+++ b/js/main/Account.js	2017-08-02 01:18:26.613575823 +0200
@@ -85,7 +85,7 @@
                     d ? (e._accountIsOffline || (log.warn("Account offline"), e._accountIsOffline = !0), c = a.OFFLINE) : (e._accountIsOffline && (log.warn("Account online"), e._accountIsOffline = !1), b ? (log.error(b), c = h && i.indexOf(b.errorCode) > -1 ? 0 : a.ERROR, b.errorCode === EDAMErrorCode.ACCOUNT_CLEAR && (Persistent.clearForUser("notebooksCache", e.userInfo.userId), e.logout()), e.userInfo = null) : j && (e.userInfo = j)), e.isAuthenticated && (c |= a.AUTHENTICATED), e._onUpdated && e._onUpdated.call(e, c), c & a.ERROR ? g(b) : f(e.userInfo)
             new Promise(function(a) {
-                EDGE ? chrome.cookies.getAll({
+                !EDGE ? chrome.cookies.getAll({
                     url: "https://" + e.host + "/",
                     name: "clipper-sso"
                 }, function(b) {

This is required here. Could be even not test for EDGE is required.

Otherwise an empty string is sent as authenicationToken, and the addon debugger shows erroCode:5, parameter: authenticationToken.

The failure started around the time I switched to a paid account.

Link to comment

Now that I cleaned up my profile, I find it is not that straightforward.

After the above change I was able to save pages via web clipper but somewhat evernote web was confused : error Missing cookie value (from a js file from EN servers). And I ended up on a blank https://www.evernote.com/Home.action?login=true page.

I had a few plugins seems to matter (all of them were disabled at one point, but it seems once EN cookie set it broken, one need to clear all local data (cache, all evernote cookies and possibly "local storage" too) and have the plugins disables here I clue user-agent-overrides (which made me from UserAgent "Edge" to User Agent "Edge,chrome=1" on the EN web page properties) and  'cache status" .

After removing those , clearing the cookies, the cache, and a firefox restart ... I now get the utag_main cookie that was always missing after login and I get to the EN content page.

Now evernote clipper from addons.mozilla.org works without patching now.

I suspect that the EDGE test I patched above was already correct but ...  too strict. Removing user-agent-overrrider@qixinglu.com and reseting most useragentrelated items in about:config  (including firebug ones and restarting Firefox) was key there.

The EN web "missing cookie value" was more like, once EN cookies are purged or expired,  "cache status" or even a server side issue made it so EN login page failed to rebuild the full set of cookies. I tried release and developper Firefox restarts with all addons disabled when debugging the "missing cookie value" , to no avail.

This error was from https://www.evernote.com/ro/L2RiYjliZTRjOWNlNTllZjFlMmIxOTExNmVlNzY2ODJiNWJjMjhiMTUuanM/LzExZWUyYjZiMTIxNzY4MjIzN2Y1OTdiZmI0MGMzM2JjY2M4M2YwYWQuanM/-882506363.js   _splitCookie function, where the caller had document.cookie an empty string (it seemed as req_seq was the cookie ,even though I could see its value was non empty in the cookie manager).

When I switched to developper build of Firefox (55b) from the release build (54) I was able to edit cookie in the storage tab of the dev toolbox on all pages except EN ones ... and only it failed in my old default profile (in a new profile it works well).

After the above cleanup dance + maybe server side changes ... utag_main was properly generated ....

NB: one has to delete the evernote cookies between each attempt when document.cookie keeps returning an empty string. Otherwise refresh goes back the an empty Home.action?login=true page. Pretty tedious, ability to restore from broken set of cookie and/or relax in EDGE  set of user agents welcome  :)  (I stick to Firefox 34 release and Firefox 55b developper all along, both behaved alike - only the profile folder matter, sadly mine is now clean).

Link to comment

Evernote Web clipper , https://addons.mozilla.org/en-US/firefox/addon/evernote-web-clipper/reviews/?src=api

sorry I split the post in two, there are more (including the clipper reference in the "reply to self" second post.

On my side all i is fine now.

This post could be of help to users facing the issue I had. And to further narrow the issue, from the facts it contains, for evernote team.

But the Firefox profile, evernote server side content and local cookies set  that broke evernote web clipper above 6.9.3 is not longer available on my side.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...