Helo, suddenly the supertokens that I deployed to ...
# support-questions-legacy
m
Helo, suddenly the supertokens that I deployed to my fly.io throw an error from backend
Copy code
2023-05-27T06:06:15.831 app[148ed5d7a72e68] sin [info] {"level":50,"time":1685167575831,"pid":529,"hostname":"148ed5d7a72e68","reqId":"req-7k","err":{"type":"Error","message":"SuperTokens core threw an error for a POST request to path: '/recipe/session' with status code: 500 and message: Internal Error\n","stack":"Error: SuperTokens core threw an error for a POST request to path: '/recipe/session' with status code: 500 and message: Internal Error\n\n at Querier.<anonymous> (/app/node_modules/supertokens-node/lib/build/querier.js:252:31)\n at Generator.throw (<anonymous>)\n at rejected (/app/node_modules/supertokens-node/lib/build/querier.js:22:44)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)"},"msg":"SuperTokens core threw an error for a POST request to path: '/recipe/session' with status code: 500 and message: Internal Error\n"}

2023-05-27T06:06:15.832 app[148ed5d7a72e68] sin [info] {"level":30,"time":16
and from supertokens-core
r
hey @muhajirdev
does this always happen?
m
hey @rp_st , any clue on what's happening
r
also, can you share the core logs?
m
so let me give a bigger context
so previously. I deployed this a few months ago
Copy code
"registry.supertokens.io/supertokens/supertokens-postgresql"
which default to latest
now because I don't want to mess with our backend code
I downgrade it it 4.6, but still not working, downgrade to 4.5, and now on 3.16
"registry.supertokens.io/supertokens/supertokens-postgresql:3.16"
previoulsy when i was on latest
r
right. Can you share the core logs please?
m
it shows error missing column use_static_key or something
sure
will copy paste full log here
r
yeaa.. this is tricky now
r
well, if you are downgrading it, then this column shouldn't be needed
m
what's happening?
r
which version are you running now?
m
3.16
r
whats is the db schema for the session_info table?
m
okay let me take a look

https://cdn.discordapp.com/attachments/1111899627982172210/1111902016256618606/image.png

it looks like this
something is wrong? @rp_st ?
r
im not sure. Downgrading the core will require manual verification of whats going on
i can help you sometime next week
but i would suggest to inspect our core code to see where the issue might be happening and figuring it out yourself
m
it does auto migration?
shuold I upgrade it back to 5.0?
r
auto migration is applied during core upgrades
see our changelog for the core please on our github
that may help
otherwise, we can help next week sometime
m
okay,
this is my staging environment
it's fine if it's broken
I have a prod one
that I haven't touched yet
what should I do with it?
r
you can ssh into the docker container and see which version of the core is installed in there, and replace then use that tag
you can ssh into the docker image, then run
supertokens --help
and show me the output
m
this is the prod
root@5683d906c79648:/# supertokens --help You are using SuperTokens Community Usage: supertokens [command] [--help] [--version] Commands: -> hashingCalibrate [options] Used to calibrate the settings for password hashing algorithms for a specific machine -> uninstall Uninstalls SuperTokens -> stop [options] Stops all (if no options are provided) or one specific instance of SuperTokens -> start [options] Start an instance of SuperTokens -> list List information about all currently running SuperTokens instances Files: Installation location /usr/lib/supertokens/ Default config file /usr/lib/supertokens/config.yaml Legal license /usr/lib/supertokens/LICENSE.md Thank you for checking out SuperTokens 🙂
root@5683d906c79648:/# supertokens --version You are using SuperTokens Community SuperTokens Core version: 5.0.0 Plugin Interface version: 2.23.0 Database Plugin name: postgresql Database Plugin version: 3.0.0 Java version: OpenJDK 15.0.1 Installation directory: /usr/lib/supertokens
I think the prod is on 5.0 as well
r
okay. So now change the tag of the docker image to
5.0
m
that's why it's also broken
r
so prod is broken too?
m
on prod?
yeap
prod is broken
r
then also update your backend and frontend SDKs
and see our changelog on github
for the core
it has commands to run on the db to migrate to 5.0
m

https://cdn.discordapp.com/attachments/1111899627982172210/1111904025122709524/image.png

m
okay
let me try
r
actually, you don't need to change your backend and frontend sdks
m
I just need to run script?
r
just run the migration steps in the link above on your database
and it should be fine.
m
okay
what is access_token_signing_key_dynamic ?
it's true by default right
r
yes
m
okayy
I ran it on staging
it works
r
ok great
m
thanks god
thank you! @rp_st
r
👍
m
dude your support is 5/5 , very helpful
r
thanks 🙂
14 Views