-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Error: Cannot use database previously used with a newer version of graphql-engine (expected a catalog version <=36, but the current version is 37). , code : not-supported #5511
Comments
@LuisDev99 Did you point your DB to a Hasura Cloud project? Or did you run some PR build on the same database? Catalog version 37 was introduced in master after To fix this, we can send you a SQL to downgrade manually from 37 to 36 and then v1.3.0 will be compatible with your database state again. |
I'm pretty sure I didn't do anything on the DB nor on the Hasura console itself, my Heroku app simply stopped working (on Friday), and this has happened twice already. I'm guessing maybe Heroku pulled down the Docker image from the hasura/graphql-engine-heroku and updated the Hasura metadata with that new image (by itself), which then cause the catalog version to be updated to 37, but that just a wild guess. The SQL will be greatly appreciated. Thanks! |
Update: I followed the Hasura downgrade steps listed here: https://hasura.io/docs/1.0/graphql/manual/deployment/downgrading.html#downgrade-hge But it didn't work for me. |
Something is odd here (did you check cloud.hasura.io? ). The image here: hasura/graphql-engine-heroku is not ahead of Downgrade will not work because catalog 37 is ahead of Anyway, here is the sql to update your catalog to 36. Then
I would again make sure to check cloud.hasura.io for any project. Hasura Cloud runs with catalog 37 and hence that seems the mostly likely source of this upgrade. |
Omg yes! The SQL worked!
Nope, anything. My Hasura console on Heroku simply stopped working. No administration nor configuration was done on either the console or the DB. The first time this same exact problem happened was during the v1.3.0 release, and later on, this past Friday. I noticed that on Friday (31/7/2020), commits were done to master, which is exactly by the time in which my console stopped working. Maybe a regression was introduced? I don't really know. But I do know that the catalog shouldn't be ahead of it's intended working version every time something gets released or change. Again, it's weird because no configurations were done on my end. Didn't even use the console during those days, soo something is definitely off. |
Wait, you are right @tirumaraiselvan. I remembered trying out the Hasura cloud about a month or two, and out of curiosity, I just went ahead and log in, and I'm seeing that my Heroku Postgres DB is being used by the project I created on the Hasura cloud, which is strange because I don't remember configuring the DB in there lol. Soo, in other words, I created a project on the Hasura cloud, which was using the same DB as my app on Heroku (not good), which was causing all of these catalog version errors. Hope this helps! Thank you very much @tirumaraiselvan |
I confirm the script fixes the issue! 🎉 Just a small thing, the last line should use semicolon |
I also tried out Hasura Cloud and broke the console on Heroku. Thanks for the fix! |
This has now been fixed with v1.3.1. You can use Heroku and Hasura Cloud on the same DB. |
Just want to add here: This same issue can occur when you do a naive backup of your database data (e.g. Production hasura graphql is running v1.3.3), and import onto an outdated graphql service (e.g. local docker-compose running v1.3.2). In my case, the above was what happened, and hasura won't start because it gave the following error:
In that specific case, the error translates to my local-machine's Hasura service saying: "My current version (1.3.2) expects a postgre DB with a hasura version of less than 37, but surprisingly the db says its 40. Because I am outdated, I don't know how to deal with the data, so I will not start". In this specific case, the fix is to upgrade my target environment's hasura to match the current version from your source environment ( |
@darrensapalo had the same issue and this fixed it! Thank you! |
@tirumaraiselvan running in to this now upgrading from Surely there can't be an expectation that every time hasura is updated an entire new db is created. |
full error message {"type":"startup","timestamp":"2021-04-20T05:06:34.349+0000","level":"error","detail":{"kind":"catalog_migrate","info":{"path":"$","error":"Cannot use database previously used with a newer version of graphql-engine (expected a catalog version <=46, but the current version is 45).","code":"not-supported"}}} |
Running into this error in my staging environment after copying database from prod to staging. Running both on Heroku.
Updated the Hasura GraphQL engine on staging to latest by pulling from git and pushing to Heroku. That fixed the issue everything was working. Same thing happened on prod after the next deployment. Had to updated prod as well. Now both staging and prod are using Hasura v2.25.0. But then the next time I pushed new code, the error above reappeared and Hasura is not working. And now, even when I try to update the Hasura GraphQL engine, it says everything is up-to-date and remains in a broken state. Any ideas? |
Did you got the solution? |
Hello everyone. I'm getting this error on my Heroku app:
graphql-engine version: v1.3.0
Postgress DB version: v12.3
I did open an issue on the graphql-engine-heroku (link: hasura/graphql-engine-heroku#84), but I'm opening an issue in here for reasons explained down below.
When version 1.3.0 got released, it broke my Hasura app console on Heroku. I managed to fix the problem by running the following commands:
But yet again, (since Friday 31/7/2020), the same problem occurred, and this time, I'm having zero luck fixing this issue.
The problem is that with every release, my Heroku app keeps breaking because of my catalog version (which I don't even touch at all), and I'm sure that's not the expected behaviour. Soo that's why I think it's worth opening an issue in here.
I tried migrating, but whenever I try to access the API, it spills out that error, soo in result, I can't do anything through the Hasura CLI, which eliminates any other solution that can be done with the Hasura CLI.
Complete error:
I don't even know why it is using version 37, I didn't touch a single thing.
Thanks! I reported this issue on Discord as well, and it appears to be that I'm not the only one who went through the same problems since v1.3.0 release.
Heroku's message whenever I try to access the console:
The text was updated successfully, but these errors were encountered: