Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I'm getting error:
Shopify\Utils::sanitizeShopDomain(): Argument #1 ($shop) must be of type string, null given
Shopify\Utils::sanitizeShopDomain(): Argument #1 ($shop) must be of type string, null given, called in /home/andrea/projects/shopify/test4/routes/web.php on line 29 {"exception":"[object] (TypeError(code: 0): Shopify\\Utils::sanitizeShopDomain(): Argument #1 ($shop) must be of type string, null given, called in /home/andrea/projects/shopify/test4/routes/web.php on line 29 at /home/andrea/projects/shopify/test4/vendor/shopify/shopify-api/src/Utils.php:31)
[stacktrace]
From what i could debug Laravel receive 3 times a hit on the fallback route and the third one contains no parameters.
The app is installed on the test store but if i enter app page i get the sanitizeShopDomain error.
I'm using:
WSL2 on Ubuntu 20.04
Composer 2.0.13
PHP 8.0.17
Shopify Cli 2.15.6
Ruby 2.7.0p0
Node 10.19.0
What could be the issue here?
Any help will be appreciated
thank you
For people having same issue, node.js version needed to be 14 or more.
While compiling app from shopify app, node was failing quietly.
Upgrading node was the solution, hope it will helps to someone.
I am having latest version but it's not perfroming and giving me same error.
I have just fixed this issue. Because your name of app is conflict with Shopify certain modules. so your app's name was set blank .It cause to show an error . you cannot use link like "http://127.0.0.1:51567" etc. you should use the link
https://xxxxxx.jp.ngrok.io?shop=testxxx.myshopify.com&host=dGVzdHl5bC5teXNob3BpZnkuY29tL2FkbWlu".it will be shown when you run the command " Shopify app dev". In a word, notice the name of app, make it is available.
I've the same issue. Was anyone able to solve this? I'm using the PHP(Laravel)/React template for the app. It's working fine when it is run as dev from ngrok but not working from the Docker.
Looks like the issue was in using local env settings in my case. Use APP_ENV=production, disable debug and don't forget about SHOPIFY_API_KEY, SHOPIFY_API_SECRET, SCOPES, HOST variables
This really helped, my problem was the APP_ENV. Thanks!
Hey! So I have the same error from the original question. I added to Heroku the APP_ENV = Production and made sure all the debug vars were removed but I am getting a server 500 error. If I add the debug config vars, the same sanitize shop domain is null from above. Any ideas? Thanks!
i have same issue but not working
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024