Skip to content

texture based on file:// url won't load #297

@earonesty

Description

@earonesty

followed this documentation:

https://github.com/expo/expo-three#loading-assets

texture based on remote image won't load:

  • used expo-asset to create and download asset
  • asset.localUri is downloaded, returns a "file://" url
  • TextureLoader().load(asset.localUri) throws an error:
Call to function 'ExponentFileSystem.downloadAsync' has been rejected.
→ Caused by: java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but was 'file'
    at construct (native)
    at apply (native)
    at _construct (http://10.24.121.64:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:4486:28)
    at Wrapper (http://10.24.121.64:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:4448:25)
    at construct (native)
    at _createSuperInternal (http://10.24.121.64:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:125092:322)
    at call (native)
    at CodedError (http://10.24.121.64:8081/node_modules%5Cexpo%5CAppEntry.bundle//&platform=android&dev=true&hot=false&lazy=true:125105:26)

i believe this has already been fixed in dependent libs, so you just have to update deps

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions