decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.8k stars 3.03k forks source link

Failed getting access token: Gotrue-js: failed getting jwt access token #4252

Open artemtech opened 4 years ago

artemtech commented 4 years ago

Describe the bug When i want to logout from admin panel while editing a post file, i got this message in the page:

Failed getting access token: Gotrue-js: failed getting jwt access token

checked into console browser, got these messages:

Pausing requests for 1 second due to fetch failures: Failed getting access token: Gotrue-js: failed getting jwt access token API.js:94:16
Done pausing requests API.js:102:18
Pausing requests for 4 seconds due to fetch failures: Failed getting access token: Gotrue-js: failed getting jwt access token API.js:94:16
Done pausing requests API.js:102:18
Pausing requests for 9 seconds due to fetch failures: Failed getting access token: Gotrue-js: failed getting jwt access token API.js:94:16
Done pausing requests API.js:102:18
Pausing requests for 16 seconds due to fetch failures: Failed getting access token: Gotrue-js: failed getting jwt access token API.js:94:16
ACCESS_TOKEN_ERROR: Failed getting access token: Gotrue-js: failed getting jwt access token
    t AccessTokenError.js:12
    r AccessTokenError.js:40
    tokenPromise implementation.js:269
    a GitLabAPI.js:21
    <anonymous> API.js:96
    l API.js:66
    l API.js:106
    l API.js:106
    setTimeout handler*s browser.js:41
    nextTick browser.js:143
    leave semaphore.js:77
    release asyncLock.js:34
    l API.js:100
entries.js:575:14
Done pausing requests API.js:102:18
Failed getting Identity token ACCESS_TOKEN_ERROR: Failed getting access token: Gotrue-js: failed getting jwt access token
    t AccessTokenError.js:12
    r AccessTokenError.js:40
    tokenPromise implementation.js:269
    status implementation.js:191
    status backend.js:310
    checkBackendStatus status.js:62
    r Redux
    N middleware.js:22
    c Redux
    intervalId Header.js:114
    setInterval handler*componentDidMount Header.js:113
    React 2
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    Redux 6
    N middleware.js:22
    dispatch Redux
    loginUser auth.js:110
    promise callback*t.loginUser/< auth.js:105
    r Redux
    N middleware.js:22
    c Redux
    handleLogin App.js:160

And also, my browser address not redirecting to /admin/#/ , so it still in last edited file location.

To Reproduce

  1. Go to admin panel
  2. Click on a post from your post lists to display its contents
  3. After your contents show up, click user icon in top right corner, then click logout
  4. See error and in your address bar is still in same location with your contents url

Expected behavior When we try to logout from editing contents menu, netlify-cms should redirect to login page without errors

Screenshots

gambar

Applicable Versions:

pablo-poggio-phinx commented 3 years ago

im running into the same problem but trying to login, was there any solution?

JoeyMckenzie commented 3 years ago

Running into the same issue as well on a fresh project straight out of the docs. Any interim solutions for anyone?

erezrokah commented 3 years ago

Hi @JoeyMckenzie, I recommend sharing the browser network traffic and error message. That way we can see what's causing the issue.

A possible solution is to clear browser cache.

mpigsley commented 3 years ago

Had a team member run into this in an error popup today trying to submit a change. Logging out of the admin portal and then back in solved it. Doesn't seem to be the exact same situation but the same error.

JannieT commented 3 years ago

One team member had this while logging in. It looked likely to be a corrupted cookie, because she had no trouble after clearing her browser cache or using a private window.