Occasional OAuth Error: "The application cannot be loaded, it may be misconfigured."

Hello Shopify Community,

I am encountering an intermittent issue with the OAuth flow for my Shopify app. Occasionally, when redirecting to the authorization URL, I receive the following error:

“The application cannot be loaded, it may be misconfigured. Please contact the application author.”

However, if I retry the authorization process, it successfully redirects to the auth callback URL without any issues.

Here are the scopes defined in both my toml file and .env file:

read_orders,write_orders,read_fulfillments,write_fulfillments,read_products,write_products,read_inventory,write_inventory,read_price_rules,write_price_rules,read_gift_cards,write_gift_cards,read_customers,read_script_tags,write_script_tags,read_product_listings,read_collection_listings,read_assigned_fulfillment_orders,write_assigned_fulfillment_orders,read_merchant_managed_fulfillment_orders,write_merchant_managed_fulfillment_orders,read_third_party_fulfillment_orders,write_third_party_fulfillment_orders,read_order_edits,write_order_edits,read_draft_orders,read_shipping,write_customers,write_draft_orders,write_shipping

Has anyone else faced this issue, or does anyone have any insights into what might be causing this intermittent OAuth error? Any suggestions on how to troubleshoot or resolve this would be greatly appreciated.

Thank you!

It looks like I’ve encountered the same error (2-4 successes then the error you mentioned). Were you able to find the cause? I’d really appreciate your response.
Thanks in advance,

I hate to say me too but I have the same issue, sometimes the Auth flow stops inside of Shopify and I get the same error. If I select “Open app” from Shopify everything is fine or I can simply retry the authentication and that will also work.

I would really like to get some help from more knowledgeable people. I’ve ensured that the scopes I’m requesting (read_all_orders, read_orders, read_products) are in the toml file and are the ones my application is requesting. Again, most times it works but sometimes it does not.

I have the same issue