react-three-fiber icon indicating copy to clipboard operation
react-three-fiber copied to clipboard

Could not load... Failed to getSize of file:/// -- iOS React Native

Open farzadali3 opened this issue 1 year ago • 1 comments

When using the following code to load a texture from an S3 presigned URL:

const texture = useTexture(s3PresignedUrl);

I encounter an error on React Native for iOS:

Error: Could not load https://[my-url]: Failed to getSize of file:///var/mobile/Containers/Data/Application/B52E51BC-89CA-4687-9298-3DE5C50BE098/Library/Caches/ExponentAsset-12cc3b989a74467a9322996b53b27856.

I have also attempted to use useLoader, but I receive the same error.

farzadali3 avatar Nov 07 '24 16:11 farzadali3

To add more info to this (@farzadali3 and I are working together on this issue):

  • the presigned S3 URL goes to a JPEG
  • this same presigned S3 URL works fine in React Native on Android
  • a different, generic, public URL to a JPEG works fine in React Native on iOS
  • latest versions of @react-three/drei and @react-three/fiber, both imported using /native
  • RN v0.74.1 — does that matter?

argotechnica avatar Nov 07 '24 18:11 argotechnica

This might be a drei useTexture issue or just issues with RN. If you still have it let me know and I'll add it to the rn list

DennisSmolek avatar Dec 10 '25 14:12 DennisSmolek