permb
January 29, 2025, 8:20pm
1
…then it can save you some time to know that there’s a bug in meteor likely introduced when changing user agent parser to useragent-ng which emits “Edge Mobile” instead of “Edge” for iOS and Android Edge versions.
That family (encoded as edgeMobile) has no “modern-browser” entries in the meteor packages so Edge Mobile receives the “legacy browser bundle” instead of the normal “modern” bundle (modern is relative - here means that it’s < 9 years old).
A workaround is available upon request.
Just kidding - it’s in the issue:
opened 08:11PM - 29 Jan 25 UTC
Running 3.1.1
When serving Mobile Edge (iOS & Android), meteor via useragent-ng… detects it as mobileEdge which has no entries in any setMinimumBrowserVersions calls in Meteor so it is assumed to be a legacy browser which caused problems for us since our legacy bundle is not working ATM.
```
import { lookup as lookupUserAgent } from "useragent-ng";
const userAgentString =
"Mozilla/5.0 (iPhone; CPU iPhone OS 18_3_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) EdgiOS/132.0.2957.122 Version/18.0 Mobile/15E148 Safari/604.1"; // Edge iOS
const userAgent = lookupUserAgent(userAgentString.substring(0, 150));
console.dir({ userAgent }, { depth: null });
---
{
userAgent: Agent {
family: 'Edge Mobile',
major: '132',
minor: '0',
patch: '2957',
source: 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_3_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) EdgiOS/132.0.2957.122 Version/18.0 Mobile/15E148 Saf'
}
}
```
Workaround:
Add to your server side code:
```
// Ensure edgeMobile is detected as modern.
// This is a regression probably caused by meteor moving to useragent-ng and not adding edgeMobile
// camelCase Edge Mobile => edgeMobile. version used is the minimum for chrome in meteor
setMinimumBrowserVersions({ edgeMobile: [49] }, "yourapp");
```
permb
January 29, 2025, 9:01pm
2
I would really like to disable the legacy bundle feature and always serve web.browser (”modern”).
Is that possible?
2 Likes
Did you try to use this package to set this browser as modern? meteor/packages/modern-browsers at master · meteor/meteor · GitHub
Example
import { setMinimumBrowserVersions } from 'meteor/modern-browsers'
setMinimumBrowserVersions({
facebook: 325
}, 'minimum versions for ECMAScript 2015 classes')
1 Like