Skip to content
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

safe-json Memory Leak/Infinite Execution #153

Open
Mostafatalaat770 opened this issue Nov 24, 2023 · 3 comments
Open

safe-json Memory Leak/Infinite Execution #153

Mostafatalaat770 opened this issue Nov 24, 2023 · 3 comments
Assignees

Comments

@Mostafatalaat770
Copy link

Mostafatalaat770 commented Nov 24, 2023

We are facing an issue on random devices on specific browsers that can be related to the safe-json package.

Basically, it keeps trying to set them on the storage but it fails(maybe) and keeps trying till it runs out of memory

image

This only happened after upgrading to the latest web3modal v2, and it still happens on v3.

Steps to reproduce?

It happens for random users so we don't know what the problem is, it happens locally for some dev members and doesn't happen on production for the same devs with the same config (browser).

Versions

Working:
"@walletconnect/modal": "^2.5.7",
"@web3modal/ethereum": "2.6.0",
"viem": "1.0.7",
"wagmi": "1.3.3"

Problematic:
V2:
"@web3modal/ethereum": "2.7.1",
"viem": "1.19.6",
"wagmi": "1.4.7"

V3:
"@web3modal/wagmi": "^3.3.2",
"viem": "1.19.6",
"wagmi": "1.4.7"

@Mostafatalaat770 Mostafatalaat770 changed the title safe-json Memory Leak/infinite execution safe-json Memory Leak/Infinite Execution Nov 24, 2023
@Mostafatalaat770
Copy link
Author

might be related: WalletConnect/walletconnect-monorepo#3860

@Mostafatalaat770
Copy link
Author

any update?

@ganchoradkov
Copy link
Member

hey @Mostafatalaat770, do you have any steps to reproduce it?
The storage, while persistent, keeps data in memory during its lifecycle and reads from file/storage when its launched.
This means that if your implementation has some circular/looping setItem calls, the memory would increasing with that.
For example this might happen if you're creating new pairings all the time for some reason or similar.
We had previous reports where react components were repainted constantly causing similar issue
I would check first if that is the case

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

No branches or pull requests

2 participants