Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

NetworkAccessDeniedError: permission to use fetch in checkout ui extension

NetworkAccessDeniedError: permission to use fetch in checkout ui extension

moshiurse
Shopify Partner
5 0 3

I have created a Shopify checkout extension. 

I cannot hit any API it's showing permission denied.
But I already added network_access = true to 'shopify.ui.extension.toml' file.

[extensions.capabilities]
api_access = true
network_access = true
block_progress = true

 

even from my app setting, I allow network access in checkout UI extension.

 

 

The error currently showing : 

 

Uncaught (in promise) NetworkAccessDeniedError: permission to use fetch() must be specified under [capabilities] with flag "network_access = true"; this can be done within your extension's configuration. View the docs for more information:

2023-08-24_16-52.png

 

Is there anything more needed?

Whats the problem ?

Apps developer
Replies 7 (7)

lizk
Shopify Staff
246 58 79

Hi 👋

I just want to confirm that you restarted your development server after updating the configuration file?

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

moshiurse
Shopify Partner
5 0 3

Yes. I restarted so many times after updating toml file.

Apps developer
Tom_Hooker
Shopify Partner
85 4 12

Same issue if you have fixed this please let me know. Thanks

On The Road Shopify Agency
Helping Shopify stores to become greater with purpose behind design.
info@ontheroaduk.co.uk
http://ontheroaduk.co.uk/
Kostya_Miliev
Shopify Partner
1 0 0

You should additionally allow network access at the app API access page

 

Shopify+Partners+2023-12-18+1+PM-41-28.png

yedla_dinesh
Shopify Partner
13 0 3

I have approved "network access in checkout UI extensions," but I am still facing the same issue. I'm fed up. Now, I'll try with metafields.

Note: Retrieving data from metafields during checkout is faster since it won't introduce an external network call. This allows you to rely on Shopify for the uptime, scaling, and durability of the data storage.

Shopify Expert
Helping thousands of @Shopify store owners to achieve sustainable growth & increase revenue 2-3x 
navii05
Shopify Partner
2 0 2

This fails in my case too, even after requesting the network access from the partners dashboard. I've tried this many times, this doesn't seem to work

 

st_consult
Shopify Partner
17 1 9

That was missing in my case. Fetching stuff from an external backend worked after I set this.
Thanks a lot!