App show home fine when in dev mode, after deploying it in google cloud and installing, it show an empty home screen, it really finish loading, no errors on console, nothing….
tried to create a new app, but kept everything that comes in the scafold, no changes, again it worked in dev, but did not in gcloud…
in the gcloud logs it seems to auth correctly, but it stops there… silently…
tried another browser, same issue…
I’m using the latest cli version
Installed a new WSL (Ubuntu), npm, shopify cli, gcloud, create app from scratch (no changes from scaffold), deployed, same result;
noteworth: the tutorial is outdated, I got some errors deploying while following Deploy apps to Google Cloud Run , 1st the tuto uploads one secret and uses 2, then something about accessing storage
Hi @Thiago_Conrado
The most common cause of a blank screen with no errors is a missing or misconfigured SHOPIFY_APP_URL environment variable. Your deployed app needs this set to the Cloud Run service URL. Without it, the app authenticates successfully (which matches what you see in the logs) but then can’t properly render the frontend.
Make sure your deploy command includes it:
gcloud run deploy $SERVICE_NAME \
--source . \
--region $SERVICE_REGION \
--set-secrets="SHOPIFY_API_KEY=shopify-api-key:latest,SHOPIFY_API_SECRET=shopify-api-secret:latest" \
--set-env-vars="SCOPES=$SCOPES,SHOPIFY_APP_URL=$SHOPIFY_APP_URL" \
--port 3000 \
--allow-unauthenticated
You can get the service URL after the first deploy with: SHOPIFY_APP_URL=$(gcloud run services list --filter="metadata.name:$SERVICE_NAME" --format="get(URL)")
Also, the tutorial references two secrets but seemed to only upload one. You need both:
echo $SHOPIFY_API_KEY | gcloud secrets create shopify-api-key --data-file=-
echo $SHOPIFY_API_SECRET | gcloud secrets create shopify-api-secret --data-file=-
You can verify they exist with gcloud secrets list.
Hey there! Yes I saw that in other posts, but
gcloud run services describe $SERVICE_NAME --region “us-central1”
spec:
template:
spec:
containers:
- env:
- name: SCOPES
value: write_metaobject_definitions
- name: SHOPIFY_APP_URL
value: ``https://blank-943961336139.us-central1.run.app
- name: SHOPIFY_API_KEY
valueFrom:
secretKeyRef:
key: latest
name: shopify-api-key
- name: SHOPIFY_API_SECRET
valueFrom:
secretKeyRef:
key: latest
name: shopify-api-secret
confirm the env in there, also, an additional “ping” endpoint returns the env var, so the app is effectively reading it from env.
One details this app is privately deployed app via link, could u please try to replicate
Another interesting detail, once, I did deploy without using shopify app deploy, it rendered with the message that the domain example.com is not production, just illustrative, so it worked after the cli deploy command
I can confirm that using fly.io, after some fixes by AI, it did run perfectly;
the google cloud tutorial is outdated and generate some errors; the AI can fix it, but maybe the fix was not good enough