supabase / postgres-meta

A RESTful API for managing your Postgres. Fetch tables, add roles, and run queries
https://supabase.com
Apache License 2.0
941 stars 126 forks source link

Permission denied error when generating types #621

Closed bombillazo closed 10 months ago

bombillazo commented 1 year ago

Bug report

Describe the bug

We are getting a weird bug when running the type generation in github actions using the supabase gen types typescript command:

Status: Downloaded newer image for ghcr.io/supabase/postgres-meta:v0.68.0
(node:1) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
file:///usr/src/app/dist/server/server.js:58
        throw new Error(tablesError.message);
              ^

Error: permission denied for schema cron
    at file:///usr/src/app/dist/server/server.js:58:15
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
error running container: exit 1
Try rerunning the command with --debug to troubleshoot the error.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Run gen types typescript

Expected behavior

Supabase types are generated without a problem

System information

Additional context

Add any other context about the problem here.

soedirgo commented 1 year ago

Is this run against a hosted project? If so, seems to be an issue with the project. Can you file a ticket on https://supabase.com/dashboard/support/new ?

bombillazo commented 1 year ago

Hey, it happens when running the commands from a GitHub actions with the --local flag, not in the remote :/

bombillazo commented 10 months ago

Seems like perhaps this was fixed in subsequent cli versions, but it is no longer an issue.