Recently I chose to commit to learning how to create shopify apps by building one myself.
Iβm new to using ngrok and had no issues at first. But now when I run shopify serve and follow the URL I get to a blank screen with the error:
Tunnel bf256c0ea7e2.ngrok.io not found
I have looked around and posted on their GitHub with an issue but there is no response. I have seen something about whitelisting because ngrok is supposed to generate a new URL every time it runs but I checked and the URL it keeps spinning up is the same constantly. Itβs also listed in my App setup urlβs correctly.
Would really appreciate any help. Iβm not ready to give up on my app idea.
Does ngrok pass that information to the shopify cli somehow? Or is this the App setup redirection URLβs What goes where?
I donβt know why this is not explained anywhere. I have been looking for this information for days now. nrok and Shopify documentation either donβt have it or I wasnβt able to find it.
I have no problem running a ngrok server and displaying a project on my local machine on the URL but I canβt seem to do the same when running the Shopify serve command since the URL there stays static even after it asked me to update it once it remained the same.
PS C:\Users\rjkam\Desktop\GameVertion\GameVertionApp> cd gamevertion
PS C:\Users\rjkam\Desktop\GameVertion\GameVertionApp\gamevertion> shopify serve
β ngrok tunnel running at https://bf256c0ea7e2.ngrok.io, with account r.j.kamman@gmail.com
β .env saved to project root
? Do you want to update your application url? (You chose: yes)
β Whitelist URLS updated in Partners Dashboard
4* restarted vscode and ran a new terminal shopify serve command. again selected yes to update URL here follows the output:
PS C:\Users\rjkam\Desktop\GameVertion\GameVertionApp> cd gamevertion
PS C:\Users\rjkam\Desktop\GameVertion\GameVertionApp\gamevertion> shopify serve
β ngrok tunnel running at https://bf256c0ea7e2.ngrok.io, with account r.j.kamman@gmail.com
β .env saved to project root
? Do you want to update your application url? (You chose: yes)
β Whitelist URLS updated in Partners Dashboard
Are you building a node or rails app with shopify CLI?
Not sure if this will be helpful, but when I was using shopify CLI and building a rails app, everything was really straightforward - it automatically updated the ngrok url after it expired and if the ngrok url changed, it would also prompt me if I wanted to automatically update the appβs URL accordingly within the partner dashboard.
Iβm using Node and React on this project since Iβm more familiar with them.
I will try building a new app with rails to see if that works.
Iβm not too familiar with ruby nor rails. But Iβm committed to this app and making Shopify my long-term development niche so I will have to learn them anyway.
Free ngrok tunnels expire, so youβll need to restart your tunnel. Shopify doesnβt make it easy to take control of the tunnel yourself, so usually the accepted solution wonβt work. Youβll need to stop the tunnel that shopify-cli thinks is running before serving.
I now include this in all my start scripts:
$> shopify app tunnel stop && shopify app serve
Be sure to select βyesβ to update the application url.