Seen locally:
[Popups] Value "undefined previews" for property "previewCountBucket" is not one of ["0 previews","1-4 previews","5-20 previews","21+ previews","unknown"]
Doesn't happen on a fresh session on an incognito window.
Steps to reproduce
- Unknown
There's some codepath that ends up putting NaN in storage for the previewCount.
More info
mw.storage.store.get('ext.popups.core.previewCount') //> "NaN"
AC
- When setting things in storage the types and existence of values is validated before storing (review all storage setters and make assertions)
- Wherever previewCount can become NaN is fixed
- Discard previewCount on storage read if it doesn't validate as a not-NaN number
- Return "unknown" in getPreviewCountBucket when count isn't a number or is -1 (see T168371#3367852).