Shopify\Utils::sanitizeShopDomain(): Argument #1 ($shop) must be of type string, null given

pl_andrea
Shopify Partner
2 0 0

Hello,

I'm getting error:

 

Shopify\Utils::sanitizeShopDomain(): Argument #1 ($shop) must be of type string, null given

 

when first installing app from shopify cli with php.
I'm using WSL2 with Ubuntu 20.04, i access install page with the ngrok link something like:
 
and after successfully installed my app on my dev store i get a white page. From Laravel log i can see 

 

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

 

Replies 2 (2)
pl_andrea
Shopify Partner
2 0 0

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.

pawankumar1
Shopify Partner
1 0 0

I am having latest version but it's not perfroming and giving me same error.