Missing property when attempting to supply a linux useragent
A-Posthuman opened this issue · 3 comments
agent = await new Agent( { maxConcurrency: 1, userAgent: 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4314 Safari/537.36' } );
Cannot read properties of undefined (reading 'length')","metadata":{"name":"TypeError","stack":"TypeError: Cannot read properties of undefined (reading 'length')\n at new BrowserData (/home/ubuntu/plugins/default-browser-emulator/lib/BrowserData.ts:34:26)
also a 1 character typo in the docs on the Agent page for userAgent the type is Strong instead of String.
Is attempting to use a linux UA not possible currently? I notice there don't seem to be any available emulators.
We currently don't have any supported linux emulators. When we were building the emulators, we were using data from statcounter to determine which operating systems represent the bulk of traffic. Chrome's latest couple versions on mac and windows are the big lump of traffic. Linux was so small that it seemed like you're actually putting yourself into an outlier bucket by using it.
All that said, at some point we will be able to just pick the closest engine and run with whatever data we've got. That's logged in another TODO ticket.
Thanks for the typo :)
I should note: we don't have mobile. Obviously Android is a big chunk. Desktop linux is the one that is very small (https://gs.statcounter.com/os-market-share/desktop/worldwide/#monthly-202011-202111)
I don't think we can/will support Linux agents in the short term since they create a detection angle and are too small an audience to warrant generating all the profile data. However, this error should be better.
Would like to improve the error messages when a profile is unsupported.