I give up, I can't get this to work even though in the Shopify documentation it says it should. I just need to turn off the loading spinner.
And then this is the documentation from Shopify:
Stops the loading spinner. Should probably be called on every page in ShopifyApp.ready().
There is nothing in the
application.html.erb file or the
embedded_app.html.erb file that would override this..
I found other people with the same issue. (https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/shopify-loading-bar-spinner-is-not-complete-after-loading-full-page-successfully-300289)
Any idea what I'm doing wrong?
I think you're missing a key debugging check. Check your console, specifically the console logs for the embedded App iframe. I bet you'll find one of two things.
you made a JS error and therefore that code is not running (the code you pasted is correct and does work)
there is another process not working, like a connection to a network resource (websocket??)
Anytime some Shopify embedded App code borks, you might see the loading bar go slowly and forever. These events are usually short-lived.
My guess is, you have a JS error in your code, so as soon as you fix that, your loading bar issues will disappear.
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.