I’m trying to create new Shopify app using shopify-app-cli, I set up all redirect links and .env file, but when I run Shopify serve and when it says Ready on http://localhost:8081, I go to localhost page and it shows this error: Expected a valid shop query parameter.
What does it mean?
I checked my .env file for maybe typos, but everything is copied fine.
4
Answers
That mean you have miss
yourshopname.myshopify.com
. This needed when you authenticated your app.For more information read here
in my case the problem was in Safari, it’s worth checking in Chrome
Had the same error; was able to fix it by going to url mentioned after shopify create was executed:
Run shopify serve to start a local server
Then, visit
https://partners.shopify.com/<ACCOUNT-ID>/apps/<APP-ID>/test
toinstall on your Dev Store
see: https://github.com/Shopify/shopify-app-cli/issues/201#issuecomment-620286966
This can be a problem with ngrok URL or a third-party service in your Shopify app blocking the connection.
1-
You’ll need to set up your app in the partners dashboard with the ngrok URL you get from Shopify server, ex:
Check this github issue or this blog-post for more info.
2-
In case you’re using a third-party’s server like MangoDB in your app, you need to change your DNS server address (some ISPs cram as many DNS’s as possible).
I will be using Google’s DNS
8.8.8.8
in this example:Linux:
If you are connected to a WiFi network click on the “Wi-FI” tab.
Otherwise, if you have a wired connection click on the “Network”
tab.
Select the connection for which you want to set the DNS nameservers
and click on the cog icon to open the Network Manager.
Select the IPv4 Settings tab.
Disable the “Automatic” toggle switch and enter the DNS resolvers IP
addresses
8.8.8.8
Clear (Flush) the DNS cash (required for Ubuntu 18.04^) follow this article
Windows:
Control Panel and select Network and sharing center.
Click on Change adapter settings.
right-click on Local Area Connection and then select Properties.
select the option Internet Protocol Version 4 (TCP/IPv4) and then click on properties.
Choose the radio button Use the following DNS server addresses and enter the
8.8.8.8
value inPreferred DNS server:
Clear (Flush) the DNS cash follow this article