[COMPASS-5502] Migration from 1.19.2 to 1.30.1 causes Compass to error on load Created: 09/Feb/22  Updated: 28/Jun/23  Resolved: 27/Mar/23

Status: Closed
Project: Compass
Component/s: State Management, Tech debt
Affects Version/s: None
Fix Version/s: No version

Type: Bug Priority: Major - P3
Reporter: Rhys Howell Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS:
node.js / npm versions:
Additional info:


Attachments: JPEG File Image from iOS.jpg     PNG File image (2).png    
Documentation Changes: Not Needed

 Description   

Reported OS: windows

Slack thread:
https://mongodb.slack.com/archives/C0U7K0MC3/p1644418694099459

Looks like what's probably happening is that in the 1.20 migration step the `storage mixin` is using the `localforage` package which throws an uncaught exception. We might be able to fix what causes localforage to throw the `No available storage method found` expection or just catch the exception so Compass is still usable without performing a full migration.
https://github.com/localForage/localForage/blob/master/src/localforage.js#L336
https://github.com/mongodb-js/compass/blob/main/packages/storage-mixin/lib/backends/local.js#L28
https://github.com/mongodb-js/compass/blob/main/packages/compass/src/app/migrations/1.20.0-beta.0.js

Debug screenshots attached


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