Some times this error starts popping up and then I...
# support-questions-legacy
y
Some times this error starts popping up and then I need to restart the server again to resolve this error. Is it just because of the restrictions on the dev env from the SuperTokens or something else ?
r
hey @youscript this happens if you have access tokens issued using the rotating access token keys and have set the
useDynamicAccessTokensSigningKeys: false
on the backend (or vice versa)
y
So how do I fix it and stop it from coming tho ?
I have set the useDynamicAccessTokensSigningKeys to false
r
relogin to your application when testing
and if you had created any JWTs before that are saved somewhere, discard them and recreate them.
y
I have relogin to my application dozens of time. I did not create any JWTs manually tho. I am use self managed service for now
r
hmmm.
Then this should not have happaned
happened*
which backend sdk are you using?
y
supertokens-node
github:supertokens/supertokens-node#backwards/edge_compatibility_check This branch that porcellus shared with me to test the fixed cross_fetch error
Just to clear this to you thir error also used to come when I was not using this branch tho
r
right. It might be a bug then. Does this happen after 1 hour of logging in? When the access token expires and is recreated?
@porcellus can help here.
y
Did not nitice the time tho but this does happen after some time of doing work in the app. Not right in the start
p
hi. One interesting thing here is that there are two very different error messages in your screenshots. Are you sure the two are related? Also, the error message in your frontend also refers to an exception thrown by our backend SDK. Are you referencing supertokens-node in your frontend/client code?
y
Ah really sorry guys. The frontend screensot of the error was wrong. Really sorry for that
This is the actual frontend error
and backend log was correct
r
right. This just means that the access token has expired
and that you need to refresh it
y
Oh so I have to manually handle this token refresh flow in my application ?
r
Is this during server side rendering?
y
session = await Session.getSessionWithoutRequestResponse(accessToken) So does using this func verifies the access token ? Because this is the function that I call on server side and may be this could be the reason
r
Yup. It does. And it throws the error if the token has expired
For api calls, our frontend SDK handles the refresh automatically. But for SSR, you need to handle it. See our docs for SSR please
y
Okh. Thanks!