Oauth_error=application_cant_be_loaded_misconfigured

We are currently developing a new application to integrate with Shopify.

Using the official PHP template provided: GitHub - Shopify/shopify-app-template-php.

After installing Laravel and Composer, and having the default tables (sessions, migrations, and failed_jobs) automatically created in the database, we managed to install the application on a demo store.
However, immediately after installation, we are redirected multiple times and eventually end up on this URL:
https://admin.shopify.com/store/[store-name]/settings/apps?oauth_error=application_cant_be_loaded_misconfigured&before=&after=&tab=installed

The app looks installed, and we can see that a record for the store was created in the table sessions with the correct scopes and access_token.

We found a post mentioning the same error, although intermittently:

This error also happens when trying to open the app from the list of installed apps in the demo store

We’ve contacted the support team, but we have not yet received a clear answer on how to resolve this issue.
We would appreciate any help or suggestions that could assist us in continuing with the integration.

Thank you very much!

Hi @Matias_Gonzalez

All Shopify app templates, including the PHP one already have authorization code grant implemented - so this should work out of the box. Here’s a few things to check for:

  • Check your app’s application_url and redirect_urls in your .toml file or in the Partner Dashboard - make sure they match the actual URL where your app is running (including HTTPS).
  • Shopify requires all embedded apps to be served over HTTPS. If your app is running on HTTP, or your certificate is invalid, Shopify will refuse to load it.
  • Ensure your app is set as “embedded” in the Partner Dashboard.
  • If you are using App Bridge, ensure you are passing the correct host parameter from the query string and initializing App Bridge with it.

Try the above and let me know if you’re still seeing issues.