model_viewer_plus.dart icon indicating copy to clipboard operation
model_viewer_plus.dart copied to clipboard

Not load the glb file on release mode (Live Server) in flutter web

Open harshitappscrip opened this issue 2 years ago • 7 comments

i am using the GLB file from flutter assets. it is working fine in debug and release as well. but when i push the build to live server and then access it is not loading properly. I am getting blank.

Please check the screenshot for console logs

Screenshot 2023-02-01 at 12 27 33 PM

harshitappscrip avatar Feb 01 '23 06:02 harshitappscrip

Maybe you can try this After you build the web file

  1. Find glb file from build/web/assets/assets/<your_glb_folder_name>/xxxx.glb

  2. Copy xxxx.glb to build/web/assets/<your_glb_folder_name>/xxxx.glb

  3. Copy web folder to server

This is because the assets generated by flutter web will be assets/assets, fix this file path, the model can be displayed well.

ossgoossgo avatar Mar 18 '23 14:03 ossgoossgo

@ossgoossgo Let me try this solution. DO you have any other solution ?

harshitappscrip avatar Mar 21 '23 05:03 harshitappscrip

This solution is not working for me @ossgoossgo. any other ?

harshitappscrip avatar Mar 21 '23 12:03 harshitappscrip

I'm facing the same problem Have you found a solution?

amXCVI avatar May 09 '23 14:05 amXCVI

Facing the same problem, I tried the example code, but in the live server nothing is showing, trying it on android device and it is working like a charm...any advice? Thank you Screenshot 2024-01-10 005048

zManu4K avatar Jan 09 '24 23:01 zManu4K

Actually, I am facing the same issue. So temporarily, I upload the file on a host and then use the link from this host to display it on my website, and it works. However, it still doesn't work from assets only the network is working .. any solution to load it from assets ?

adelhammoda avatar Feb 20 '24 14:02 adelhammoda

Hello, I used the same workaround

Il giorno mar 20 feb 2024 alle ore 15:58 adelhammoda < @.***> ha scritto:

Actually, I am facing the same issue. So temporarily, I upload the file on a host and then use the link from this host to display it on my website, and it works. However, it still doesn't work from assets only the network is working .. any solution to load it from assets ?

— Reply to this email directly, view it on GitHub https://github.com/omchiii/model_viewer_plus.dart/issues/70#issuecomment-1954398526, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJTN5SRXPKDTMI2ZUCBSYLYUS2Y5AVCNFSM6AAAAAAUNKXUTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJUGM4TQNJSGY . You are receiving this because you commented.Message ID: @.***>

zManu4K avatar Feb 22 '24 11:02 zManu4K