Theme app extension for app block

Anshu-Shar
Shopify Partner
10 0 3

Hello All,

 

I have created the app https://shopify.dev/apps/tools/cli/php-app by using this reference and created the theme app extension as well but when we redirect from the theme app extension it returns the error (AppBridgeError INVALID_CONFIG: host must be provided ) . How to resolve it?

Replies 2 (2)

Luke_K
Shopify Staff
402 66 98

Hey @Anshu-Shar 

Thanks for raising this! Sounds like App Bridge is looking for the host environment variable in your .env file. There's 4 environment variables that should be in there if we take a look at the Shopify App PHP repo here. I'd try including the host environment variable in the .env and going from there. If still running into issues, feel free to raise an issue in that repo - the developers who developed it will see the issue and be able to help out!

| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
Anshu-Shar
Shopify Partner
10 0 3

Thanks for sharing the solution but my issue is coming when I am creating the theme app extension for this PHP app.When I go to the development store from the theme app extension after enabling it. It returns the error "APP::ERROR::INVALID_CONFIG: the host must be provided".So how to resolve it?

Please see the below video.