You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Go parser fails to parse the current version of the regexes.yaml file in ua-parser/uap-core. Specifically, there are brand_replacement and model_replacement fields in the current yaml that have no equivalent in the DevicePattern struct.
Attempting to parse the yaml yields the following stack trace snippet:
panic: reflect: call of reflect.Value.SetString on zero Value
goroutine 11 [running]:
reflect.flag.mustBeAssignable(0x0)
/usr/local/Cellar/go/1.4.1/libexec/src/reflect/value.go:215 +0xa1
reflect.Value.SetString(0x0, 0x0, 0x0, 0xc208108bfa, 0x1)
/usr/local/Cellar/go/1.4.1/libexec/src/reflect/value.go:1476 +0x28
github.com/ua-parser/uap-go/uaparser.ToStruct(0xc208248000, 0x23b, 0x23b, 0x418000, 0xc208165290, 0xc208257f00)
<redacted>/src/github.com/ua-parser/uap-go/uaparser/parser.go:41 +0x2b9
github.com/ua-parser/uap-go/uaparser.func·003()
<redacted>/src/github.com/ua-parser/uap-go/uaparser/parser.go:100 +0x141
created by github.com/ua-parser/uap-go/uaparser.New
<redacted>/src/github.com/ua-parser/uap-go/uaparser/parser.go:107 +0x694
I added the following log line at line 42 in parser.go:
So at a minimum the fix is to add a filter for these two fields to unchoke the parser. Even better would be to extend support for these two additional fields in device_parsers.
The text was updated successfully, but these errors were encountered:
The Go parser fails to parse the current version of the regexes.yaml file in ua-parser/uap-core. Specifically, there are brand_replacement and model_replacement fields in the current yaml that have no equivalent in the DevicePattern struct.
Attempting to parse the yaml yields the following stack trace snippet:
I added the following log line at line 42 in parser.go:
and that yielded a bunch of output, the last of which indicates the missing field in the DevicePattern struct:
So at a minimum the fix is to add a filter for these two fields to unchoke the parser. Even better would be to extend support for these two additional fields in device_parsers.
The text was updated successfully, but these errors were encountered: