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

Modelviewer throws SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data #2276

Open
nhm1990 opened this issue Jul 1, 2024 · 2 comments
Labels
Bug Something isn't working SEV-4

Comments

@nhm1990
Copy link

nhm1990 commented Jul 1, 2024

What is the location of your example repository?

No response

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

2024.4.7

What version of Remix are you using?

2.9.2

Steps to Reproduce

  1. Upload .glb model to product.
  2. Load model (model3d) via product/GraphQL
  3. What I had also to do is added scriptSrc: ["'self'", 'https://unpkg.com', ...] to "createContentSecurityPolicy"
  4. initialize model with hydrogen component

Expected Behavior

Model will be rendered and can be loaded/viewed.

Actual Behavior

Just preview image is shown and error "JSON.parse: unexpected character at line 1 column 1 of the JSON data" is thrown.
(See screenshot)

  • I was also able to reproduce it in older hydrogen versions.
  • #UPDATE: With sample model provided by shopify it's working. My model is also working with the generic shopify online-store template, but not with hydrogen.

model viewer issue

@blittle blittle added Bug Something isn't working labels Jul 2, 2024
@michenly
Copy link
Contributor

michenly commented Jul 5, 2024

@nhm1990, can you please provided a stackblitz reproduction of the issue?

@nhm1990
Copy link
Author

nhm1990 commented Jul 17, 2024

Unfortunately my model is not for public use, but I found out that this seems to be related to the model.... It seems to work correctly with another example model.

@blittle blittle added the SEV-3 label Jul 18, 2024
@michenly michenly added SEV-4 and removed SEV-3 labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working SEV-4
Projects
None yet
Development

No branches or pull requests

3 participants