Skip to content
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

start_example_server: failed to apply migrations #89

Open
arqeco opened this issue Nov 9, 2022 · 2 comments
Open

start_example_server: failed to apply migrations #89

arqeco opened this issue Nov 9, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@arqeco
Copy link

arqeco commented Nov 9, 2022

Hello,

I've got this error message while trying to run the example server on Ubuntu-20.04 in WSL2 (Windows 10):

$ git clone https://github.com/nhost/nhost-dart.git --depth 1

$ cd nhost-dart/tool/

$ ./start_example_server

~/temp/nhost-dart/tool/example_server/functions ~/temp/nhost-dart/tool
~/temp/nhost-dart/tool
~/temp/nhost-dart/tool/example_server ~/temp/nhost-dart/tool

> Initializing Hasura client
> start timeout is set to 10m0s
> Stopping docker compose
> Starting docker compose
> Starting functions
> Starting postgres, graphql-engine containers...
> Waiting for graphql-engine service to be ready
> Waiting for all containers to be up and running
> It takes longer than usual to start your Nhost project. Most likely because of the need to install your npm dependencies. Please wait.


> Processing...
> Ensuring S3 bucket exists
> Checking if migrations need to be applied
> Applying migrations
ERRO skipping applying migrations on database default, encountered:
{
  "code": "postgres-error",
  "error": "query execution failed",
  "internal": {
    "arguments": [],
    "error": {
      "description": null,
      "exec_status": "FatalError",
      "hint": null,
      "message": "must be owner of table files",
      "status_code": "42501"
    },
    "prepared": false,
    "statement": "alter table \"storage\".\"files\"\n  add constraint \"files_uploaded_by_user_id_fkey\"\n  foreign key (\"uploaded_by_user_id\")\n  references \"auth\".\"users\"\n  (\"id\") on update no action on delete cascade;\n"
  },
  "path": "$"
}
FATA[0001] operation failed on : default
> Start took 49.9582051s

> [failed to apply migrations: exit status 1
<nil>] Failed to start services
> Stopping docker compose

If you wanna try WSL2 but is using other operanting system try this free MS Windows VM that comes with WSL2 pre-installed: https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/
I am using real Windows 10 but I believe the same issue will arise on the VM.

@arqeco
Copy link
Author

arqeco commented Nov 9, 2022

I have tried it in Bodhi Linux 6.0.0 (Ubuntu-based) and got exactly the same error

@mhadaily mhadaily self-assigned this Dec 4, 2022
@mhadaily mhadaily added the bug Something isn't working label Dec 4, 2022
@mhadaily
Copy link
Contributor

mhadaily commented Jan 11, 2023

We are working on a new major version. This should be fixed on the new dev version + new nhost CLI. you need to update both CLI and check out a new version Check this out nhost_sdk: ^4.0.0-dev.8 or this link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants