-
Notifications
You must be signed in to change notification settings - Fork 262
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
cant connect store to hydrogen #2419
Comments
I am unable to re-produce this on my end, and this looks to be permission related and its impossible for me to verify. @graygilmore do you know what settings is missing that might trigger this response? Pass that I would suggest that you contact your Shopify customer service who have access to your account to check for the proper permission. |
thanks @michenly for your reply, i've tried every single permission inside headless app > storefront api settings. but the error stands. that image says. The Admin GraphQL API responded unsuccessfully with errors:
[
{
"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.",
"locations": [
{
"line": 3,
"column": 5
}
],
"path": [
"hydrogenStorefronts"
],
"extensions": {
"code": "ACCESS_DENIED",
"documentation": "https://shopify.dev/api/usage/access-scopes",
"requiredAccess": "Request must be initiated from the Shopify CLI
and user must have full access to apps or access to the Hydrogen channel."
}
}
]
Request ID: b8468db5-e0b6-4f3c-9bb9-975bd1c09e2a-1723221772
To investigate the issue, examine this stack trace:
at makeRequest (Users/horizon/AppData/Roaming/npm/node_modules/@shopify/
cli/dist/chunk-UBCH575K.js:50408)
at processTicksAndRejections (node:internal/process/task_queues:95)
at async debugLogResponseInfo (Users/horizon/AppData/Roaming/npm/node_mo
dules/@shopify/cli/dist/chunk-UBCH575K.js:50444)
at (Users/horizon/AppData/Roaming/npm/node_modules/@shopify/cli/dist/chu
nk-U2PN6QZ2.js:4671)
at (Users/horizon/AppData/Roaming/npm/node_modules/@shopify/cli/dist/chu
nk-T4Y7NDNJ.js:42849)
at async adminRequest (Users/horizon/AppData/Roaming/npm/node_modules/@s
hopify/cli/dist/chunk-K7KD247K.js:156914)
at async getStorefronts (Users/horizon/AppData/Roaming/npm/node_modules/
@shopify/cli/dist/chunk-K7KD247K.js:156973)
at async linkStorefront (Users/horizon/AppData/Roaming/npm/node_modules/
@shopify/cli/dist/chunk-K7KD247K.js:163050)
at async runLink (Users/horizon/AppData/Roaming/npm/node_modules/@shopif
y/cli/dist/chunk-K7KD247K.js:163014)
at run (Users/horizon/AppData/Roaming/npm/node_modules/@shopify/cli/dist
/chunk-K7KD247K.js:163002) |
also, when i setup the custom storefront it doesnt gave me the .env file include store token or store url as it seems to be including on first setup |
It sounds like your particular account does not have access to Apps or the Hydrogen sales channel. It's not about the access that the channel has, it's about the access that you have to the channel. The link that the error message is providing is misleading. If you can confirm that the account you're logging in with has access to apps (you can test this by logging in with that account and navigating to the Hydrogen sales channel in the admin) we can dig into the logs to see what's up. |
I have some questions for this, the same error was faced by us ( me and @KedarMalapDev ), but after some research we did found the solution for this. But before telling you the solution, let me know the answers for the questions:
|
I have this kind of same Error on Linking Mock.shop by "npx shopify hydrogen link" or "h2 link" I was according this Official Guide https://shopify.dev/docs/storefronts/headless/hydrogen/getting-started to linking my Headless Storefront to Mock.shop of Hydrogen. Which is the Step 3 as https://shopify.dev/docs/storefronts/headless/hydrogen/getting-started#step-3-link-your-hydrogen-project-to-shopify and get error by npx shopify hydrogen link command. |
@HeisUser what are you trying to do? Have you already created a Hydrogen storefront in your Shopify admin? |
Please read my first comment again, because I'd edited it. |
@HeisUser the Hydrogen CLI commands only relate to storefronts in the Hydrogen channel, not the Headless channel. Make sure the user you are authenticating over the CLI with is the same user that has access to the Hydrogen channel in the admin. |
Noted.. Anyways how to linking to Headless Channel? |
This is not possible and isn't planned. |
I'm not understanding.. R u mean Headless channel hasn't to be used and ready yet? |
You cannot link a local Hydrogen storefront to something in the Headless channel. You can only link a Hydrogen storefront to something in the Hydrogen channel. |
I know the Hydrogen app (paid) on Sales Channels is not allowed to be linking the Storefronts in development mode. Anyways, How to use & linking Headless app on Sales Channels ? |
You cannot link a local Hydrogen storefront to the Headless sales channel. The only thing you can link is a Hydrogen storefront to the Hydrogen sales channel. If you plan on building with Hydrogen and hosting on Oxygen then uninstall the Headless sales channel. If you plan on building with Hydrogen and hosting on something other than Oxygen then you can keep the Headless sales channel but you won't be able to use some of the features of the CLI (like |
Thank you for your guides. |
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?
CMD
What version of Remix are you using?
No response
Steps to Reproduce
following this documentation im stuck on store connection.
https://shopify.dev/docs/storefronts/headless/hydrogen/getting-started#step-1-create-a-new-hydrogen-storefront
Expected Behavior
it must connect the shopify store to my local hydrogen storefront: the authentication issues comes up.
Actual Behavior
this is what im experiencing right now while connecting to store. i tried finding CLI > SHOPIFY CLI but couldnt find it.
The text was updated successfully, but these errors were encountered: