App reviews, troubleshooting, and recommendations
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I have a public custom app (remix) and am wanting to use my own ngrok generated URL.
I have changed the shopify.app.toml file to NOT "automatically_update_urls_on_dev", and set my ngrok URL
But whenever I run the app it keeps generating the trycloudflare random url's for the redirect urls???? Why?
This is obviously causing a CORS issue when calling into my code running on localhost (redirected by ngrok)
I have even tried to set the App URL's via the partner dashboard for the App
How can i get the app to use my ngrok URL's and NOT regenerate the random internal cloudflare url's
Solved! Go to the solution
This is an accepted solution.
Solution: I now have this working and think I have worked out why it is now working. Firstly you need to specify a Port for the app to run on (as if you don't it will use any random port). The defined port is used when we setup ngrok to create an on demand tunnel or a tunnel using private domain
The Port is added to the (I used 8002)
Then you just need to have another terminal window open with the ngrok tunnel running on it - you can do this using
ngrok http --domain=lightly-included-lizard.ngrok-free.app 8002
and you can see it has my domain linked to port 8002
and then just fix up all the references in the shopify.app.toml file to use these as above in question
Oh and of course I now run using this command (to ensure it uses the configuration
npm run dev -- --tunnel-url="https://lightly-included-lizard.ngrok-free.app:8002"
This is an accepted solution.
Solution: I now have this working and think I have worked out why it is now working. Firstly you need to specify a Port for the app to run on (as if you don't it will use any random port). The defined port is used when we setup ngrok to create an on demand tunnel or a tunnel using private domain
The Port is added to the (I used 8002)
Then you just need to have another terminal window open with the ngrok tunnel running on it - you can do this using
ngrok http --domain=lightly-included-lizard.ngrok-free.app 8002
and you can see it has my domain linked to port 8002
and then just fix up all the references in the shopify.app.toml file to use these as above in question
Oh and of course I now run using this command (to ensure it uses the configuration
npm run dev -- --tunnel-url="https://lightly-included-lizard.ngrok-free.app:8002"
How would this approach be used if starting the app using npm start?