Errors after creating my app using shopify create command line with NodeJS

Hi folks,

I am new here. I was trying to build my first App, following the tutorial with the Shopify CLI, but i am getting errors when accessing my localhost or ngrok link as shown below.

My Steps:

  1. I have created using the command line: shopify create
  2. Choose NodeJS
  3. Everything was perfectly installed with no errors
  4. I have installed the App in my store with no problems
  5. .env file was updated automatically my ngrok link, also the app configs in the partner dashboard

I am going to develop a custom app to my customer and appreciate your help.

Thanks!


ERROR AT: http://localhost:8081/auth

Expected a valid shop query parameter


ERROR AR https://90d3121fb450.ngrok.io/

1 of 1 unhandled error
Unhandled Runtime Error
AppBridgeError: APP::ERROR::INVALID_CONFIG: shopOrigin must be provided


App seems to be installed correctly:


App is running ok in the embed admin panel:

Hi,

It seems like you are missing the ?shop={SHOP_NAME} during oauth.

Hi Jayvin!!

Thanks for your reply, as i said, i am quite new here.

So basically i haven’t changed anything in the code and i expected it to run smooth on both embedded and localhost app.

I tried to add the shop query to the string but not succeed (http://localhost:8081/auth?shop=procarrera.myshopfy.com)

returned with this error:

Oauth error invalid_request: The redirect_uri is not whitelisted

When i try to access the ngrok link with auth, it succeed but redirects me to the embed app.

and when i try to access the ngrok link without auth (https://90d3121fb450.ngrok.io/) i got the error about the shopOrigin as mentioned about, even if it is present in the cookies:

Hi!,

Since you are new here, please go through the documentation on how to create an app, adding redirection urls and oauth process.

These couple of resources will help you.

https://shopify.dev/tutorials/authenticate-a-custom-app-with-oauth
https://shopify.dev/tutorials/authenticate-with-oauth
https://shopify.dev/tutorials/authenticate-a-public-app-with-oauth

Hi !

I have solved the problem by creating my app following step-by-step instructions not through Shopify CLI and it works.

However, I still cannot access in localhost, only by ngrok link. I guess it is because of HTTP instead of HTTPS.

Thank you for your time!