Shopify / Shopify/shopify-app-template-php
Issue to access the files of Deployed Shopify APP in Heroku
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 340
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
Issue summary
I'm facing an issue using the Heroku environment.
I have created the app in Heroku and deployed Shopify APP using Docker Container, which everything it went successfully.
But when the APP is installed in the Testing Shopify Store, I have the issue of not being able to find dev_embed.js. and could not have access to index.jsx.
Here are the issues that are appearing at the browser, and also heroku log file:
GET https://my-app.herokuapp.com/dev_embed.js net::ERR_ABORTED 404 (Not Found)Access to script at 'https://my-shopify-store.myshopify.com/admin/oauth/..../index.jsx') from origin 'https://my-app.herokuapp.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Steps that I followed to fix the issue:
- At web/nginx.conf, I have added:
http {
...
server {
....
# this part is added
location /dev_embed.js {
alias /app/web/frontend/dev_embed.js;
}
}
}
- At Procfile I have this code:
web: vendor/bin/heroku-php-apache2 public/
worker: php artisan migrate
Do I need to add additional configuration of the files that need to be load from any Shopify Admin Panel to Heroku Server?
Because right now I'm still having the issue even though I did the above changes.
Looking forward to any feedback/help.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with web/nginx.conf and the Procfile, then inspect how the deployed Heroku container serves dev_embed.js and index.jsx. Review the browser errors and Heroku logs to trace the 404 and CORS failures; done means the installed Shopify app can load both files from the deployed app without those errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- apache, docker, javascript, nginx, php
- Domain
- cloud, devops, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100