Questions and discussions about using the Shopify CLI and Shopify-built libraries.
HI all,
I am currently trying to upgrade an app to use the Shopify App Bridge, but any time any method is called this screen comes up:
I have embedded apps enabled in the app extensions area, and it works fine in my development app with the exact same settings, but when I deploy to staging I am getting this message. I have removed any references to the Embedded app SDK and am only loading the App Bridge, I also double checked that the shopOrigin and api key are correct. Has anyone had a similar issue? Maybe it's something simple I am missing.
Hey @qq192.
What's your app ID? I can check what might be going on from here. You can get your numeric app ID from the end of the URL in your partner dashboard when viewing the app specifically.
Cheers.
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hey Alex, thanks for the help, the id is 1797371
Sorry for the delay. It looks like you might be using Embedded App SDK methods that are incompatible with App Bridge. Are you using any of these?
'ShopifyApp.Modal.input',
'ShopifyApp.Analytics.fetch',
'ShopifyApp.Nav.initialize',
'ShopifyApp.Nav.select',
'ShopifyApp.Sidebar.setSection'
You have a feature enabled on your app which would enable the use of the Analytics API for example, which at this time cannot be used in tandem with App Bridge.
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hey @Alex, I did double check and we removed all references to ShopifyApp, and we are not even loading the app.js embedded app sdk. Is it an issue that we used those methods in the past and now we aren't able to upgrade to the App Bridge, or should it be working once those are removed?
Heya. I've pulled some levers on my end and you should now be good to use app bridge. Let me know if you notice anything unexpected, but you should be fine.
Cheers.
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi Alex,
I'm seeing the same issue on app 2911355 (dev app).
We're going to be upgrading the menu for app 1644751 (production app) as well.
But for that app I need both the AppBridge and the ShopifyApp to work since we have two versions live, one upgraded to AppBridge and one not.
Could you pull the same levers for app 2911355 and tell me how to proceed for app 1644751?
Many thanks in advance,
Bart
Hey Bart.
I've flipped the switch on 2911355.
I can flip the switch on 1644751 but if you're using any of the above mentioned methods you'll end up getting flipped back. There's not too much I can do about that one on my end until the app is clear from making these calls.
Which embedded app methods do you utilize?
Cheers.
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi Alex,
Thanks for your reply. I'll test this on our dev app tomorrow.
In the production app we use:
- ShopifyApp.Bar.loadingOn/Off()
- ShopifyApp.Bar.initialize(configuration)
- ShopifyApp.Bar.disableAllButtons()
Regards,
Bart
Hi Alex,
I checked in on the dev app and it's not really the result I'm looking for.
Switching the setting changes the navigation bar (two bars instead of one), which we don't intend to use.
The reason we wanted to change is only to be able to use the variant picker, which seems to be only available with App Bridge.
Is there a way for us to continue to use the single bar navigation and leverage the variant picker functionality?
Regards,
Bart
Hey Bart.
The two bars along the top which represent the TitleBar action is a part of App Bridge's implementation. I don't believe you can make use of storing the navigation and title in a single bar while being "migrated" to App Bridge at the same time (that is, not using any deprecated Embedded App SDK methods).
Feedback is most welcome on this front though, it's my job to pass that along, so let me know what kinds of issues this causes for you either here or in a DM. If you need any help migrating, let me know as well. (I could probably roll you back to your prior state as well)
Cheers.
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hi Alex,
As others have reported as well the double title bar unnecessarily reduces the already limited screen real estate for apps.
I feel there are better ways to convey to users that they are using an app by a third party vendor.
In my opinion the icon next to the app's name is sufficient to remind users that they are not using an app made by Shopify.
I feel app authors should have the option to choose if they want two bars or a single bar.
Regards,
Bart
Hi Alex,
Can you flip the switch for 1644751 as well please?
Regards,
Bart
@DiscountNinja done, let me know if anything unexpected occurs.
Cheers.
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Thanks for the quick response Alex, appreciate it.
The switch had a side effect I didn't anticipate: the navigation links / menu items configure in the app are now displayed.
I removed them (apps/[myapp]/manage_extensions/shopify_admin/embedded_app/configure), but they still display.
Is there anything else I need to do to remove those menu items?
@DiscountNinja if you're referring to the Refresh + Settings buttons, it looks like those are considered secondary buttons, not navigation items. Are you calling ShopifyApp.Bar.initialize()
with buttons in the options object? I'm not seeing us pulling any navigation items or buttons from your app's settings.
Cheers.
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
@Alex, I'm referring to "Dashboard", "Promotions" and "Settings".
Those were configured as navigation items in the app previously.
The switch seems to have reactivated them. I deleted them today.
I'm 100% sure we're not adding those buttons via JavaScript.
I've now put the new version of the app live and unfortunately the App Bridge part of the app doesn't work.
So now we have two problems, indicated in bold in the summary.
Note that our production app routes users to different versions of our backend:
V1 is our legacy version, V2 is the current version, V3 is the new release (not GA).
The test app routes all users to V3.
Here's a summary:
Regarding the first problem:
Regarding the second problem:
I'd appreciate some help on this because at it stands the navigation is breaking the user experience for a large percentage of our users in production.
I've just tested again and it seems problem 1 (Deleted navigation items are displayed) is now resolved.
I'm assuming it was a cache issue?
So, now only problem two remains.
@DiscountNinja Would you be able to give me one or more test environments where I can replicate this behaviour?
Cheers.
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
@Alex Sure, how can I DM you?
Hi @Alex
Sent you an email with the environments and credentials.
Note: the issue is not limited to buttons, it's a general issue with the App Bridge functionality not being available.
To test, you can go to the console (ensure you're executing the javascript in the iFrame) and type:
limoniAppsCore.ShopifyEmbeddedApp.Bar.ShowLoading()
It should trigger the progress bar, but it does nothing.
After analyzing the details of the event received by the App Bridge I'm starting to think maybe the origin could be the issue. The origin is a different domain then the App Url configured in the App Setup. Could that be causing this?
In my case the origin as detected by the App Bridge is "https://app.discountninja.io" (the domain of the V3 app).
The App Url configured in the App Setup is a different domain (domain of the V2 app).
Regards,
Bart
For those who are also experiencing this issue, let me summarize my findings:
The error message: 'Unsupported Message "This app can't be loaded"' can occur when your app is configured on Shopify's backend to be in "legacy mode" (you can easily detect an app is in legacy mode if the title bar does not show the icon of the app and displays menu buttons in a single bar instead of on two bars).
@Alex I'm having a similar issue with my app ID 1381729. It's an older embedded app that I'm trying to move to App Bridge from EASDK. There are no references ShopifyApp and all the old EASDK app code has been removed (also not loading the javascript).
Not sure if I'm doing something else wrong here to not get out of legacy mode but a forced switch would be very helpful.