We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following parsing fails
iex(4)> UAInspector.parse("Mozilla/5.0 (Linux; arm_64; Android 10; Mi Note 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.5765.05 Mobile Safari/537.36") ** (Version.InvalidVersionError) invalid version: "115.0.5765-05" (elixir 1.16.0) lib/version.ex:475: Version.to_matchable/2 (elixir 1.16.0) lib/version.ex:347: Version.compare/2 (ua_inspector 3.9.0) lib/ua_inspector/parser/client.ex:293: UAInspector.Parser.Client.resolve_engine_detailed/3 (ua_inspector 3.9.0) lib/ua_inspector/parser/client.ex:266: UAInspector.Parser.Client.maybe_resolve_engine/4 (ua_inspector 3.9.0) lib/ua_inspector/parser/client.ex:322: UAInspector.Parser.Client.result/3 (ua_inspector 3.9.0) lib/ua_inspector/parser/client.ex:24: UAInspector.Parser.Client.parse/2 (ua_inspector 3.9.0) lib/ua_inspector/parser.ex:155: UAInspector.Parser.parse_client/2 iex:4: (file)
Problem seems to be using the elixir Version module to compare semver strings with prerelease tags?
The text was updated successfully, but these errors were encountered:
Fix Version.InvalidVersionError
fdcbd28
Issue: elixir-inspector#35 Currently, parsing the following user agent fails: `Mozilla/5.0 (Linux; arm_64; Android 10; Mi Note 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.5765.05 Mobile Safari/537.36` After this fix, this is parsed as: ``` %UAInspector.Result{ user_agent: "Mozilla/5.0 (Linux; arm_64; Android 10; Mi Note 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.5765.05 Mobile Safari/537.36", browser_family: "Chrome", client: %UAInspector.Result.Client{ engine: "Blink", engine_version: "115.0.5765.05", name: "Chrome Mobile", type: "browser", version: "115.0.5765.05" }, device: %UAInspector.Result.Device{ brand: "Xiaomi", model: "Mi Note 10", type: "phablet" }, os: %UAInspector.Result.OS{name: "Android", platform: "ARM", version: "10"}, os_family: "Android" } ```
Version.InvalidVersionError
0
Successfully merging a pull request may close this issue.
The following parsing fails
Problem seems to be using the elixir Version module to compare semver strings with prerelease tags?
The text was updated successfully, but these errors were encountered: