supabase-js icon indicating copy to clipboard operation
supabase-js copied to clipboard

Storage upload network error on Expo SDK 52

Open Noahkoole opened this issue 1 year ago • 2 comments

Bug report

  • [x] I confirm this is a bug with Supabase, not with my own application.
  • [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When running a new expo app on SDK 52 on iOS simulator a file can not be uploaded that is larger then 500 KB. Otherwise it results in a network error.

When trying to upload any image file to a private mock endpoint no issue arrises so it has to do with supabase.

To Reproduce

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

  1. Install a basic expo app using the new 52 SDK. npx create-expo-app@latest --template default@beta
  2. Setup the default supabase configuration
  3. Try to upload a image that is larger then 500 KB-1 MB.
const { data: uploadedImage, error: uploadError } = await supabase.storage
      .from('bg_images')
      .upload(bgImageName, decode(base64), {
        contentType: 'image/' + fileExtension.slice(1),
        upsert: true,
      });
  1. This throws an "Network error" which is outside of the "error" return result

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: iOS Simulator
  • Version of supabase-js: 2.45.4
  • Expo SDK 52
  • React native 0.76 (New architecture)

Additional context

Add any other context about the problem here.

Noahkoole avatar Nov 11 '24 20:11 Noahkoole

Did you find out how to fix it? I have the same problem...

CalinMihnea avatar Feb 03 '25 17:02 CalinMihnea

Did you find out how to fix it? I have the same problem...

This only happens in Expo Go was my discovery. Making a development build resolves all the issues. which I would recommend anyway

Noahkoole avatar Feb 03 '25 17:02 Noahkoole