-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Labels
acknowledgedbugSomething isn't workingSomething isn't workingneeds-triagequestionFurther information is requestedFurther information is requestedwaiting-requestor
Description
Is there an existing issue for this?
- I have searched the existing issues
SDK Version
react-sdk v3.1.0
Current Behavior
We currently have logs indicating random requests getting the following error
message:Request error stack:Error: Request error at responsePromise.n.onreadystatechange
Expected Behavior
No error
Steps To Reproduce
// or this is written inside useEffect
const client = createInstance({
sdkKey: 'SDK_KEY',
datafileOptions: {
autoUpdate: true,
updateInterval: 300000,
},
eventBatchSize: 10,
eventFlushInterval: 1000,
errorHandler: {
handleError: (e: Error) => {
console.log(e.message, e.stack);
},
},
odpOptions: {
disabled: true,
},
});
const OptimizelyFlagProvider = () => {
// some useState
useEffect(() => {
const isClientValid = () => {
return client?.getOptimizelyConfig() !== null;
};
client?.onReady().then((ocInstance: OnReadyResult) => {
if (isClientValid()) {
// set valid state
}
else {
// set error state
}
}(
}, []);
return (
<OptimizelyProvider optimizely={client} timeout={500} user={{ id: 'userId' }}>
// error and successful body {....}
</OptimizelyProvider>
);
}React Framework
18.2.0
Browsers impacted
Chrome latest version
Link
No response
Logs
No response
Severity
Affecting users
Workaround/Solution
No response
Recent Change
No response
Conflicts
No response
Metadata
Metadata
Assignees
Labels
acknowledgedbugSomething isn't workingSomething isn't workingneeds-triagequestionFurther information is requestedFurther information is requestedwaiting-requestor
