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

CORS: Unhandled Runtime Error #87

Closed
uixmat opened this issue Oct 27, 2022 · 4 comments
Closed

CORS: Unhandled Runtime Error #87

uixmat opened this issue Oct 27, 2022 · 4 comments

Comments

@uixmat
Copy link

uixmat commented Oct 27, 2022

Hey, i'm developing a site locally on localhost:3000 and I'm receiving the following error ion console:

Access to fetch at 'https://prod.spline.design/PVMoc332wUkkwrCV/scene.splinecode' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I've taken a look at the docs but can't see anything that suggests i cant put this into my project locally ?

import Spline from '@splinetool/react-spline';

export default function App() {
  return (
    <Spline scene="https://prod.spline.design/PVMoc332wUkkwrCV/scene.splinecode" />
  );
}
@edwindharris
Copy link

edwindharris commented Oct 27, 2022

I tested your .splinecode link in my react <> spline template locally, and the console returned the same error as you are receiving. The link in my project does not throw the error. I know this doesn't help, but might support any processes of elimination at your end.

Duplicating and re-exporting a scene in Spline app generates a new link / fresh export... I try this when I get stuck , it sometimes solves mysterious goings-on.

@uixmat
Copy link
Author

uixmat commented Oct 28, 2022

Ah that’s good to know, will give it a try and update if it works - thank you

@uixmat uixmat closed this as completed Oct 28, 2022
@uixmat uixmat reopened this Oct 28, 2022
@xodms0309
Copy link

I'm having the same issue :< It was working fine, but suddenly receiving CORS error randomly. sometimes it works, sometimes it doesn't. I would like to get an update about this issue if there's a solution.

@uixmat
Copy link
Author

uixmat commented Nov 2, 2022

I tested your .splinecode link in my react <> spline template locally, and the console returned the same error as you are receiving. The link in my project does not throw the error. I know this doesn't help, but might support any processes of elimination at your end.

Duplicating and re-exporting a scene in Spline app generates a new link / fresh export... I try this when I get stuck , it sometimes solves mysterious goings-on.

@edwindharris This fixed the issue thanks mate

@uixmat uixmat closed this as completed Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants