App setup doesn't redirect to shop backoffice

noff
New Member
1 0 0

Hello.

I'm learning to build apps using this tutorial:

https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react/embed-your-app-in-shopify

I copied server.js from repository.

When I install app to demo store, I'm redirected to `ngrok` URL instead of partner page or store page:

noff_0-1620292540517.png

What can I do here to be redirected back to store backoffice instead of ngrok proxy URL?

 

Then I open store/apps and see my app. I click on it and it's displayed:

noff_1-1620292622246.png

 

But when I manually enter URL for annotated layout (from the tutorial) (https://XXX.myshopify.com/admin/apps/r46-demo-embedded/annotated-layout) I see this message for 1 second:

noff_2-1620292710827.png

 

After 1 second I automatically redirected to ngrok proxy URL again:

noff_3-1620292740510.png

 

 

How to fix it?

 

Package.json contents:

```

{
"name": "....",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "node server.js",
"build": "next build",
"start": "NODE_ENV=production node server.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@shopify/koa-shopify-auth": "^4.1.3",
"@shopify/polaris": "^6.3.0",
"dotenv": "^8.2.0",
"isomorphic-fetch": "^3.0.0",
"koa": "^2.13.1",
"koa-router": "^10.0.0",
"next": "^10.1.3",
"react": "^16.9.12",
"react-dom": "^16.9.12",
"webpack": "^4.46.0"
}
}

```

0 Likes