launchdarkly / react-client-sdk

LaunchDarkly Client-side SDK for React.js
Other
86 stars 68 forks source link

Console Warning - Memory Leakage #235

Open shahbazshoukat opened 9 months ago

shahbazshoukat commented 9 months ago

Is this a support request? The issue is in SDK.

Describe the bug I am encountering a console warning related to memory leakage. The warning message is as follows:

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.

To reproduce Use LDProvider component:

image

Expected behavior There should not be any memory leakage warning in the console when initializing the Launch Darkly.

Logs

image Screenshot 2024-01-03 at 2 47 22 PM

SDK version 3.0.9

Language version, developer tools TS/React

OS/platform MacOS: 13.4.1 (c) Browser: Google Chorme - Version 120.0.6099.129 (Official Build) (arm64)

louis-launchdarkly commented 9 months ago

Hello @shahbazshoukat, thank you for reaching out with this report. We will look into this. Just to check, is this happening during development (using something like hot reload) or inside a production application?

Filed internally as 228551.

github-actions[bot] commented 8 months ago

This issue is marked as stale because it has been open for 30 days without activity. Remove the stale label or comment, or this will be closed in 7 days.

FlorianBurgevin commented 7 months ago

It's a React warning so you see it only in development.

It's not blocking the application but it means there is something wrong in conception.

I have the same problem