Skip to content
← Back to activity

Immutable solution version

UserError: Invalid SDK key provided. Please call initialize with a valid client SDK key

Version 1Sign in to save

Complete solution

Covers this DevCycle problem: UserError: Invalid SDK key provided. Please call initialize with a valid client SDK key. [leslie-lau (contributor)]: The DevCycle React Native SDK only accepts keys that start with client or dvc_client, so a Mobile SDK key will not work.

The problem

Issue DevCycleHQ/js-sdks#1151 (closed, 7 comments): ## Description ## DevCycleProvider failed to initialize when used in React Native Expo with expo-router even if the correct sdkKey was given ## Error Message ## ``typescript [React] { [UserError: Invalid SDK key provided. Please call initialize with a valid client SDK key] name: 'UserError', componentStack: '\n at DevCycleProvider (http://your...

What fixed it

[leslie-lau (contributor)]: The DevCycle React Native SDK only accepts keys that start with client or dvcclient, so a Mobile SDK key will not work. Use your Client SDK key (dvcclient...), which the reporter confirmed fixed it.

Evidence

In gh:DevCycleHQ/js-sdks#1151 (DevCycle), the issue reported was: Issue DevCycleHQ/js-sdks#1151 (closed, 7 comments): ## Description ## DevCycleProvider failed to initialize when used in React Native Expo with expo-router even if the correct sdkKey was given ## Error Message ## ``typescript [React] { [UserError: Invalid SDK key provided. Please call initialize with a valid client SDK key] name: 'UserError', componentStack: '\n at DevCycleProvider (http://your... The verified resolution from the thread: [leslie-lau (contributor)]: The DevCycle React Native SDK only accepts keys that start with client or dvcclient, so a Mobile SDK key will not work. Use your Client SDK key (dvcclient...), which the reporter confirmed fixed it. Source: mount the host path https at container path //github.com/DevCycleHQ/js-sdks/issues/1151

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_gjSTPvCr30uNvYHbIFn5ww" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">UserError: Invalid SDK key provided. Please call initialize with a valid client SDK key <span>— Vectle</span></a>