Shopify / shopify-app-template-node

MIT License
867 stars 391 forks source link

*You don't have this app installed* after deleting partner app, re-authing on Shopify, and trying anything else #1215

Closed cyrilchapon closed 1 year ago

cyrilchapon commented 1 year ago

(Just filing an issue and instantly closing it, in order to document a strange behavior I encountered, because I've been stuck on this for almost 5 days without finding anything. I've been unlocked thanks to a question on partner discord).

Context

After

I got stuck in a strange "loop" (that's not a redirect loop in the strict sense of it), like so :

The trouble

The issue

This is due to the auth middleware thinking the app is installed; while it's not ! This line reports "true" for appInstalled, so never redirectToAuth (while it should); and later this line reports false; which causes the "install loop".

Why would appInstalled wrongly report true ? Because the sqlite database still contains your old, previous-app-bound installation !

Resolution

lmartins commented 1 year ago

Thank you so much for pointing this out @cyrilchapon You may just have saved me for more countless hours of frustration.