RangeError: Invalid array length
at ./node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/es5.js:1:3125
at Array.map (<anonymous>)
at Function.e.map (./node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/es5.js:1:3404)
at ./node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/es5.js:1:3088
at Array.map (<anonymous>)
at Function.e.map (./node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/es5.js:1:3404)
at Function.e.compareVersions (./node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/es5.js:1:2993)
at e.t.compareVersion (./node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/es5.js:1:11272)
at e.t.satisfies (./node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/es5.js:1:10778)
at isBrowserValid (./src/lib/browserValidator.ts:10:36)
...
We can protect ourselves from this by adding a try catch, but my expectation was that bowser does not expose problems like this to the caller.
Template to report about browser detection issue
We observed a user agent
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 OPR/82.0.4227.58/VoplfMPIL3LW69FfgZ
which causes
.satisfies
to throw an error. E.g.results in:
We can protect ourselves from this by adding a
try catch
, but my expectation was that bowser does not expose problems like this to the caller.