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

Errors on Jest which seems to be related to node_modules/@matrix-org/matrix-wysiwyg #24951

Closed
luixxiul opened this issue Mar 24, 2023 · 4 comments
Labels
A-Developer-Experience A-Rich-Text-Editor Issues with the new rich text editor, also known as the WYSIWYG editor A-Testing Testing, code coverage, etc. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Task Tasks for the team like planning Z-Labs

Comments

@luixxiul
Copy link

Steps to reproduce

  1. Check Jest test result on https://github.com/matrix-org/matrix-react-sdk/actions/runs/4514234500/jobs/7950070384?pr=10449

Outcome

What did you expect?

Jest test should pass.

What happened instead?

It did not pass because of the errors below:

yarn run v1.22.19
$ yarn test --coverage --ci --reporters github-actions --max-workers 2 --cacheDirectory /tmp/jest_cache
$ jest --coverage --ci --reporters github-actions --max-workers 2 --cacheDirectory /tmp/jest_cache
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 accountData listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Event.decrypted listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit

Error: recursive use of an object detected which would lead to unsafe aliasing in rust

    at Q.wbg.__wbindgen_throw (node_modules/@matrix-org/matrix-wysiwyg/dist/matrix-wysiwyg.umd.cjs:1:30495)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:384186)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:384175)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:355132)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:381551)
    at node_modules/@matrix-org/matrix-wysiwyg/dist/matrix-wysiwyg.umd.cjs:1:27175
    at FinalizationRegistry.cleanupSome (<anonymous>)

Error: recursive use of an object detected which would lead to unsafe aliasing in rust

    at Q.wbg.__wbindgen_throw (node_modules/@matrix-org/matrix-wysiwyg/dist/matrix-wysiwyg.umd.cjs:1:30495)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:384186)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:384175)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:355132)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:381551)
    at node_modules/@matrix-org/matrix-wysiwyg/dist/matrix-wysiwyg.umd.cjs:1:27175
    at FinalizationRegistry.cleanupSome (<anonymous>)

Error: recursive use of an object detected which would lead to unsafe aliasing in rust

    at Q.wbg.__wbindgen_throw (node_modules/@matrix-org/matrix-wysiwyg/dist/matrix-wysiwyg.umd.cjs:1:30495)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:384186)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:384175)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:355132)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:381551)
    at node_modules/@matrix-org/matrix-wysiwyg/dist/matrix-wysiwyg.umd.cjs:1:27175
    at FinalizationRegistry.cleanupSome (<anonymous>)

Error: recursive use of an object detected which would lead to unsafe aliasing in rust

    at Q.wbg.__wbindgen_throw (node_modules/@matrix-org/matrix-wysiwyg/dist/matrix-wysiwyg.umd.cjs:1:30495)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:384186)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:384175)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:355132)
    at null.<anonymous> (wasm:/wasm/002a3d1a:1:381551)
    at node_modules/@matrix-org/matrix-wysiwyg/dist/matrix-wysiwyg.umd.cjs:1:27175
    at FinalizationRegistry.cleanupSome (<anonymous>)
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 sync listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 sync listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 sync listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 accountData listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 accountData listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Thread.update listeners added to [Thread]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Thread.update listeners added to [Thread]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Event.relationsCreated listeners added to [MatrixEvent]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Event.relationsCreated listeners added to [MatrixEvent]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Event.relationsCreated listeners added to [MatrixEvent]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Event.relationsCreated listeners added to [MatrixEvent]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 sync listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 sync listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [MockMap]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 update listeners added to [WidgetStore]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Beacon.LivenessChange listeners added to [MockClientWithEventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Beacon.new listeners added to [MockClientWithEventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Beacon.update listeners added to [MockClientWithEventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Beacon.Destroy listeners added to [MockClientWithEventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 RoomState.members listeners added to [MockClientWithEventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 deviceVerificationChanged listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 userTrustStatusChanged listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 accountData listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [MockMap]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Event.relationsCreated listeners added to [MatrixEvent]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Event.relationsCreated listeners added to [MatrixEvent]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Event.beforeRedaction listeners added to [MatrixEvent]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [MockMap]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 load listeners added to [MockMap]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Thread.update listeners added to [Thread]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Room.accountData listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 RoomState.events listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 accountData listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Room listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Room.myMembership listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 RoomState.members listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(node:2148) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Thread.update listeners added to [Thread]. Use emitter.setMaxListeners() to increase limit
(node:2149) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Room.accountData listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.

=============================== Coverage summary ===============================
Statements   : 52.9% ( 26271/49661 )
Branches     : 46.59% ( 13090/28095 )
Functions    : 52.58% ( 5629/10705 )
Lines        : 53.65% ( 25350/47250 )
================================================================================
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.

Operating system

No response

Browser information

No response

URL for webapp

No response

Application version

No response

Homeserver

No response

Will you send logs?

No

@germain-gg
Copy link
Contributor

Thank you for raising this issue
I believe it should actually belong to https://github.com/matrix-org/matrix-rich-text-editor rather than on the Element Web repo as the issue probably lives upstream

@germain-gg germain-gg closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2023
@luixxiul
Copy link
Author

I see. Should this not be transferred to that repository?

@t3chguy
Copy link
Member

t3chguy commented Mar 27, 2023

@gsouquet if it affects devx on this repo then it can live here

@t3chguy t3chguy reopened this Mar 27, 2023
@t3chguy t3chguy added T-Task Tasks for the team like planning S-Major Severely degrades major functionality or product features, with no satisfactory workaround A-Developer-Experience O-Occasional Affects or can be seen by some users regularly or most users rarely A-Rich-Text-Editor Issues with the new rich text editor, also known as the WYSIWYG editor A-Testing Testing, code coverage, etc. and removed T-Defect labels Mar 27, 2023
@artcodespace
Copy link

The immediate issue was fixed by reverting a PR in the react SDK:

Fixed by matrix-org/matrix-react-sdk#10458

The underlying issue was fixed by making changes to the rich text editor:

Fixed by matrix-org/matrix-rich-text-editor#635

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Developer-Experience A-Rich-Text-Editor Issues with the new rich text editor, also known as the WYSIWYG editor A-Testing Testing, code coverage, etc. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Task Tasks for the team like planning Z-Labs
Projects
None yet
Development

No branches or pull requests

4 participants