FROM CACHE - en_header

App Bridge Error After Uninstall

DeonLeer
Shopify Partner
1 0 1

Hey guys, we're developing an embedded NextJS app and we are running into an issue when uninstalling our app in a live environment. Most of the time our uninstall runs fine, but occasionally our uninstall webhook doesnt run and the next time we try to install our app we get redirected to our app's main page but it's not embedded into the shop. An app bridge error fires continually, crashing the browser and the app is never installed. The error is isolated within that store, so afterwards we have to create a new store to install our app, and the previous store is no longer usable. This is the error message being logged to the browser console and our uninstall webhook handler.app_bridge_error.jpguninstall_webhook.jpg

Reply 1 (1)
agustinsacco
Shopify Partner
13 0 0

I have the exact same issue. Since the app is uninstalled then when app-bridge attempts to authenticate the shop, the session is actually not valid. Then it starts this crazy loop which eventually crashes the browser.

 

Most of the time I see the logs that the webhook is successfully received, but other times the webhook does not fire and the shop is stuck and we are not able to install the app on that shop anymore.

 

I am trying to hack around authentication and app bridge by adding TTL's but honestly this approach is not great.

 

Any help here would be appreciated from the Shopify team.