App Bridge not working with Toast - Action is not permitted

Solved
Tourist
5 1 0

I have a Polaris app that initialized with AppProvider (with apiKey and shopOrigin) and then use toast to display messages.

 

It seems the toast message no longer works (it used to work), now the App Bridge is complain about the permission.

 

See the attached screenshot

 

app_bridge_error.png

 

Anyone know what went wrong and how to fix it?

 

0 Likes

Success.

Shopify Staff
Shopify Staff
5 1 0
Hey,

I see that you're using an older version of Polaris which includes an older version of App Bridge. As of App Bridge v0.8.0 the Flash actions were deprecated in favour of Toast actions. With recent changes to how Feature Detection works, Flash actions no longer will work. A potential fix for this issue you're experiencing is to upgrade to a new version of Polaris. Here's a link to the Toast documentation and working with App Bridge using Polaris documentation.

Post back if upgrading solves your issue.

Andrew Apperley
(App Bridge) Mobile Developer
0 Likes

Success.

Tourist
5 1 0

Hi Andy

 

Thanks for the reply

 

I'm currently using Polaris 3.1.1 and its not using the Flash action (I used Polaris Toast component and I guess the Polaris embeded app bridge powered Toast component)

 

so you reckon upgrade to the latest will solve the problem?

 

Do I need to migration my current Polaris Toast component to App bridge version?

 

I will give it try

 

Thanks

 

0 Likes
Tourist
5 1 0

Hi Andrew

 

I updated Polaris to the latest version and its working now

 

Thanks

0 Likes