decaporg / decaporg/decap-cms

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

Open
#4,252 5 comments 0 reactions 0 assignees View on GitHub
area: auth area: extensions/backends type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**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
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](https://user-images.githubusercontent.com/22854966/92464679-ad019680-f1f7-11ea-82f0-ca8e4df02371.png)

**Applicable Versions:**
- Netlify CMS version: 2.10.56 (unpkg)
- Git provider: Gitlab
- OS: Arch Linux
- Browser version Firefox Developer Edition 80.0b8
- Application: Hugo v0.74.3
- Identity: using git-gateway & gotrue provided by netlify

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.