[COMPASS-5860] Unregister autouptater events before app.exit Created: 25/May/22  Updated: 01/Feb/23  Resolved: 01/Feb/23

Status: Closed
Project: Compass
Component/s: Auto Updates
Affects Version/s: None
Fix Version/s: No version

Type: Bug Priority: Major - P3
Reporter: Maurizio Casimirri Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones COMPASS-5882 Properly detach events and intervals ... Closed
Documentation Changes: Not Needed

 Description   

We have seen instances where the `autoUpdater` is doing work after the cleanup procedure of compass, which may cause unintended behavior (ie. logging on closed files).

MongoDB Compass Beta has encountered an unexpected error
Error [ERR_STREAM_WRITE_AFTER_END]: write after end
    at process.<anonymous> (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/build/252.js:1:19006)
    at f (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/build/main.js:1:271)
    at Object.write (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/build/main.js:1:335)
    at p._write (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/build/main.js:1:79764)
    at p.info (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/build/main.js:1:79970)
    at AutoUpdater.<anonymous> (/Applications/MongoDB Compass Beta.app/Contents/Resources/app.asar/build/113.js:1:2915)

We should involve the autoUpdater in the cleanup by detaching all the events attatched on the autoupdater instance.


Generated at Wed Feb 07 22:41:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.