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 problem with snaps quickstart #1714

Closed
seddik11 opened this issue Aug 30, 2023 · 8 comments
Closed

cors problem with snaps quickstart #1714

seddik11 opened this issue Aug 30, 2023 · 8 comments

Comments

@seddik11
Copy link

Hi,

I was following this tutorial to start my first snap however I encountered this cors error when i try to connect.

BTW I am using github codespace.

Thank you

image

@Montoya
Copy link
Collaborator

Montoya commented Aug 30, 2023

Hi @seddik11! There may be multiple issues here, but regarding CORS, snaps have a null origin, so any API that your snap needs to talk to needs to allow null origin.

@Montoya
Copy link
Collaborator

Montoya commented Aug 30, 2023

If you want to share your codespace so I can see the code feel free to do so.

@seddik11
Copy link
Author

Hi thank you for your reply.

I didn't change anything in the code. I just used this command yarn create @metamask/snap your-snap-name to create the app. Except this line I changed from localhost to the domain where the app is runnning

image

because of this

image

@seddik11
Copy link
Author

I got this error also when i try to connect

image

@Montoya
Copy link
Collaborator

Montoya commented Aug 30, 2023

There may be an issue in the create-snaps package. What version of node are you running? If you can't get it to work, I recommend cloning this template and running that locally without changing anything: https://github.com/MetaMask/template-snap-monorepo

@seddik11
Copy link
Author

Thank you for your help.

I was able to have the app running successfully on localhost except this error I see in logs (BTW I am on a linux environment on chromebook)

image

But when I try to connect I have two problems:

first one is this error message

image

second thing I can't scroll down to accept and go to next step

image

@seddik11
Copy link
Author

I was able to run it successfully on windows locally

@kenhkan
Copy link

kenhkan commented Mar 8, 2024

Closing this since GitHub Codespaces is not something that the snaps team currently supports.

@kenhkan kenhkan closed this as completed Mar 8, 2024
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