Shopify / shopify-app-bridge

https://shopify.dev/docs/api/app-bridge
88 stars 9 forks source link

APP::ERROR::INVALID_CONFIG: Provided apiKey #250

Open pvkhanh1708 opened 1 year ago

pvkhanh1708 commented 1 year ago

Describe the bug

When I config Shopify App Bridge, I got this error message: "APP::ERROR::INVALID_CONFIG: Provided apiKey ***************************949aa is incorrect. Expecting ***************************9036f

BUT, I make sure that I exactly provide apiKey ***************************9036f

In .env

MIX_SHOPIFY_API_KEY=***************************9036f

In App.tsx

import { Provider } from "@shopify/app-bridge-react"; ... const configAppBridge = { apiKey: process.env.MIX_SHOPIFY_API_KEY, host: window.OT_HOST, forceRedirect: false, }; ... <Provider config={configAppBridge}><Content/></Provider> ...

Contextual information

Packages and versions

Platform

Additional context

How to reslove this error and pass config?

jzazove commented 9 months ago

Are you still having this issue?

avibz1987 commented 8 months ago

Hey, i have the same issue, i notices that there is an extra space but can't tell where it comes from: "APP::ERROR::INVALID_CONFIG: Provided apiKey xxxxxxxxxx is incorrect. Expecting xxxxxx"

jzazove commented 8 months ago

Please update to the latest version of App Bridge: https://shopify.dev/docs/api/app-bridge-library#getting-started

willyou commented 2 months ago

I'm not certain if it's related to it, but you might need to include the API key elsewhere. Check the content=%SHOPIFY_API_KEY% below.

https://www.npmjs.com/package/@shopify/app-bridge-react

Image