Hello! Idk if app posts are allowed here but I’ll try my luck. Im struggling with deploying my app currently.
Short description of app:
First and foremost this app is only supposed to be used for my own store, no one else will be using the app.
Function of app:
Reading information from the product page > mapping it to SKU’s + getting image from mega.nz > Converting image to base 64 > sending base64 to POD provider API > Receiving back image > updating image on product page.
Description of issue:
When doing shopify app dev it works perfectly fine. But with shopify app deploy its not working. First thing I’m wondering is if I need separate hosting for this?
If I do, then do you know any free one?
If I don’t, then why is it not working when I do shopify app deploy. The app is installed on the store, and toggled on as an app embed. I can get to the step of converting the image to base64, but after that I get an error 404:
Found image with selector: .product-media img read-product.js:25:17
Calling API: /apps/mockup/generate-mockup read-product.js:176:15
Response status: 404 read-product.js:190:15
Found image with selector: .product-media img
Sorry for the emojis, doing this using AI and AI loves emojis.
This step works perfectly fine when doing shopify app dev because when I do shopify app dev it generates a url like “https ://vernon-birmingham-reflect-trim.trycloudflare.com/apps/mockup”. So I change my const API_URL to: “https ://vernon-birmingham-reflect-trim.trycloudflare.com/api/generate-mockup”; (it didnt work with “/apps/mockup/” for some reason, i dont remember why but worked with “/api/generate-mockup”. But then when trying to deploy I dont get a url, and i dont know what the API_URL should be, ive tried these:
const API_URL = “/apps/mockup/generate-mockup”;
const API_URL = “https ://domain.com/apps/mockup/generate-mockup”;
const API_URL =”https ://domain.com/api/generate-mockup”;
But none worked.
i also dont know if the 404 issue is only because of this or also because of my shopify.app.toml. Idk what that should look like, before when using shopify app dev it had only “example. com”, now ive tried to change it to “domain. com”. The fields im not sure about are: “application_url” “redirect_url” and “[app_proxy]” url. With domain. com there I still get error 404. (And for [“app_proxy”] url it was never domain. com it was “/apps/mockup”
As you can probably tell I’m a bit lost.
Since I dont rly know anything about the topic, I also dont really know what information to include in this post, so hope I’m not too all over the place. If you need any more information please tell me what you need.
Thanks for any and all help!