OAuth error = same site cookies

Topic summary

Embedded Shopify app installs fail when third‑party cookies are disabled, causing a redirect loop and the “This app can’t load due to an issue with browser cookies” error. After closing the error, the app loads, but the goal is to avoid the error during install.

Context: Legacy Rails app modernized (App Bridge v1→v3, EASDK removed, shopify_app gem v12→v18, JWT auth, Turbolinks→Turbo). Despite removing cookie session config, two cookies still appear in Network tab; origin unclear.

Multiple developers report the same issue across environments: staging vs production, local (works) vs remote (fails), with minimal config differences.

Early suggestions (add a “Continue to site” link, JS reload/redirect) lacked detail and no confirmed success.

Resolution update: One team fixed the loop by properly upgrading/migrating Shopify App Bridge per Shopify’s migration guide, using the latest Shopify API version (2024‑04). This points to App Bridge migration/config—not cookie settings—as the primary cause.

Status: A practical solution exists—audit and complete the App Bridge migration per Shopify’s guide. No official Shopify response in-thread; others may still be affected if migration steps are incomplete.

Summarized with AI on December 29. AI used: gpt-5.

Hello all! I have ran into an issue where installing my embedded app using a browser with third-party cookies disabled is causing a redirect loop which ends at an error page saying “This app can’t load due to an issue with browser cookies. Try enabling cookies in your browser”. If I close the error page and then return to the app, it works normally - but I do not want users to see this error on installation.

A bit of background - This is an old Ruby/Rails app that I have been tasked with updating to pass a Shopify audit. So far I have upgraded AppBridge from 1 to 3, replaced deprecated EASDK methods, upgraded shopify_app gem from 12 to 18, implemented JWT authentication, and replaced turbolinks with turbo.

Since implementing JWT auth (using this repo as a guide https://github.com/kirillplatonov/shopify-hotwire-sample), I dont believe I need to use cookies anywhere in the app and I do not explicitly create any. However, when inspecting a document in the dev tools>network, I see two cookies which I feel might be the issue.

The file session_store.rb used to contain this line

Rails.application.config.session_store :cookie_store, key: '_youneeq_recommendations_session', secure: true, same_site: 'None' 

But this line has long since been removed and yet the cookie persists.

Any suggestions on how to track down where these cookies are coming from, or other feedback would be greatly appreciated!

3 Likes

Prepare site with ‘Continue to site’ link (cookie of course will be send after hitting link)
Reload window with JavaScript
Prepare site with JavaScript which will redirect user
Combine first and third method to have cleaner solution, and working without JavaScript support in browser.

Regards,
Jimmy

Hi @Jameswalter !

I have a situation similar to @MarkP3

Could you please give me a bit more detail on how to achieve the steps you mentioned in your reply above?

Is there any Shopify documentation that I can refer to?

Thanks!

Hi @craftonix

I have exact same situation. Were you able to solve this ??

How can I prevent this error? My Development app works fine, but my production app has this issue and it won’t load at all now.

@catrawalkar No, I was not able to solve this.

I have verified all the webhooks and everything else. The only difference between the staging and production apps is the host part of the domain, e.g. staging-app.example.com and production-app.example.com, and of course RAILS_ENV=‘staging’ and RAILS_ENV=‘production’, and the fact that they each have their own database.

Can someone from Shopify please help? Is there documentation that can help? What information do you need to help us diagnose this?

I also get same issue
stage app not working but prod app is working
Please share solution if you have

I’m facing the same issue. I’m using js and the last Shopify version. The fact is that when I run the application locally using the shopify library, it works like a charm, but when I deploy the application to a remote server it causes the redirection and finally the “the app couldn’t be loaded” message. Any workaround?

Exactly the same here. Any workaround or suggestion is appreciated.

We managed to solve this issue. It was basically the new version of shopify appbridge. Here’s the migration guide
We’re using the last shopify api version (2024-04).