Repository: Shopify/shopify_app

Issue #468: First request hangs
Created: 2017-09-07T14:50:02Z
Using the new 8.1 gem, the idea is to use a session to store some OmniAuth info, rather than using a redirect with a GET parameter. Ok...
I still have the same issue as before now, and cannot quite grasp the solution. If I start a new session with the App, it hangs on first hit. If I refresh, the second hit works instantly. If I stop Rails server in my console and restart it, and refresh the App, it hangs. It works perfect second hit.
So it seems that something is up with the authentication code? I am not sure this is related to the Asset pipeline hanging. Why is it that any new Rails server on localhost will hang the App. The console shows the delivery of the App with a 200 OK status... but nothing is rendered.
So this remains a mystery to me, on how to solve. Is annoying to have to manually refresh the browser every time a session expires and not have the App just refresh itself to get a new session going.

Duplicate issue #464: oAuth Issue
Created: 2017-08-31T18:43:10Z
I understand this issue probably won't be resolved so easily, and I cannot easily post the App to a public repo without some re-tooling of it... but anyway... strange.
When I restart my rails server (localhost)  and hit the App... it just spins forever and never loads. I have a session assigned from the previous server incarnation. If I hit reload, the App works perfect. And continues that way till I restart the server. So it is that one shot where is hangs that confuses me. Never seen that quite the same way...  So to debug I look at the console, and the dump is the same for both except of course the HMAC payload from Shopify changes but on the first load, the view time is 10x higher or more... so something is gummed up in the rendering.
Any idea why the initial hit is stalling, and all others after that work fine? Minor annoyance for sure.. but one I would eventually like to clear up. Using gem 8.0.0 and Ruby 2.3.4.
INITIAL HIT AFTER SERVER RESTART - NO PAYLOAD
Started GET "/?hmac=e913301b7695a8c3327d720a10dfe1ee68f9ac4cc982931aa9357783c3fb0a62&locale=en&protocol=https%3A%2F%2F&shop=swift-braun3430.myshopify.com&timestamp=1504204361" for 127.0.0.1 at 2017-08-31 14:32:41 -0400
Processing by HomeController#index as HTML
  Parameters: {"hmac"=>"e913301b7695a8c3327d720a10dfe1ee68f9ac4cc982931aa9357783c3fb0a62", "locale"=>"en", "protocol"=>"https://", "shop"=>"swift-braun3430.myshopify.com", "timestamp"=>"1504204361"}
  Sequel::Postgres::Database (0.4ms)  SELECT * FROM "shops" WHERE ("id" = 1) LIMIT 1
I, [2017-08-31T14:32:41.841536 #22073]  INFO -- : (0.000582s) SELECT * FROM "shops" WHERE ("id" = 1) LIMIT 1
  Sequel::Postgres::Database (0.2ms)  SELECT * FROM "shops" WHERE ("shopify_domain" = 'swift-braun3430.myshopify.com') LIMIT 1
I, [2017-08-31T14:32:41.842305 #22073]  INFO -- : (0.000284s) SELECT * FROM "shops" WHERE ("shopify_domain" = 'swift-braun3430.myshopify.com') LIMIT 1
  Rendering home/index.html.haml within layouts/embedded_app
  Rendered home/index.html.haml within layouts/embedded_app (249.4ms)
Completed 200 OK in 325ms (Views: 316.4ms | Models: 0.6ms)

HIT AFTER FIRST HIT, DELIVERS PAYLOAD FINE
Started GET "/?hmac=d34c60e5810a6c94e9a6ec902cb56f96d6e96ec08be1c24a0c6b4f1baa3d19a3&locale=en&protocol=https%3A%2F%2F&shop=swift-braun3430.myshopify.com&timestamp=1504204394" for 127.0.0.1 at 2017-08-31 14:33:15 -0400
Processing by HomeController#index as HTML
Parameters: {"hmac"=>"d34c60e5810a6c94e9a6ec902cb56f96d6e96ec08be1c24a0c6b4f1baa3d19a3", "locale"=>"en", "protocol"=>"https://", "shop"=>"swift-braun3430.myshopify.com", "timestamp"=>"1504204394"}
Sequel::Postgres::Database (0.3ms) SELECT * FROM "shops" WHERE ("id" = 1) LIMIT 1
I, [2017-08-31T14:33:15.355268 #22073] INFO -- : (0.000340s) SELECT * FROM "shops" WHERE ("id" = 1) LIMIT 1
Sequel::Postgres::Database (0.2ms) SELECT * FROM "shops" WHERE ("shopify_domain" = 'swift-braun3430.myshopify.com') LIMIT 1
I, [2017-08-31T14:33:15.355862 #22073] INFO -- : (0.000249s) SELECT * FROM "shops" WHERE ("shopify_domain" = 'swift-braun3430.myshopify.com') LIMIT 1
Rendering home/index.html.haml within layouts/embedded_app
Rendered home/index.html.haml within layouts/embedded_app (4.7ms)
Completed 200 OK in 33ms (Views: 30.2ms | Models: 0.4ms)

Closing comment (2017-10-03T15:24:25Z): is this a dupe of #468 or is it different? Were you able to find the source of this issue?