App reviews, troubleshooting, and recommendations
I have followed the "deploy your app" docu. https://shopify.dev/docs/apps/deployment/web after creating a blank remix app. I'm unable to deploy the app to fly, heroku and DigitalOcean. All returns same error.
-04-16 11:58:47] > start [2024-04-16 11:58:47] > remix-serve ./build/server/index.js [2024-04-16 11:58:47] [2024-04-16 11:58:51] [2024-04-16 11:58:51] /app/node_modules/@shopify/shopify-app-remix/build/cjs/server/shopify-app.js:98 [2024-04-16 11:58:51] throw new shopifyApi.ShopifyError('Invalid appUrl provided. Please provide a valid URL.'); [2024-04-16 11:58:51] ^ [2024-04-16 11:58:51] Error: Invalid appUrl provided. Please provide a valid URL. [2024-04-16 11:58:51] at deriveApi (/app/node_modules/@shopify/shopify-app-remix/build/cjs/server/shopify-app.js:98:11) [2024-04-16 11:58:51] at shopifyApp (/app/node_modules/@shopify/shopify-app-remix/build/cjs/server/shopify-app.js:49:15) [2024-04-16 11:58:51] at file:///app/build/server/index.js?t=1713268522877.906:22:19 [2024-04-16 11:58:51] at ModuleJob.run (node:internal/modules/esm/module_job:195:25) [2024-04-16 11:58:51] at ModuleLoader.import (node:internal/modules/esm/loader:337:24) [2024-04-16 11:58:51] at importModuleDynamicallyWrapper (node:internal/vm/module:432:15) [2024-04-16 11:58:51] at run (/app/node_modules/@remix-run/serve/dist/cli.js:1
My .env file is empty and I have set the environment variables directly on every platform.
Anyone knows whats going on here?
Solved! Go to the solution
This is an accepted solution.
Hi @erik_lindberg_s ,
I just fixed the same issue while deploying my app on DigitalOcean. The problem was using the wrong variable for the app's web address.
In my case the error was caused by the fact that I was using the HOST variable to set the app's url instead of SHOPIFY_APP_URL.
To solve it, I started my local environment and used the app's generated web address as the correct variable value for SHOPIFY_APP_URL and deleted the HOST variable.
I'm not sure if starting the local environment was necessary, but I used the actual web address instead of a placeholder like https://www.google.com.
You may find that using the placeholder works anyway when using the correct variable.
A hint in the documentation led me to this solution:
It says:
"SHOPIFY_APP_URL (or HOST for non-Remix apps)"
Since my app is built with Remix, this advice might work for you if you've followed the Shopify Documentation and built with Remix.
Hope this helps you 👍🏿
This is an accepted solution.
Hi @erik_lindberg_s ,
I just fixed the same issue while deploying my app on DigitalOcean. The problem was using the wrong variable for the app's web address.
In my case the error was caused by the fact that I was using the HOST variable to set the app's url instead of SHOPIFY_APP_URL.
To solve it, I started my local environment and used the app's generated web address as the correct variable value for SHOPIFY_APP_URL and deleted the HOST variable.
I'm not sure if starting the local environment was necessary, but I used the actual web address instead of a placeholder like https://www.google.com.
You may find that using the placeholder works anyway when using the correct variable.
A hint in the documentation led me to this solution:
It says:
"SHOPIFY_APP_URL (or HOST for non-Remix apps)"
Since my app is built with Remix, this advice might work for you if you've followed the Shopify Documentation and built with Remix.
Hope this helps you 👍🏿
Thx for taking the time to answer.
My initial thought was that I already tried that and that I had set the variable to SHOPIFY_APP_URL and not HOST when working in the local environment. But you were right. Setting the variable name to SHOPIFY_APP_URL and not HOST fixed it. At least on DibtialOcean.
Thx
Correct. This works for DigitalOcean Deployment. Mine worked even with placeholders such as https://www.google.com, so starting local server was not necessary I believe.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024