Shopify / hydrogen

Hydrogen lets you build faster headless storefronts in less time, on Shopify.
https://hydrogen.shop
MIT License
1.19k stars 241 forks source link

Unable to connect to connect my store. #2037

Open mhmdjaw opened 3 weeks ago

mhmdjaw commented 3 weeks ago

What is the location of your example repository?

No response

Which package or tool is having this issue?

CLI

What version of that package or tool are you using?

7.1.2

What version of Remix are you using?

2.6

Steps to Reproduce

I'm able to login and link my shopify account but after that when I run h2 link I get this error message "message": "Access denied for hydrogenStorefronts field. Required access: Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel."

I found a post of other people having the same issue here but no solution was found to fix the actual problem.

Expected Behavior

Pull the env variables from the storefront.

Actual Behavior

Error message

bensparrowdev commented 3 weeks ago

Also experiencing this

graygilmore commented 3 weeks ago

Do you have the Hydrogen sales channel installed on the shop you're trying to connect to?

mhmdjaw commented 3 weeks ago

@graygilmore yes. and I’m able to connect my app to it by manually entering environment variables locally. The problem is that I can’t auto pull with h2 link and I get the error mentioned above even though I’m logged in with the CLI.

graygilmore commented 3 weeks ago

And the user you're logging in with can access the Hydrogen sales channel in the admin, too? If yes, I'll need to do a little debugging on my side but I'll need something to go off of. Try it again and there should be a "Request ID" below the error. Copy and paste that here and we can dig into it.