simple-koa-shopify-auth icon indicating copy to clipboard operation
simple-koa-shopify-auth copied to clipboard

"The app couldn't be loaded" error

Open hrstrand opened this issue 2 years ago • 12 comments

I am following the example mentioned in the readme, but I get this when trying to install or access the app

Screenshot 2022-03-09 at 22 38 54

I can see that the online auth path is hit, and it redirects with

ctx.redirect(/install/auth/?shop=${shop});

From web server logs, I can observe that this is then hit : "GET /auth/callback?code=aeccdc[...]"

Any clue to what that above error indicates? Do I need to set some specific allowed redirect urls in the Shopify app setup web ui?

thanks for any hints

hrstrand avatar Mar 09 '22 21:03 hrstrand

  1. What allowed urls do you have?
  2. Which browser are you using?
  3. Do you have an embedded app?
  4. Did you check the developer logs in the browser?

That's all I can think of right now.

TheSecurityDev avatar Mar 09 '22 23:03 TheSecurityDev

thanks for getting back to me

https://<server>/auth/callback
https://<server>/install/auth/callback
https://<server>/install/auth
https://<server>/auth

tried several browsers (osx) - safari & chrome

Yes, app is embedded. Does that call for different requests?

yes, no errors. Only info about redirecting. It seems to redirect to "/?shop=" and then back to "/auth?shop="

Is there a complete example app somewhere that uses this library? I have retrofitted into an existing app, and I suspect that I am doing something wrong somewhere

hrstrand avatar Mar 11 '22 15:03 hrstrand

The callback URLs should be like:

https://yourdomain.com/auth/callback
https://yourdomain.com/install/auth/callback  (if using separate installation route)

I don't know if you left out your domain on purpose or if that's how you actually have it. And the other ones actually aren't necessary, but you can leave them in just to make sure it works.

But otherwise, it is intended for embedded apps, I just wanted to check. And there isn't any complete sample app available. If you could provide more of your code and library versions maybe I could see if anything is wrong.

TheSecurityDev avatar Mar 11 '22 15:03 TheSecurityDev

thanks -- I'll try to make a minimal app and share it if I still see the issue

hrstrand avatar Mar 12 '22 11:03 hrstrand

Hi,

I'm having the same error. Are you available to take a look at my code?

cvetelinandreev avatar Oct 09 '23 14:10 cvetelinandreev

Hi,

I'm having the same error. Are you available to take a look at my code?

I can try, what's the issue?

TheSecurityDev avatar Oct 09 '23 16:10 TheSecurityDev

Thank you for the prompt reply!

The issue is that I get this error image

This is my setup (I left out some of the source code). Test.zip

cvetelinandreev avatar Oct 09 '23 18:10 cvetelinandreev

One thing I notice is that the API_VERSION your using is ApiVersion.October20, which I'm getting an error that it might not exist, so perhaps you should try a newer version. You don't have to use the ApiVersion constant, so you can just provide the string like "2023-10" or "2023-07". image

TheSecurityDev avatar Oct 09 '23 18:10 TheSecurityDev

Also can you check for any errors in the server logs?

TheSecurityDev avatar Oct 09 '23 18:10 TheSecurityDev

Hi,

I switched to API_VERSION: '2023-10', Same thing.

My backend doesn't produce any errors. The execution of afterAuth goes fine.

Best.

Ɛ3 +359 877 203 807

On Mon, Oct 9, 2023 at 9:22 PM David @.***> wrote:

Also can you check for any errors in the server logs?

— Reply to this email directly, view it on GitHub https://github.com/TheSecurityDev/simple-koa-shopify-auth/issues/7#issuecomment-1753457399, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYL3KWAJIIMZOWWLEWBBTDX6Q6G5AVCNFSM5QKZP4VKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZVGM2DKNZTHE4Q . You are receiving this because you commented.Message ID: @.***>

cvetelinandreev avatar Oct 10 '23 08:10 cvetelinandreev

I really don't know. Try in different browsers, re-installing, etc.

TheSecurityDev avatar Oct 10 '23 14:10 TheSecurityDev

Already did.

I partially made it work with @.***

On Tue, 10 Oct 2023 at 17:46, David @.***> wrote:

I really don't know. Try in different browsers, re-installing, etc.

— Reply to this email directly, view it on GitHub https://github.com/TheSecurityDev/simple-koa-shopify-auth/issues/7#issuecomment-1755598964, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYL3KXGOVRWIXUN53HXGQ3X6VNSRAVCNFSM5QKZP4VKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZVGU2TSOBZGY2A . You are receiving this because you commented.Message ID: @.***>

cvetelinandreev avatar Oct 11 '23 03:10 cvetelinandreev