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

Cannot use origin without a scheme #1

Closed
antogalli opened this issue Nov 15, 2023 · 8 comments
Closed

Cannot use origin without a scheme #1

antogalli opened this issue Nov 15, 2023 · 8 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@antogalli
Copy link

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

Loading like this:
O3D(
src: 'assets/3d/refix_spray_ORBIT_cam.glb',
controller: o3dcontroller,
ar: false,
autoPlay: true,
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

@babakcode
Copy link
Owner

Please share your file, I will check it.

@antogalli
Copy link
Author

Nothing Special. I Got a page with scaffold, and your Widget.
This is the call in the body:

O3D(
src: 'assets/3d/refix_spray_ORBIT_cam.glb',
controller: o3dcontroller,
ar: false,
autoPlay: true,
autoRotate: true,
),

This is the asset of my pubspec:
[...]
assets:
- assets/
- assets/3d/refix_spray_ORBIT_cam.glb
[...]

@babakcode
Copy link
Owner

Some Glb files are not exported correctly by their creators, so I'm going to get your file to test it, but it seems to have an error in release mode, I'll fix that. Please test it in debug mode and let me know.

@antogalli
Copy link
Author

antogalli commented Nov 15, 2023 via email

@babakcode
Copy link
Owner

Probably, You don't add clear text traffic in the Android manifest. Put this code clearText Traffic="true" inside the android manifest.

@antogalli
Copy link
Author

Yes, i put it in manifest:

android:usesCleartextTraffic="true"

@babakcode
Copy link
Owner

Dear @antogalli,

I've addressed the Android and web release bugs and would appreciate it if you could review the updated version of the O3D package. For a thorough check on the Android platform, please test it on a real device.

@babakcode babakcode self-assigned this Nov 19, 2023
@babakcode babakcode added bug Something isn't working question Further information is requested labels Nov 21, 2023
@antogalli
Copy link
Author

antogalli commented Nov 21, 2023

I'm trying it now. I don't receive the error anymore, but the model is not renderized if present in Assets. Works only on remote GLB. Tested in Debug Mode Android APILEVEL 33

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

No branches or pull requests

2 participants