Could not load... Failed to getSize of file:/// -- iOS React Native
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.
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/dreiand@react-three/fiber, both imported using/native - RN v0.74.1 — does that matter?
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