cli
cli copied to clipboard
[Bug]: Logging in to customer account throws 400 error : "expected String to be a Hash: customer"
Please confirm that you have:
- [X] Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
- [X] Reproduced the issue in the latest CLI version.
In which of these areas are you experiencing a problem?
Theme
Expected behavior
Login should be successful. When logging in using the same theme from the Shopify URL, everything works as expected.
Actual behavior
When logging in to the customer account using http://127.0.0.1:9292 a Shopify error page is shown. This only happens using the CLI preview URL, when using the Theme Access app with a theme environment set up with shopify.theme.toml. Not using the environment flag and logging in via partners account seems to work fine.
Verbose output
N/A
Reproduction steps
- Set up store access with Theme Access app
- Add a theme environment like this:
[environments.dev]
theme = "123456789"
store = "my-store"
password = "shptka_123456"
ignore = ["templates/*.json", "config/*.json", "locales/*.json"]
- Run
shopify theme dev --environment dev - Navigate to http://127.0.0.1:9292/account/login and attempt to log in
- See following error:
Operating System
Mac OS Ventura
Shopify CLI version (check your project's package.json if you're not sure)
Current Shopify CLI version: 3.47.5
Shell
zsh
Node version (run node -v if you're not sure)
v16.6.1
What language and version are you using in your application?
N/A
@nboliver-ventureweb thanks for getting in touch! You can't log in via the login button when previewing locally; instead you need to use the store password.
Please confirm this solves your difficulty.
Thank you for reporting this, @nboliver-ventureweb!
Could you please confirm that this issue doesn't occur when you authenticate in the store without the --password flag? This information will help us in understanding the root cause of the issue.
Thanks again for reporting this!
@karreiro When authenticating with the --password flag (using the password provided by the Theme Access app), the issue also occurs. So, regardless of whether the password flag is passed via the .toml file or the CLI command, customer login doesn't work. When authenticating via the partners account (ie. no password flag), it works properly. Let me know if you need me to provide more context. Thanks!
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
Just bring this back to life, just started encountering this issue myself. I am using the shopify.theme.toml file too.
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.