Skip to content

Suppress NO_DATAFILE_SPECIFIED error when sdkKey is present #591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aflinky opened this issue Oct 6, 2020 · 1 comment · Fixed by #589
Closed

Suppress NO_DATAFILE_SPECIFIED error when sdkKey is present #591

aflinky opened this issue Oct 6, 2020 · 1 comment · Fixed by #589

Comments

@aflinky
Copy link

aflinky commented Oct 6, 2020

What I wanted to do

Create instance of Optimizely with sdkKey (function createInstance) and without a datafile

What I expected to happen

As it says in the docs, the param datafile is not necessary if sdkKey is present (and vice versa)

What actually happened

The enums.ERROR_MESSAGES.NO_DATAFILE_SPECIFIED ("No datafile specified. Cannot start optimizely.") is thrown. Even though this doesn't cause the creation to break, it throws an error to the console (that my company has suppressed using a combination of a custom logger and custom error handling).

Steps to reproduce

optimizelyClientInstance = optimizely.createInstance({
  sdkKey: <optimizelySdkKey>,
});
  
const result = await optimizelyClientInstance.onReady({ timeout: 10000 });

@optimizely/optimizely-sdk version: 4.3.1

Browser and version: Chrome

node version: 14.6.0

npm version: 6.14.7

@mjc1283
Copy link
Contributor

mjc1283 commented Oct 6, 2020

Thanks @aflinky for reporting this. We merged a fix (#589) and released it in v4.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants