Re: App Bridge not working with Toast - Action is not permitted

Solved

App Bridge not working with Toast - Action is not permitted

Varify
Shopify Partner
10 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?

 

Shopify Partner - help others to solve their problems by develop ideas/tools/apps
info[at]varify.xyz
Accepted Solutions (2)

andrew-apperley
Shopify Staff (Retired)
21 5 4

This is an accepted solution.

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.

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Varify
Shopify Partner
10 1 0

This is an accepted solution.

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

 

Shopify Partner - help others to solve their problems by develop ideas/tools/apps
info[at]varify.xyz

View solution in original post

Replies 3 (3)

andrew-apperley
Shopify Staff (Retired)
21 5 4

This is an accepted solution.

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.

To learn more visit the Shopify Help Center or the Community Blog.

Varify
Shopify Partner
10 1 0

This is an accepted solution.

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

 

Shopify Partner - help others to solve their problems by develop ideas/tools/apps
info[at]varify.xyz
Varify
Shopify Partner
10 1 0

Hi Andrew

 

I updated Polaris to the latest version and its working now

 

Thanks

Shopify Partner - help others to solve their problems by develop ideas/tools/apps
info[at]varify.xyz