What are legal "user.agent=" values?

753 views
Skip to first unread message

mmo

unread,
Jun 27, 2022, 9:12:31 AM6/27/22
to GWT Users
I was trying to update our application from GWT 2.8.1 to the new GWT 2.10.0.
The first compilation failed with the eror message that ie10 was not a legal user.agent value (we had indeed used that value, since it was the newest IE version available).

So - according to the release notes which mention “FF”, “Chrome”, “IE” (for IE11), “Edge”, and “Safari” as new user.agent values I changed that to "Chrome, Edge". 
The subsequent compilation then succeeded but when starting up the application I get the error:

[INFO]          [ERROR] Line 21: Value 'Chrome' in not a valid value for property 'user.agent'
[INFO]          [ERROR] Line 21: Value 'Edge' in not a valid value for property 'user.agent'


Thus my question: what *are* the new valid user.agent values? Do they have to be in all-lowercase (as the old ones) or what exactly can or does one have to enter here? 

Jens

unread,
Jun 27, 2022, 10:58:25 AM6/27/22
to GWT Users
So - according to the release notes which mention “FF”, “Chrome”, “IE” (for IE11), “Edge”, and “Safari” as new user.agent values I changed that to "Chrome, Edge". 

Not these values are for running HTMLUnit, not for GWT compiler.


Thus my question: what *are* the new valid user.agent values? Do they have to be in all-lowercase (as the old ones) or what exactly can or does one have to enter here? 

GWT 2.10.0 user.agent values are 
  • gecko1_8: Used for FireFox and IE 11
  • safari: Used for everything based on WebKit (Safari, Chrome, Edge, Opera, ...)


-- J.

mmo

unread,
Jun 28, 2022, 12:18:07 PM6/28/22
to GWT Users
Thanks for responding and clarifying this! 

Unfortunately, we are using some library which obviously tries to set an outdated value and so I now end up in:
...
[INFO] --- gwt-maven-plugin:2.10.0:compile (default) @ zhquest-web ---
[INFO] Loading inherited module 'ch.zh.ksta.zhquest.ZHQuestWebDevelopment'
[INFO]    Loading inherited module 'ch.zh.ksta.zhquest.ZHQuestWeb'
[INFO]       Loading inherited module 'com.sencha.gxt.ui.GXT'
[INFO]          Loading inherited module 'com.sencha.gxt.data.Data'
[INFO]             Loading inherited module 'com.sencha.gxt.core.Core'
[INFO]                [ERROR] Line 108: Value 'ie8' in not a valid value for property 'user.agent'

:-(

Too many libraries in use here...

mmo

unread,
Jun 28, 2022, 1:05:46 PM6/28/22
to GWT Users
For the sake of others running into the same issue:

I was able to fix the the above issue causing the error "Value 'ie8' in not a valid value for property 'user.agent'" by providing my own version of the ".../com/sencha/gxt/core/Core.gwt.xml"-file (the original is in gxt-4.0.2.jar) in which I commented away the outdated stuff following the " <!-- Restrict the permutation explosion -->" comment.

But only to now getting stuck with: 
...
[INFO] --- gwt-maven-plugin:2.10.0:compile (default) @ zhquest-web ---
[INFO] Compiling module ch.zh.ksta.zhquest.ZHQuestWebDevelopment
[INFO] [ERROR] Unexpected internal compiler error
[INFO] java.lang.IllegalArgumentException
[INFO]  at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[INFO]  at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[INFO]  at com.google.gwt.dev.javac.BytecodeSignatureMaker$CompileDependencyVisitor.<init>(BytecodeSignatureMaker.java:59)
[INFO]  at com.google.gwt.dev.javac.BytecodeSignatureMaker.visitCompileDependenciesInBytecode(BytecodeSignatureMaker.java:227)
[INFO]  at com.google.gwt.dev.javac.BytecodeSignatureMaker.getCompileDependencySignature(BytecodeSignatureMaker.java:209)
[INFO]  at com.google.gwt.dev.javac.CompiledClass.getSignatureHash(CompiledClass.java:166)
[INFO]  at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:41)
[INFO]  at com.google.gwt.dev.javac.Dependencies$Ref.<init>(Dependencies.java:36)
[INFO]  at com.google.gwt.dev.javac.Dependencies.resolve(Dependencies.java:100)
[INFO]  at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:349)
[INFO]  at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:532)
[INFO]  at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:464)
[INFO]  at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:423)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:210)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:190)
[INFO]  at com.google.gwt.dev.Precompile.precompile(Precompile.java:131)
[INFO]  at com.google.gwt.dev.Compiler.compile(Compiler.java:192)
[INFO]  at com.google.gwt.dev.Compiler.compile(Compiler.java:143)
[INFO]  at com.google.gwt.dev.Compiler.compile(Compiler.java:132)
[INFO]  at com.google.gwt.dev.Compiler$1.run(Compiler.java:110)
[INFO]  at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
[INFO]  at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
[INFO]  at com.google.gwt.dev.Compiler.main(Compiler.java:113)

WTF?

Jens

unread,
Jun 29, 2022, 7:25:47 AM6/29/22
to GWT Users
But only to now getting stuck with: 
...
[INFO] --- gwt-maven-plugin:2.10.0:compile (default) @ zhquest-web ---
[INFO] Compiling module ch.zh.ksta.zhquest.ZHQuestWebDevelopment
[INFO] [ERROR] Unexpected internal compiler error
[INFO] java.lang.IllegalArgumentException
[INFO]  at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)
[INFO]  at org.objectweb.asm.ClassVisitor.<init>(Unknown Source)


Now you have conflicting versions of ASM in your class path. The IllegalArgumentException within ASM's ClassVisitor class constructor is usually thrown when you have a class file compiled with a newer Java version than ASM supports. So I guess you have a relatively old ASM version on classpath. GWT itself depends on ASM 9.2 (see: https://mvnrepository.com/artifact/org.gwtproject/gwt-dev/2.10.0 ). ASM 9.2 supports java up to version 18.

-- J.
Reply all
Reply to author
Forward
0 new messages