Unable to load model from firebase storage in react native

I’m trying to download a model from firebase storage in react native but I get the following error.

const url = “https://firebasestorage.googleapis.com/v0/b/dev-dupspace.appspot.com/o/users%2FA5LzIXCB5DdA88LZrZyY%2Favatars%2F1.glb?alt=media&token=27349af4-a5e1-43dc-a936-c6daafd08104”;

const container = await SceneLoader.LoadAssetContainerAsync(

RuntimeError: Unable to load from https://firebasestorage.googleapis.com/v0/b/dev-dupspace.appspot.com/o/users%2FA5LzIXCB5DdA88LZrZyY%2Favatars%2F1.glb?alt=media&token=27349af4-a5e1-43dc-a936-c6daafd08104: LoadFileError: Error status: 404 undefined

I can download the model in the browser and using fetch. It also works fine with the same code on web.

Any ideas?

@bghgary - any transformation on http requests in babylon native?

I debugged it a bit. It looks like a bug in the processing of urls.

The final url it tries to open is: https://firebasestorage.googleapis.com/v0/b/dev-dupspace.appspot.com/o/users%252FA5LzIXCB5DdA88LZrZyY%252Favatars%252F1.glb?alt=media&token=27349af4-a5e1-43dc-a936-c6daafd08104 which is obviously not correct.

@jsuhncc Can you file a GitHub issue?

1 Like

@bghgary was the issue filed?

No, not yet.

Filed one here: URL Processing Bug · Issue #1164 · BabylonJS/BabylonNative (github.com)


Sorry for the slow fix on this one. We have been busy.

I have a PR ready that will fix this issue: Fix URL processing code by bghgary · Pull Request #1180 · BabylonJS/BabylonNative (github.com)

It will need to be merged and updated in Babylon React Native along with a new package before it will be useable.


I believe the latest versions of BRN should be fixed.

1 Like