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
An error in console: Failed to load resource: the server responded with a status of 401 (Unauthorized) #9976
Comments
Hmm, I wonder if the access token was successfully refreshed... @koksikus Please help to test if adding the environment variable As for your feature request, it seems to be similar with #7395. |
Just to confirm, you saw that particular error, but everything kept working as expected? You mentioned you could still make changes and whatnot. The app will automatically refresh and retry the current request if the access token happened to be expired in the meantime here: Lines 72 to 96 in ba0e969
so if that's the case, this is working as expected. |
Yes, I can still add or delete data. This has no effect on the operation of the system. I opened it on another computer and the same thing appeared. There is no size of time, it happens at different times. I'm logged in as an administrator. After F5 @licitdev Tomorrow I will enter an environment variable and see what happend. |
@koksikus That might be just regular expected operations then 🙂 The app will at times cancel requests to prevent racing conditions (which you see in the first screenshot), and it'll auto refresh and handle any 401 state coming from expired tokens. Unfortunately, we can't tell the browser that we expect a 4xx / cancelled state, so it'll show them in red. This doesn't necessarily mean there's a problem though 👍🏻 I'll close this for now, as it sounds like things are operating as expected. |
Preflight Checklist
Describe the Bug
In each language version, regardless of the settings, also in chrome. After about an hour or more of non-use Directus, an error appears in the console. I can still make changes in Directus. After refreshing, the error disappears. I thought it was not saving the data, but I found a description of the M2M error of the relationship. I think it would be good if the user was logged out automatically. Then the user logs in and everything refreshes. One more idea - can it be introduced that there is currently service work and please log in, in x time. During this time, no one can log in.
Or
GET and 401 (Unauthorized) vendor.299bc11cjs:74
To Reproduce
In database I have many M2M relationship (maybe this is important). After about an hour or more of non-use Directus (it is still open in the browser but I use different tabs), and when I return to it it shows an error appears in the console.
Errors Shown
No response
What version of Directus are you using?
9.0.1
What version of Node.js are you using?
16.13.0
What database are you using?
Sql server 2017
What browser are you using?
Edge
What operating system are you using?
Debian 11.1
How are you deploying Directus?
locally
The text was updated successfully, but these errors were encountered: