Remix app authentication

I create an app with yarn create @shopify/app and then project created after this i visit my shopify partner account and try to install the new app in a dev store after installation i go to the apps section and i see “Handling response” Only and when i see console i am getting error : 401 (Unauthorized), is remix app handle this automatically why i am getting this error.

I did not added any line of code in project.

Hey @Ramesh_Bissu,

It’s hard to tell exactly what the issue is from your description. Maybe adding screenshots and more information could help.

My best guess right now would be making sure developer preview is on in the app and try linking to your store via the terminal (see screenshot below). When you start the app you should see the screenshot below in the terminal. Try preview in your browser and see how it goes.

@Justin_Sheldon i Created the app with Shopify CLI

PS C:\Users\Administrator\Desktop> yarn create @shopify/app
yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "@shopify/create-app@3.80.7" with binaries:
      - create-app
?  Get started building your app:
✔  Build a Remix app (recommended)

?  For your Remix template, which language do you want?
✔  JavaScript

?  We recommend installing Shopify CLI globally in your system. Would you like to install it now?
✔  No, just for this project


To run this command, log in to Shopify.
User verification code: DQBT-VTCW
👉 Press any key to open the login page on your browser
Opened link to start the auth process: https://accounts.shopify.com/activate-with-code?device_code%5Buser_code%5D=DQBT-VTCW
✔ Logged in.
?  Create this project as a new app on Shopify?
✔  Yes, create it as a new app

?  App name:
✔  stiled-connect-2

╭─ info ───────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Initializing project with `yarn`                                            │
│  Use the `--package-manager` flag to select a different package manager.     │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯


╭─ success ────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  stiled-connect-2 is ready for you to build!                                 │
│                                                                              │
│  Next steps                                                                  │
│    • Run `cd stiled-connect-2`                                               │
│    • For extensions, run `shopify app generate extension`                    │
│    • To see your app, run `shopify app dev`                                  │
│                                                                              │
│  Reference                                                                   │
│    • Shopify docs                                                            │
│    • For an overview of commands, run `shopify app --help`                   │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

Done in 473.58s.
PS C:\Users\Administrator\Desktop> cd .\stiled-connect-2\
PS C:\Users\Administrator\Desktop\stiled-connect-2> code .

after this i open the app in vs code, and run the app with

shopify app dev

After this i get a preview link like this :

› Press d │ toggle development store preview: ✔ on
› Press g │ open GraphiQL (Admin API) in your browser
› Press p │ preview in your browser
› Press q │ quit

Preview URL:
https://test-stiled2.myshopify.com/admin/oauth/redirect_from_cli?client_id=f96fdec14d1628a6dc294d6677fd8186
GraphiQL URL: http://localhost:52115/graphiql

now i open the link in browser and this screen appears

I install the app and redirect to the apps

Now Why i am getting this handling response and the another one is why i am getting 401 (unauthorized error )

Reply ASAP

Hey @Ramesh_Bissu,

My first guess is it’s something wrong with scaffolding the app via yarn create @shopify/app. I think potentially something is happening with not linking your shopify partner account with the app because you aren’t using the shopify CLI. Try scaffolding the app using the CLI and shopify app init.

For your current app, you could also look into below…

  • Can you see the app in your partner account https://partners.shopify.com/?
  • What’s your .toml file look like? Does it have the correct dev store?

Sorry can’t be of more specific help. I’ve never ran into this issue scaffolding a fresh app.