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

Shopify\Utils::sanitizeShopDomain(): Argument #1 ($shop) must be of type string, null given, called in C:\laragon\www\shopify-first-app\web\app\Lib\AuthRedirection.php on line 17 #487

Open
mathishuettl opened this issue Nov 28, 2023 · 3 comments

Comments

@mathishuettl
Copy link

Issue summary

Write a short description of the issue here ↓
I get the following error, when I access http://localhost:56554

Shopify\Utils::sanitizeShopDomain(): Argument #1 ($shop) must be of type string, null given, called in C:\laragon\www\shopify-first-app\web\app\Lib\AuthRedirection.php on line 17

Expected behavior

What do you think should happen?
App frontend is shown

Steps to reproduce the problem

I followed the installation steps

@sinarahmany
Copy link

sinarahmany commented Jan 1, 2024

I'm having the same issue but after a bit of googling it turned out many have this issue and you should do the local development using the "Preview URL" given when you run npm run dev.

@qualia-user
Copy link

I'm having the same issue but after a bit of googling it turned out many have this issue and you should do the local development using the "Preview URL" given when you run npm run dev.

Nope, preview URL only redirects you to admin.shopify.com/store . From there you can see your app embedded, but that doesn't solve anything.

As far as I could understand, the error occurs with the middleware in the 'EnsureShopifyInstalled' class. It turns out that there is no shop key in the request, so the helper method 'sanitizeShopDomain' returns an error.

I'm guessing it's a configuration error, but I still haven't been able to figure it out.

Has anyone had a similar problem, does anyone have a suggestion on how to debug or point in some direction?

Thank you

@kamalsharma9392
Copy link

Hey @qualia-user , I'm encountering the same problem where I can't access the app outside of the Shopify admin. I attempted to pass the shop in the query parameters to troubleshoot, but it seems to require additional parameters that ultimately direct me back to the Shopify admin. If anyone has found a solution, I'd appreciate it if you could share.

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

4 participants