parseUserAgent returns the hardcoded server result before it reads overrides, so a client that explicitly sends __os, __model, __brand or __device has all of it discarded whenever its user agent matches the server heuristic.
any non-browser sdk hits this, because a plain name/version user agent is exactly what SINGLE_NAME_VERSION_REGEX matches.
parseUserAgent('my-sdk/1.0.0', { __os: 'Android', __model: 'A105', __brand: 'Acme' })
// { isServer: true, device: 'server', os: '', model: '', brand: '' }
the event then goes down the uaInfo.isServer branch in events.incoming-event.ts, gets an empty deviceId, and is attached to an existing session instead of opening its own. so device, os and brand analytics are empty for every native sdk unless you disguise the user agent as a browser.
i hit this at work, on a self-hosted instance, with a native sdk on android hardware. the workaround was to put Model= and Manufacturer= markers in the user agent so the heuristic stops firing, which the docs do not mention.
happy to send a pr: only take the server shortcut when the caller has not said what the device is.
parseUserAgentreturns the hardcoded server result before it readsoverrides, so a client that explicitly sends__os,__model,__brandor__devicehas all of it discarded whenever its user agent matches the server heuristic.any non-browser sdk hits this, because a plain
name/versionuser agent is exactly whatSINGLE_NAME_VERSION_REGEXmatches.the event then goes down the
uaInfo.isServerbranch inevents.incoming-event.ts, gets an emptydeviceId, and is attached to an existing session instead of opening its own. so device, os and brand analytics are empty for every native sdk unless you disguise the user agent as a browser.i hit this at work, on a self-hosted instance, with a native sdk on android hardware. the workaround was to put
Model=andManufacturer=markers in the user agent so the heuristic stops firing, which the docs do not mention.happy to send a pr: only take the server shortcut when the caller has not said what the device is.