Vaadin 14 - Troubleshooting the Browser
This article is a follow-up of the Vaadin Troubleshooting article which focused on issues caused by the server-side code. This article will focus on the client-side issues.
What to verify in your browser
Two tips before we begin: you should at some point learn how to use your browser’s dev tools:
Second tip: To remove the possibility of random issues caused by corrupted
it’s always good to start the bug hunting with the Vaadin Dance. See
Vaadin Troubleshooting for more details.
Now, press F12 in your browser to fire up dev tools, then switch to the “Console” tab and let’s go!
- Prevent initialization of the theming. Such issues may prevent the theme from being loaded in your app, causing your app to look like a black-text-on-white-background.
- Prevent initialization of other components, causing lots of
Cannot read property x of undefinedfurther on.
Fixing the root cause can then cause a domino effect and can fix all follow-up errors
like theming and
undefined-related issues. Therefore, it’s important to always investigate the
which reveals the stacktrace. Having the stacktrace is very important to quickly locate the
origin of the issue.
Obfuscated stacktraces looks like following (see+vote Vaadin Bug 8872):
(ReferenceError) : Polymer is not defined client-5F17FE7D56927576AB18BC8D06949321.cache.js:212:20 XC client-5F17FE7D56927576AB18BC8D06949321.cache.js:212 Xn client-5F17FE7D56927576AB18BC8D06949321.cache.js:1003 Wn client-5F17FE7D56927576AB18BC8D06949321.cache.js:774 Yn client-5F17FE7D56927576AB18BC8D06949321.cache.js:594 cu client-5F17FE7D56927576AB18BC8D06949321.cache.js:1016 bu client-5F17FE7D56927576AB18BC8D06949321.cache.js:973 _t client-5F17FE7D56927576AB18BC8D06949321.cache.js:575
Such obfuscated stacktrace usually comes from Vaadin Flow, since Flow’s code is written in GWT and compiled in an obfuscated way. Read more on what could cause Flow to blow up/throw exceptions with such obfuscated stacktraces.
The error has occurred in the JS code: xyz. To remedy this issue,
xyz in your Java code-base and perform
corrections as necessary.
See+vote Vaadin Bug 8872 for more details.
Please let me know at email@example.com and I’ll update this guide.