I’ve been following the Shopify guide here on how to host an app for Shopify.
I’ve checked the logs, no errors.
Updated Shopify Partner details to match the Fly.io callback URL.
Every time I try to install the app to a development site in Shopify Partners for testing, after a while I get the error ‘The connection was reset’. Not sure where to go from here.
I’m not super familiar with shopify apps. Where are you seeing “The connection was reset” exactly?
Could you share some of your fly.toml? If the connection is reset navigating directly to your app its possible there’s a missing piece of configuration.
I’m seeing the connection reset error after a period of time when navigating to the app from Shopify Partners. I go to install it, it requests the HOST url, and then ‘connection reset’ appears after about 30 seconds…
Looks like you’re missing services in your fly.toml. The Shopify docs are a little confusing there, but you do need to expose services as well as configuring the internal_port. Try this:
That has worked. The app seems to be working when called now.
However, why I go to install the app for testing through Shopify Partners, I am getting the error: “Oauth error invalid_request: The redirect_uri is not whitelisted”.
I’ve solved the issue. I noticed the redirect URL generated was coming back with a double protocol (i.e. https://https://). The Shopify App requires a hostname variable, but for some reason does not want the URL protocol in the hostname. Removing ‘https://’ in the app allowed everything to flow through.