0
votes

I've been having some trouble trying to set up a Shopify app so that I can develop it in my local Rails environment.

I've followed the documentation HERE but when I install the app into my shopify dev store I get an error stating localhost sent an invalid response.

My local rails server log shows:

ERROR bad URI '::�+�/�,�0̨̩�\x14�\x13�\x13�\x14\x00�\x00�\x00/\x005\x00'.
ERROR bad Request-Line '\x16\x03\x01\x00�\x01\x00\x00�\x03\x03d��������\x1F�ŭ����=G�+q\r[��� N�\x00\x00 jj�+�/�,�0̨̩�\x14�\x13�\x13�\x14\x00�\x00�\x00/\x005\x00'.

After digging through other shopify docs I found this:

enter image description here

This says to tunnel with ngrok to avoid problems which makes sense, except that the shopify_app documentation states to specify http://localhost:3000 as the application URL and http://localhost:3000/auth/shopify/callback as the Redirection URL.

Can anyone tell me how to set my Shopify app so I can develop it locally? Or is this something I will have to develop live on heroku?

1

1 Answers

1
votes

Ngrok is simply a tunnel to localhost, so you can set your application URL to https://subdomain.ngrok.io and redirection URL as https://subdomain.ngrok.io/auth/shopify/callback. You can configure ngrok to tunnel on port 3000 by specifying the port number when initializing ngrok: ./ngrok http 3000.