I recently submitted an app using app-bridge 2.0 and it got rejected for reasons I think are directly related to a 2.0 bug.
The reviewer rejected my app because of some error I’ve never encountered. When I looked at the screencast, I saw that the reviewer was trying to access my app through the direct app url rather than through shopify (e.g. myapp.mybusiness.com/admin?shop=my-new-app.com). I tested this same method of access with my other app already approved in the app store and still on version 1 of app bridge and it worked.
At first, I thought it was because he was missing the ‘host’ parameter, so I added code into the app that would base64 encode the shopOrigin as the host, if it was missing. I tested it again and though the initial error was gone, it redirected me to my storefront with an error saying app not found. I figured this was something related to unapproved vs approved apps and it wouldn’t be a problem because testers probably have magical tools.
But after sleeping on it, I didn’t want to risk getting the app rejected again so I tested my app again with a downgraded version of app-bridge (v1.30.0), and it worked. I could access my app directly from the app url and it would redirect me to my app embedded within the Shopify partner dashboard. The only thing I changed was the app-bridge version.
It seems to me that it’s highly probably that app-bridge 2.0 is the cause of the bug here. It may be a niche use-case for most merchants but it’s a blocker for any developer trying to submit an app. Hope this helps anyone else with the same problem.
I struggled with this for a few days and finally found this PR coming down the road in the shopify_app gem: https://github.com/Shopify/shopify_app/pull/1241/files
Here is everything that will be included in 18.0.0: https://github.com/Shopify/shopify_app/pull/1252
Hope that helps!