Found a simple solution - Add this line to your Junit.gwt.xml file after you configure you pass this -Dgwt.args="-devMode" as your VM argument. You will also need to add your src/main/java src/test/java to your run configuration classpath explicitly.
<set-property name="user.agent" value="gecko1_8" /> Somehow there is no default user agent used in the JUnitShell responsible for running the test. On Friday, August 18, 2017 at 4:42:31 PM UTC+5:30, [email protected] wrote: > > to help anyone looking at it this is the error - > Starting Jetty on port 0 > [WARN] ServletContainerInitializers: detected. Class hierarchy: empty > Rebinding com.google.gwt.user.client.impl.WindowImpl > Checking rule <replace-with > class='com.google.gwt.user.client.impl.WindowImplIE'/> > [ERROR] Error while executing the JavaScript provider for property > 'user.agent' > com.google.gwt.core.client.JavaScriptException: (null) > __gwt_getProperty([string: 'user.agent']): null > at > com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252) > at > com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:121) > at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:573) > at > com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:293) > at > com.google.gwt.dev.shell.ModuleSpacePropertyOracle.computePropertyValue(ModuleSpacePropertyOracle.java:152) > at > com.google.gwt.dev.shell.ModuleSpacePropertyOracle.getSelectionProperty(ModuleSpacePropertyOracle.java:89) > at > com.google.gwt.dev.cfg.ConditionWhenPropertyIs.doEval(ConditionWhenPropertyIs.java:77) > at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:53) > at com.google.gwt.dev.cfg.ConditionAny.doEval(ConditionAny.java:52) > at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:53) > at com.google.gwt.dev.cfg.ConditionAll.doEval(ConditionAll.java:53) > at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:53) > at com.google.gwt.dev.cfg.Rule.isApplicable(Rule.java:52) > at > com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.getRebindRule(StandardRebindOracle.java:116) > at > com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:66) > at > com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:262) > at > com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:144) > at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:597) > at > com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:483) > at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) > at com.google.gwt.core.shared.GWT.createImpl(GWT.java:83) > at com.google.gwt.core.client.GWT.create(GWT.java:86) > at com.google.gwt.user.client.Window.<clinit>(Window.java:514) > at > com.google.gwt.user.client.Window$Location.getQueryString(Window.java:267) > at > com.google.gwt.user.client.Window$Location.ensureListParameterMap(Window.java:334) > at com.google.gwt.user.client.Window$Location.getParameter(Window.java:212) > at > com.google.gwt.logging.client.LogConfiguration$LogConfigurationImplRegular.setLevels(LogConfiguration.java:111) > at > com.google.gwt.logging.client.LogConfiguration$LogConfigurationImplRegular.configureClientSideLogging(LogConfiguration.java:72) > at > com.google.gwt.logging.client.LogConfiguration.onModuleLoad(LogConfiguration.java:162) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:423) > at > com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) > at > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:530) > at > com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368) > at java.lang.Thread.run(Unknown Source) > [ERROR] Unable to get value of property 'user.agent' > com.google.gwt.core.ext.BadPropertyValueException: Missing property > 'user.agent' was not specified > at > com.google.gwt.dev.shell.ModuleSpacePropertyOracle.getConfigurationProperty(ModuleSpacePropertyOracle.java:74) > at > com.google.gwt.dev.cfg.ConditionWhenPropertyIs.doEval(ConditionWhenPropertyIs.java:81) > at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:53) > at com.google.gwt.dev.cfg.ConditionAny.doEval(ConditionAny.java:52) > at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:53) > at com.google.gwt.dev.cfg.ConditionAll.doEval(ConditionAll.java:53) > at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:53) > at com.google.gwt.dev.cfg.Rule.isApplicable(Rule.java:52) > at > com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.getRebindRule(StandardRebindOracle.java:116) > at > com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:66) > at > com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:262) > at > com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:144) > at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:597) > at > com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:483) > at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) > at com.google.gwt.core.shared.GWT.createImpl(GWT.java:83) > at com.google.gwt.core.client.GWT.create(GWT.java:86) > at com.google.gwt.user.client.Window.<clinit>(Window.java:514) > at > com.google.gwt.user.client.Window$Location.getQueryString(Window.java:267) > at > com.google.gwt.user.client.Window$Location.ensureListParameterMap(Window.java:334) > at com.google.gwt.user.client.Window$Location.getParameter(Window.java:212) > at > com.google.gwt.logging.client.LogConfiguration$LogConfigurationImplRegular.setLevels(LogConfiguration.java:111) > at > com.google.gwt.logging.client.LogConfiguration$LogConfigurationImplRegular.configureClientSideLogging(LogConfiguration.java:72) > at > com.google.gwt.logging.client.LogConfiguration.onModuleLoad(LogConfiguration.java:162) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:423) > at > com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) > at > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:530) > at > com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368) > at java.lang.Thread.run(Unknown Source) > [ERROR] Deferred binding failed for > 'com.google.gwt.user.client.impl.WindowImpl'; expect subsequent failures > [ERROR] Unable to load module entry point class > com.google.gwt.logging.client.LogConfiguration (see associated exception > for details) > java.lang.RuntimeException: Deferred binding failed for > 'com.google.gwt.user.client.impl.WindowImpl' (did you forget to inherit a > required module?) > at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53) > at com.google.gwt.core.shared.GWT.createImpl(GWT.java:83) > at com.google.gwt.core.client.GWT.create(GWT.java:86) > at com.google.gwt.user.client.Window.<clinit>(Window.java:514) > at > com.google.gwt.user.client.Window$Location.getQueryString(Window.java:267) > at > com.google.gwt.user.client.Window$Location.ensureListParameterMap(Window.java:334) > at com.google.gwt.user.client.Window$Location.getParameter(Window.java:212) > at > com.google.gwt.logging.client.LogConfiguration$LogConfigurationImplRegular.setLevels(LogConfiguration.java:111) > at > com.google.gwt.logging.client.LogConfiguration$LogConfigurationImplRegular.configureClientSideLogging(LogConfiguration.java:72) > at > com.google.gwt.logging.client.LogConfiguration.onModuleLoad(LogConfiguration.java:162) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:423) > at > com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) > at > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:530) > at > com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368) > at java.lang.Thread.run(Unknown Source) > Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see > previous log entries) > at > com.google.gwt.dev.cfg.ConditionWhenPropertyIs.doEval(ConditionWhenPropertyIs.java:122) > at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:53) > at com.google.gwt.dev.cfg.ConditionAny.doEval(ConditionAny.java:52) > at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:53) > at com.google.gwt.dev.cfg.ConditionAll.doEval(ConditionAll.java:53) > at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:53) > at com.google.gwt.dev.cfg.Rule.isApplicable(Rule.java:52) > at > com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.getRebindRule(StandardRebindOracle.java:116) > at > com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:66) > at > com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:262) > at > com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:144) > at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:597) > at > com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:483) > at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) > ... 18 more > [ERROR] Failed to load module > 'com.ainosoft.explorations.gwt.Gwt_2_8_1_explorationsJUnit.JUnit' from user > agent 'HtmlUnit-Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 > Firefox/38.0' at 127.0.0.1:60525 > com.google.gwt.core.ext.UnableToCompleteException: (see previous log > entries) > at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:461) > at > com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) > at > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:530) > at > com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368) > at java.lang.Thread.run(Unknown Source) > Aug 18, 2017 4:41:29 PM com.gargoylesoftware.htmlunit.WebConsole info > INFO: /launch error: Failed to load module > com.ainosoft.explorations.gwt.Gwt_2_8_1_explorationsJUnit.JUnit: undefined > > > > > On Wednesday, August 16, 2017 at 1:40:59 PM UTC+5:30, [email protected] > wrote: >> >> Hi guys, >> >> Somehow I am unable to understand our lack of interest in supporting Java >> based debugging for GWT test cases. (devmode is deprecated ) >> >> I followed the workaround suggested in the release notes and got to a >> point where it does try to execute the test without compiling to >> JavaScript. But got an exception. The detailed exception message is >> attached as a text file. >> >> >> >> Aug 16, 2017 1:13:38 PM com.gargoylesoftware.htmlunit.WebConsole info >> INFO: /launch error: Failed to load module com.ainosoft.deba. >> Gwt_2_8_1_learningJUnit.JUnit: undefined >> >> I passed the -Dgwt.args="devMode" to the JUnit test configuration. >> >> Can someone help me out ? >> >> thanks a lot, >> Debasish >> > -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
