Skip to content
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

Cannot get Token (Not Granted) #149

Closed
Vitriia opened this issue Oct 21, 2018 · 22 comments
Closed

Cannot get Token (Not Granted) #149

Vitriia opened this issue Oct 21, 2018 · 22 comments

Comments

@Vitriia
Copy link

Vitriia commented Oct 21, 2018

Hi,

I cannot get Token, i have "Not granted" error.
I have activated debug.
Nothing happened when i submit credentials for token (no log into debug screen).
But when i go into the Wallabagger option page (from about:addons) i get those errors into debug screen

TypeError: this._tabPool is null                                                                            browsing-context.js:1480:5
msg.target.ownerGlobal.gBrowser.getTabForBrowser is not a function                                          LoginManagerParent.jsm:135
receiveMessage  resource://gre/modules/LoginManagerParent.jsm:135:25
receiveMessage  jar:file:///usr/lib/firefox/browser/omni.ja!/components/nsBrowserGlue.js:256:15
receiveMessage  self-hosted:1031:17
TypeError: this._tabPool is null                                                                            browsing-context.js:1480:5

Wallabagger: 1.5.0
Wallabag: 2.3.2 (Can't update to 2.3.3 actually)
OS: Ubuntu 18.04.1 LTS
Firefox: 62.0.3 (64bits)

@Simounet
Copy link
Member

Hi,
Do you have any addons that could break this? I can't see any reference to wallabagger on your error messages. Can you try it on a fresh Firefox profile please?

@Vitriia
Copy link
Author

Vitriia commented Oct 22, 2018

Hi,
I have tried with all addon disabled

It works with a fresh profile

@Simounet
Copy link
Member

It doesn't work with all addon disabled? Do you have Umatrix?

@Vitriia
Copy link
Author

Vitriia commented Oct 22, 2018

Doesn't work with all addon disabled.
I have try :

  • Disable them all then try again --> Not Granted
  • Disable them all. Close Firefox. Open Firefox then try again --> Not Granted

I haven't Umatrix. My addon who can break this :

  • Privacy Badger
  • uBlock
  • NoScript
  • Https Everywhere

@Rurik19
Copy link
Collaborator

Rurik19 commented Oct 23, 2018

If It works with a fresh profile = try this:

  • on fresh profile install wallabagger first -> check it works
  • add other add-ons one by one, and check wallabagger after each

So you can find who blocks wallabagger.

@Najrim
Copy link

Najrim commented Oct 26, 2018

I had this problem too a couple of days ago. Making a new profile worked. Yesterday I updated Firefox to 63.0 and again, I can't save to Wallabag and can't get a new Token in the Wallabagger preferences in about:addons. It says "Wallabag API token: Not granted". Not sure how to view log. Should I activate "Enable this only developers told you to" and then look in Browser Console"?

Like @Vitriia I have tried disabling addons (Privacy Badger, https everywhere, uBlock). And the preferences say "Wallabag API version 2.3.2.

@Vitriia, have you got it working for you? Have you updated Firefox?

@Simounet
Copy link
Member

You can try this:

  • enable the debug mode into the wallabagger settings
  • go to about:debugging#addons
  • check in Enable add-on debugging
  • click on wallabag debug link
  • click on ok to accept incoming connections
  • add some page through the context-menu
  • give us the entries on the console tab of the new window opened

@Najrim
Copy link

Najrim commented Oct 29, 2018

Activating "Enable this only if developers told you to" is to enable debug mode, right? This is all I get:

postMessage: {"response":"info","text":"Saving the page to wallabag…"} background.js:186:23
unknown message: [object Object] options.js:381:21

@Najrim
Copy link

Najrim commented Nov 2, 2018

@Simounet, in the last point you say that a window will be opened when I add something through the context menu. What kind of window? For me, the only thing that happens is that the wallabagger icon turns yellow then red.

@Najrim
Copy link

Najrim commented Nov 4, 2018

Some more info that might be relevant. This shows up before I do anything with wallabag:

InvalidStateError: RTCPeerConnection is gone (did you enter Offline mode?)

And I get this if I actually press the Wallabag button instead of using the context menu:

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. popup.html
postMessage: {"response":"setup","data":{"Url":"<redacted>","ApiVersion":"2.3.2","ClientId":"<redacted>","ClientSecret":"<redacted>","UserLogin":"<redacted>","UserPassword":"<redacted>","ApiToken":"<redacted>","RefreshToken":"<redacted>","ExpireDate":1541355134772,"isTokenExpired":false,"AllowSpaceInTags":false,"AllowExistCheck":false,"Debug":true}} background.js:186:23
postMessage: {"response":"info","text":"Saving the page to wallabag…"} background.js:186:23 

@Najrim
Copy link

Najrim commented Nov 15, 2018

It all of a sudden started working for me again. I guess it's the November 4 update. So if @Vitriia doesn't protest, I guess the issue might as well be closed.

@rushsteve1
Copy link

I am also having this issue and cannot seem to fix it. Disabling all addons or using a fresh profile doesn't seem to work.
This is with a self hosted Wallabag that works with the Android app and has worked previously on other computers.

browser: Firefox 63.0.3
extension version: 1.5.0
wallabag server version: 2.3.2
OS: OpenSUSE Tumbleweed

@Simounet
Copy link
Member

Simounet commented Dec 3, 2018

Can you follow there steps please?

You can try this:

* enable the debug mode into the wallabagger settings

* go to about:debugging#addons

* check in Enable add-on debugging

* click on wallabag debug link

* click on ok to accept incoming connections

* add some page through the context-menu

* give us the entries on the console tab of the new window opened

@rushsteve1
Copy link

So I have actually figured out why the token is not granted.
It will not grant a token, or allow me to save articles with Wallabager, if I am currently logged into the Wallabag web interface.
I use LDAP for authentication and being logged into anything as part of the SSO causes the extension to break. As soon as a log out it works again.

I will still post the logs if you want them. Let me know if you want the logs from when it is functional or non-functional.

@Najrim
Copy link

Najrim commented Dec 3, 2018

Reporting back so there's no confusion: turns out it broke again for me. I guess it worked before because I wasn't logged in. Trying it now resulted in the old error. Logging out, like @rushsteve1 says, fixes it again.

@Thatoo
Copy link

Thatoo commented Dec 7, 2018

I have the exact problem with my configuration.
I host wallabag thanks to yunohost (LDAP and SSO).
If I'm logged in yunohost, which I need because I use searx with it, then I can't use wallabagger.
To be able to use wallabagger (and also to make wallabagger accept the token), I have to be logged out from yunohost.

@Simounet
Copy link
Member

@rushsteve1 Could you please share your logs with us, please?

@Thatoo
Copy link

Thatoo commented Dec 10, 2018

Which logs do you need, wallabag or wallabager?
For wallabag, inside yunohost, I can access log of mysql or nginx or php7.0-fpm for that app.
For wallabagger, I don't know how to get logs.

@Najrim
Copy link

Najrim commented Dec 10, 2018

@Thatoo, See Simon's reply for how to get Wallabagger logs:

Can you follow there steps please?

You can try this:

* enable the debug mode into the wallabagger settings

* go to about:debugging#addons

* check in Enable add-on debugging

* click on wallabag debug link

* click on ok to accept incoming connections

* add some page through the context-menu

* give us the entries on the console tab of the new window opened

I already tried it for myself but there was nothing of value in the log.

@Thatoo
Copy link

Thatoo commented Dec 10, 2018

Error: Failed to check if exists https://leprette.fr/jaimecesarticles-wallabag/api/entries/exists.json?url=https://leprette.fr/yunohost/sso/
Failed to refresh token https://leprette.fr/jaimecesarticles-wallabag/oauth/v2/token
undefined wallabag-api.js:247:23
details.requestBody is null background.js:288
setDownloadHooks/<
moz-extension://9f24bee8-5351-479e-8074-a10c6b1875a3/background.js:288:13
apply self-hosted:4619:5 applySafeWithoutClone
resource://gre/modules/ExtensionCommon.jsm:470:16
fire
resource://gre/modules/ExtensionChild.jsm:941:28
receiveMessage
resource://gre/modules/ExtensionChild.jsm:944:38
_callHandlers/<
resource://gre/modules/MessageChannel.jsm:876:29
_callHandlers
resource://gre/modules/MessageChannel.jsm:875:14
_handleMessage/deferred.promise<
resource://gre/modules/MessageChannel.jsm:952:7
_handleMessage
resource://gre/modules/MessageChannel.jsm:949:24
_handleMessage self-hosted:977:17 receiveMessage/<
resource://gre/modules/MessageChannel.jsm:218:9
forEach self-hosted:262:13 receiveMessage
resource://gre/modules/MessageChannel.jsm:211:5
Error: Failed to check if exists https://leprette.fr/jaimecesarticles-wallabag/api/entries/exists.json?url=https://github.com/wallabag/wallabagger/issues
undefined wallabag-api.js:247:23
error occurred while processing 'sources: TypeError: can't access dead object
Stack: createNonSourceMappedActor@resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/utils/TabSources.js:311:5
createSourceActors/<@resource://devtools/shared/base-loader.js -> resource://devtools/server/actors/utils/TabSources.js:399:21
Line: 311, column: 5 main.js:1576
_unknownError
resource://devtools/server/main.js:1576:5
_queueResponse/responsePromise<
resource://devtools/server/main.js:1605:27

@Thatoo
Copy link

Thatoo commented Dec 19, 2018

Do these logs help to explain why it's not working the way expected?

Issue reported to the wallabag_2 yunohost fork : YunoHost-Apps/wallabag2_ynh#58

@Thatoo
Copy link

Thatoo commented Jan 29, 2019

I have tried that fix, #160 , and it works like a charm!
Thank you @stan3.
Hopefully wallabager 1.5.1 with this fix will be released soon.

Rurik19 added a commit that referenced this issue Jan 30, 2019
don't set Cookie header (fixes #149, maybe #140)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants