Skip to content
New issue

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

Browser version parser fails #89

Closed
yuri-martynov opened this issue Dec 1, 2018 · 3 comments
Closed

Browser version parser fails #89

yuri-martynov opened this issue Dec 1, 2018 · 3 comments
Milestone

Comments

@yuri-martynov
Copy link

System.ArgumentException: Version string portion was too short or too long.
Parameter name: input
at System.Version.ParseVersion(ReadOnlySpan`1 input, Boolean throwOnFailure)
at System.Version.Parse(String input)
at System.Version..ctor(String version)
at Wangkanai.Detection.Collections.Safari..ctor(String agent)
at Wangkanai.Detection.BrowserResolver.GetBrowser()
at Wangkanai.Detection.BrowserResolver..ctor(IUserAgentService service)

@wangkanai
Copy link
Owner

wangkanai commented Dec 2, 2018

Look like migrating to Systwm.Version was not a good idea. #77

We will need to review this in next release beta10, in the meantime you can down grade to beta8.

@Samir-GIIK
Copy link

@wangkanai I just came across this one as well.

Errror:
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(ReadOnlySpan1 str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(ReadOnlySpan1 s, NumberStyles style, NumberFormatInfo info)
at System.Version.TryParseComponent(ReadOnlySpan1 component, String componentName, Boolean throwOnFailure, Int32& parsedComponent) at System.Version.ParseVersion(ReadOnlySpan1 input, Boolean throwOnFailure)
at System.Version.Parse(String input)
at System.Version..ctor(String version)
at Wangkanai.Detection.Collections.Safari..ctor(String agent)
at Wangkanai.Detection.BrowserResolver.GetBrowser()
at lambda_method(Closure , ServiceProviderEngineScope )

User-Agent: Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+

Issue is the "+" at the end of the string

Issue was discovered by using Chrome Dev Tools and selecting BlackBerry Z30 from the Devices List to preview website for that device.

wangkanai added a commit that referenced this issue Dec 8, 2019
@wangkanai wangkanai added this to the 2.0 Beta14 milestone Dec 8, 2019
wangkanai added a commit that referenced this issue Dec 8, 2019
@wangkanai
Copy link
Owner

fixed with pr #128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants