App is not running in local development Nodejs and React

App is not running in local development Nodejs and React

Ezat
Tourist
4 0 3

Hello fellows, I am following the Node app, with the shopify cli I run the command shopify node open, this isn't running the app in local environment,

instead it outputs:

https://bedc36907293.ngrok.io/auth?shop=myshopurl

 

when running the shopify node serve command this will run the app with ngrok in shopify admin panel, but it says the app is ready:

event - compiled successfully
> Ready on http://localhost:8081

when visiting the localhost:8081 it cannot complete oAuth, and url is: 👇 until the page says,  This site can’t be reached

http://localhost:8081/auth?shop=undefined

 

anyone else facing the same issue? or is it not possible to run the app locally? 

Replies 5 (5)

jtenax
Visitor
1 0 0

I've managed to resolve this 'undefined' issue by copying the .env file to process.env, as the server.js was trying to get the configuration from the absent process.env file. Now, I'm properly redirecting to my development store's URL instead of undefined. However, I'm still getting another error in my console which I'm trying to solve now:

 

 

InternalServerError: Cannot complete OAuth process. Could not find an OAuth cookie for shop url: qarea-test-store.myshopify.com
┃       at Object.throw (/var/www/test_node_app-2/node_modules/koa/lib/context.js:97:11)
┃       at /var/www/test_node_app-2/node_modules/@shopify/koa-shopify-auth/dist/src/auth/index.js:100:42
┃       at step (/var/www/test_node_app-2/node_modules/tslib/tslib.js:133:27)
┃       at Object.throw (/var/www/test_node_app-2/node_modules/tslib/tslib.js:114:57)
┃       at rejected (/var/www/test_node_app-2/node_modules/tslib/tslib.js:105:69)
┃       at runMicrotasks (<anonymous>)
┃       at processTicksAndRejections (internal/process/task_queues.js:95:5)

 

 

 

UPDATE: the above error can be fixed using this patch which I found here in this shopify node app issue request.

 

kpavankumaar
Visitor
2 0 3

tried you solution it did not work , same issue still exists 

 

Sajeel
Shopify Partner
272 31 26

anyone solved this issue i am still facing this issue?

 

atsuki-sakai
Visitor
2 0 1

I am suffering from the same problem. I'm in trouble because I can't make an app.

kpavankumaar
Visitor
2 0 3

I am currently facing same issue , unable to fix the issue by copying .env content to process.env

help is needed ?