flow
flow copied to clipboard
Vaadin flow 14 hangs after Browser engine version parsing failed
It happens occasionally that the server is not responding to any request ad hangs after this message appearing on the logs:
961017320 ERROR Browser engine version parsing failed for: mozilla%2f5.0+%28linux%3b+u%3b+android+10%3b+it-it%3b+mi+8+lite+build%2fqkq1.190910.002%29+applewebkit%2f537.36+%28khtml%2c+like+gecko%29+version%2f4.0+chrome%2f89.0.4389.116+mobile+safari%2f537.36+xiaomi%2fmiuibrowser%2f13.6.0-gn For input string: "a%2f5.0" 961017320 ERROR Browser engine version parsing failed for: mozilla%2f5.0+%28linux%3b+u%3b+android+10%3b+it-it%3b+mi+8+lite+build%2fqkq1.190910.002%29+applewebkit%2f537.36+%28khtml%2c+like+gecko%29+version%2f4.0+chrome%2f89.0.4389.116+mobile+safari%2f537.36+xiaomi%2fmiuibrowser%2f13.6.0-gn For input string: "a%2f5.0" 961017320 ERROR OS major version parsing failed for: %2f5 For input string: "%2f5" 961017320 ERROR OS major version parsing failed for: %2f5 For input string: "%2f5" 961017320 ERROR OS minor version parsing failed for: 0+%28linux%3b+u%3b+android+10%3b+it For input string: "0+%28linux%3b+u%3b+android+10%3b+it"
After that I need to restart the servlet. Sometimes this message is not causing any problem, but when the server hangs the last log message is always this one.
Versions:
- Vaadin / Flow version: 14.8.11
- Java version: 11
- OS version: Linux Ubuntu 20.04
- Application Server (if applicable): Jetty 9.4.43.v20210629
- Heap memory: FREE MEM: 3274 Mb, Total MEM:5120Mb, USED MEM: 1846 Mb
- Processors load very low
Another error here: ERROR Browser version parsing failed for: mozilla/5.0 (macintosh; intel mac os x 10_13_5) applewebkit/605.1.15 (khtml, like gecko) crios/103 version/11.1.1 safari/605.1.15 begin 7, end 6, length 6
ERROR Browser version parsing failed for: mozilla/5.0 (macintosh; intel mac os x 10_13_5) applewebkit/605.1.15 (khtml, like gecko) crios/103 version/11.1.1 safari/605.1.15 begin 7, end 6, length 6
Seems like something has changed in Chrome MAC user agent: in our tests we expect something like CriOS/49.0.2623.73
but in the reported UA it is crios/103
with only major version
For the errors in the description it seems like the UA string is URL encoded
@mcollovati looking at the provided docu by the Chromium Team it looks like only the major version is provided: https://chromium.googlesource.com/chromium/src.git/+/HEAD/docs/ios/user_agent.md
The original issue seems like using a MI Browser
as there is XiaoMi/MiuiBrowser/13.6.0-gn
but why is the userAgent received as encoded I can not see as it is taken directly from the request. The encoding is the problem here.
Other errors: ERROR Browser major version parsing failed for: 113 vers For input string: "113 vers" 692910514 ERROR Browser engine version parsing failed for: mozilla%2f5.0+%28linux%3b+u%3b+android+11%3b+it-it%3b+redmi+9t+build%2frkq1.201004.002%29+applewebkit%2f537.36+%28khtml%2c+like+gecko%29+version%2f4.0+chrome%2f100.0.4896.127+mobile+safari%2f537.36+xiaomi%2fmiuibrowser%2f13.27.0-gn For input string: "a%2f5.0" 692910514 ERROR OS major version parsing failed for: %2f5 For input string: "%2f5" 692910514 ERROR OS minor version parsing failed for: 0+%28linux%3b+u%3b+android+11%3b+it For input string: "0+%28linux%3b+u%3b+android+11%3b+it" 692911226 ERROR Browser engine version parsing failed for: mozilla%2f5.0+%28linux%3b+u%3b+android+11%3b+it-it%3b+redmi+9t+build%2frkq1.201004.002%29+applewebkit%2f537.36+%28khtml%2c+like+gecko%29+version%2f4.0+chrome%2f100.0.4896.127+mobile+safari%2f537.36+xiaomi%2fmiuibrowser%2f13.27.0-gn For input string: "a%2f5.0" 692911226 ERROR OS major version parsing failed for: %2f5 For input string: "%2f5" 692911226 ERROR OS minor version parsing failed for: 0+%28linux%3b+u%3b+android+11%3b+it For input string: "0+%28linux%3b+u%3b+android+11%3b+it"
It is really weird that the header values are encoded. Is the servlet container directly exposed to the client, or is there something in the middle that may modify the HTTP request?
There is an httpproxy but the headers are not encoded at the app level. But why is this error causing the entire app to stop responding? Other errors: 896346120 ERROR OS major version parsing failed for: 11) applewebkit/537 For input string: "11) applewebkit/537" 896346120 ERROR OS minor version parsing failed for: 36 (khtml, like gecko) version/4 For input string: "36 (khtml, like gecko) version/4" 896346844 ERROR OS major version parsing failed for: api 30) For input string: "api 30)" 897102922 ERROR OS major version parsing failed for: 11) applewebkit/537 For input string: "11) applewebkit/537" 897102922 ERROR OS minor version parsing failed for: 36 (khtml, like gecko) version/4 For input string: "36 (khtml, like gecko) version/4" 897384546 ERROR OS major version parsing failed for: 11) applewebkit/537 For input string: "11) applewebkit/537" 897384546 ERROR OS major version parsing failed for: 11) applewebkit/537 For input string: "11) applewebkit/537" 897384546 ERROR OS minor version parsing failed for: 36 (khtml, like gecko) version/4 For input string: "36 (khtml, like gecko) version/4"
I can't see anything that would have the application fail just because the browser version fails. The major and minor versions should just be -1 and -1 and the issue logged for a faulty string. What I would expect would be the browser not supported page showing up.