cli icon indicating copy to clipboard operation
cli copied to clipboard

[Bug]: Logging in to customer account throws 400 error : "expected String to be a Hash: customer"

Open nboliver-ventureweb opened this issue 2 years ago • 7 comments

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.

image

Verbose output

N/A

Reproduction steps

  1. Set up store access with Theme Access app
  2. Add a theme environment like this:
[environments.dev]
theme = "123456789"
store = "my-store"
password  = "shptka_123456"
ignore = ["templates/*.json", "config/*.json", "locales/*.json"]
  1. Run shopify theme dev --environment dev
  2. Navigate to http://127.0.0.1:9292/account/login and attempt to log in
  3. See following error: image

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 avatar Jul 20 '23 17:07 nboliver-ventureweb

@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.

amcaplan avatar Jul 24 '23 08:07 amcaplan

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 avatar Jul 24 '23 13:07 karreiro

@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!

nboliver-ventureweb avatar Jul 25 '23 15:07 nboliver-ventureweb

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.

github-actions[bot] avatar Aug 16 '23 03:08 github-actions[bot]

Just bring this back to life, just started encountering this issue myself. I am using the shopify.theme.toml file too.

lukecharle avatar Sep 01 '23 10:09 lukecharle

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.

github-actions[bot] avatar Sep 23 '23 03:09 github-actions[bot]

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.

github-actions[bot] avatar Mar 09 '24 03:03 github-actions[bot]

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.

github-actions[bot] avatar Jul 20 '24 03:07 github-actions[bot]