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

'Move' action fails on supabase local storage node #3271

Open
blaine opened this issue Mar 8, 2025 · 0 comments
Open

'Move' action fails on supabase local storage node #3271

blaine opened this issue Mar 8, 2025 · 0 comments

Comments

@blaine
Copy link

blaine commented Mar 8, 2025

Describe the bug
Moving files in supabase storage fails with a generic "Internal Server Error" message and 500 status code.

To Reproduce
Steps to reproduce the behavior:

  1. Using the local env via the supabase cli (supabase start), create a storage bucket (e.g., images).
  2. Upload a file to the bucket. Mine was called tmp/a79c2c537a14cc1d950b4734cd0ef700b134fbb5ff63d7ffcc3a7ab0cef90272 (I also tested with shorter filenames, e.g. moving tmp/abc.jpg to headers/abc.jpg also fails)
  3. Attempt to move the file to a new path in the same bucket. In my case, this was to the path headers/a79c2c537a14cc1d950b4734cd0ef700b134fbb5ff63d7ffcc3a7ab0cef90272. This can be via the studio, the cli, or the TypeScript API. CLI command for reference:
supabase storage --local mv --create-ticket --debug --experimental ss:///images/tmp/a79c2c537a14cc1d950b4734cd0ef700b134fbb5ff63d7ffcc3a7ab0cef90272 ss:///images/headers/a79c2c537a14cc1d950b4734cd0ef700b134fbb5ff63d7ffcc3a7ab0cef90272
  1. See error:
$ supabase storage --local mv --create-ticket --debug --experimental ss:///images/tmp/a79c2c537a14cc1d950b4734cd0ef700b134fbb5ff63d7ffcc3a7ab0cef90272 ss:///images/headers/a79c2c537a14cc1d950b4734cd0ef700b134fbb5ff63d7ffcc3a7ab0cef90272
Supabase CLI 2.15.8
Moving object: /images/tmp/a79c2c537a14cc1d950b4734cd0ef700b134fbb5ff63d7ffcc3a7ab0cef90272 => /images/headers/a79c2c537a14cc1d950b4734cd0ef700b134fbb5ff63d7ffcc3a7ab0cef90272
2025/03/08 10:30:09 Connect Start: tcp 127.0.0.1:54321
2025/03/08 10:30:09 Connect Done: tcp 127.0.0.1:54321
2025/03/08 10:30:09 Sent Header: Host [127.0.0.1:54321]
2025/03/08 10:30:09 Sent Header: User-Agent [SupabaseCLI/2.15.8]
2025/03/08 10:30:09 Sent Header: Content-Length [197]
2025/03/08 10:30:09 Sent Header: Authorization [Bearer REDACTED]
2025/03/08 10:30:09 Sent Header: Content-Type [application/json]
2025/03/08 10:30:09 Sent Header: Accept-Encoding [gzip]
2025/03/08 10:30:09 Send Done
2025/03/08 10:30:09 Recv First Byte
Error status 500: {"statusCode":"500","error":"Internal","message":"Internal Server Error"}
Sent crash report: 469df68c669641419b9445467f7af38b
Quote the crash ID above when filing a bug report: https://github.com/supabase/cli/issues/new/choose

Alternatively, via TypeScript:

const srcPath = "tmp/a79c2c537a14cc1d950b4734cd0ef700b134fbb5ff63d7ffcc3a7ab0cef90272";
const dstPath = "headers/a79c2c537a14cc1d950b4734cd0ef700b134fbb5ff63d7ffcc3a7ab0cef90272";
const { error: err } = await locals.supabase.storage.from('images').move(srcPath, dstPath);

Error is a 500 error ("Internal Server Error").

Expected behavior
File should be moved to the new path.

(In the event of an Internal Server Error, it would be ideal to have more context or a way to figure out what actually went wrong. Presumably Kong is eating the error; I've included the 500 from the storage server logs below, but it doesn't contain actionable information)

For reference, copying via the same interface on the same server works as expected. The following code succeeds without any errors:

const srcPath = "tmp/a79c2c537a14cc1d950b4734cd0ef700b134fbb5ff63d7ffcc3a7ab0cef90272";
const dstPath = "headers/a79c2c537a14cc1d950b4734cd0ef700b134fbb5ff63d7ffcc3a7ab0cef90272";
const { error: err } = await locals.supabase.storage.from('images').copy(srcPath, dstPath);

System information

  • Ticket ID: 469df68c669641419b9445467f7af38b
  • Version of OS: MacOS 15.3
  • Version of CLI: v2.15.8
  • Version of Docker: v28.0.1 build 068a01e
  • Versions of services:
       SERVICE IMAGE      │      LOCAL       │  LINKED
 ─────────────────────────┼──────────────────┼────────────
   supabase/postgres      │ 15.1.1.69        │ 15.1.1.69
   supabase/gotrue        │ v2.168.0         │ v2.168.0
   postgrest/postgrest    │ v12.2.0          │ v12.2.0
   supabase/realtime      │ v2.34.31         │ -
   supabase/storage-api   │ v1.17.1          │ v1.17.1
   supabase/edge-runtime  │ v1.67.2          │ -
   supabase/studio        │ 20250224-d10db0f │ -
   supabase/postgres-meta │ v0.86.0          │ -
   supabase/logflare      │ 1.11.0           │ -
   supabase/supavisor     │ 2.3.9            │ -

Additional context
If applicable, add any other context about the problem here.

  • Version of supabase-js v2.47.2 and version included via supabase-cli and supabase studio (actions are also reproducible in studio but not described in detail above)
  • Version of Node.js: v22.11.0
  • Error from storage server logs:
{
  "event_message": "stub | POST | 500 | 172.18.0.5 | req-1p4 | /object/move | SupabaseCLI/2.15.8",
  "id": "5e7e3c4f-a211-4e4c-bece-900f722ae7c5",
  "metadata": [
    {
      "context": [
        {
          "host": "16cadb874da8",
          "pid": 1
        }
      ],
      "level": 50,
      "project": "default",
      "tenantId": "default",
      "timestamp": "2025-03-08T18:30:09.956Z"
    }
  ],
  "timestamp": 1741458609957266
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant