Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Exception: Bad state: Cannot use origin without a scheme: (any gltf files) #93

Open
jaenanigans opened this issue Sep 14, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@jaenanigans
Copy link

Hey, the src input doesn't work for gltf files. I've tried numerous times and it keeps throwing this error: Unhandled Exception: Bad state: Cannot use origin without a scheme: assets/BusterDrone.gltf
The assets folder contains the gltf file and the .bin file. I've tried using .glb file under the same directory: assets/DamagedHelmet.glb, and that works just fine.
Please help.

@jaenanigans jaenanigans added the bug Something isn't working label Sep 14, 2023
@hellhorse123
Copy link

Try to open your file in this online 3d viewer:
https://3dviewer.net

If it gives you an error then problem in models

@jaenanigans
Copy link
Author

I used the online 3d viewer and the .gltf and .bin files work just fine. I checked the gltf file and it references the .bin file under"uri" in the same origin as the gltf file. I'm currently storing the gltf file and its external resources under the "assets" directory and modified my pubspec.yaml to include them.
Unless I'm doing something wrong, could I see an example of how to load .gltf file (not .glb) using this package?

@antogalli
Copy link

I got the same problem on GBL files:

Loading the GLB from asset folder i cant view on Android Build:

Loading like this:
ModelViewer(
src: 'assets/3d/refix_spray_ORBIT_cam.glb',
autoRotate: true,
),

E/flutter ( 2836): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: Cannot use origin without a scheme: assets/3d/refix_spray_ORBIT_cam.glb

ModelViewerState._initProxy. package:model_viewer_plus/src/model_viewer_plus_mobile.dart:289

@omar-alshyokh
Copy link

same issue here

@WouterVandenputte
Copy link

Also having that problem...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants