GWT 2.7 exception when launching in dev mode from ec - exception

I am trying to run my GWT 2.7 application in dev mode from Eclipse (Kepler). When I launch it I get the following exception. Can someone tell me what I can do to fix this?
Starting Jetty on port 8888
[WARN] FAILED org.eclipse.jetty.security.ConstraintSecurityHandler#6c86fa3c: java.lang.ArrayStoreException: org.eclipse.jetty.security.SecurityHandler$1
java.lang.ArrayStoreException: org.eclipse.jetty.security.SecurityHandler$1
at org.eclipse.jetty.util.LazyList.addToArray(LazyList.java:455)
at org.eclipse.jetty.server.handler.ContextHandler.addEventListener(ContextHandler.java:599)
at org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:300)
at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:453)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:115)
at org.eclipse.jetty.server.session.SessionHandler.doStart(SessionHandler.java:124)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:115)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:763)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:541)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:162)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:282)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:740)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:632)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1054)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
at com.google.gwt.dev.DevMode.main(DevMode.java:413)

Are you running it with the -nosuperDevMode flag?
GWT stopped supporting regular Dev Mode. The Browser's themselves (Chrome for sure) no longer support the API that enabled Dev Mode. You probably want to look at Super Dev Mode, which is the currently supported method. You can debug in the browser with it

Related

react-native Chrome debug from device is broken? ( Runtime not ready for debugging )

Can anyone suggest things to check for that break Chrome debug on a device? Chrome debug works fine debugging an iOS simulator.
Chrome debug of iOS devices had been working fine for over a month until it stopped working a week or so ago.
I have spent days trying to get Chrome debug working again. I even started all over, with a new "AwesomeProject". No luck.
Does Chrome Debug URL stay same for debugging both device and simulators?
http://localhost:8081/debugger-ui
Using OS X 10.11.3, Xcode 7.3, iOS 9.3, and react-native 0.22
MacBook WiFi: 173.17.29.213
iPad WiFi: 173.17.29.77
I can ping iPad from MacBook.
I can run AwesomeProject on iPad and enable live reload.
I can debug fine in a simulator when jsCodeLocation set to localhost
I killed Chrome and restarted it, opened http://localhost:8081/debugger-ui
React Packager is running
I can set Xcode breakpoints
File: AppDelegate.m
jsCodeLocation = [NSURL URLWithString:#"http://173.17.29.213:8081/index.ios.bundle?platform=ios&dev=true"];
Xcode debug console displays:
2016-03-31 08:02:12.286 [error][tid:com.facebook.react.RCTBridgeQueue][RCTWebSocketExecutor.m:85] Runtime is not ready for debugging.
- Make sure Packager server is running.
- Make sure Chrome is running and not paused on a breakpoint or exception and try reloading again.
2016-03-31 08:02:12.319 [error][tid:main][RCTWebSocketExecutor.m:132] WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
2016-03-31 08:02:12.513 [fatal][tid:main] Runtime is not ready for debugging. Make sure Packager server is running.
2016-03-31 08:02:36.032 [error][tid:main][RCTWebSocketExecutor.m:132] WebSocket connection failed with error Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
2016-03-31 08:02:36.032 [error][tid:com.facebook.react.RCTBridgeQueue][RCTWebSocketExecutor.m:85] Runtime is not ready for debugging.
- Make sure Packager server is running.
- Make sure Chrome is running and not paused on a breakpoint or exception and try reloading again.
2016-03-31 08:02:36.707 [fatal][tid:main] Runtime is not ready for debugging. Make sure Packager server is running.
File: package.json
{
"name": "AwesomeProject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"react": "^0.14.8",
"react-native": "^0.22.2"
}
}
You're close, one more step and works for me at the moment after facing exact situation:
"To debug on a real device:
On iOS - open the file RCTWebSocketExecutor.m and change localhost to the IP address of your computer. Shake the device to open the development menu with the option to start debugging. [1]"
[1] https://facebook.github.io/react-native/docs/debugging.html

Automate SSO authentication in Chrome

I'm writing a Selenium script in Java. I've a website say originalwebsite.com, and when enter this and hit a go, it will go to authenticationwebsite.com, authenticate the credentials and auto redirect to originalwebsite.com.
I'm sorry that I can't reveal the origianlwebsite and authenticationwebsite URLs sine these are our Organisation's.
When I enter it directly in any Chrome browser, this is done automatically, since the authenticationwebsite credentials are stored.
But when i do it through Selenium, instead of redirecting to originalwebsite.com, the process stops at authenticationwebsite.com and asks for credentials. Going through some forums in SO, I've tried the below code.
In Chrome
System.setProperty("webdriver.chrome.driver", "D:\\chromedriver.exe");
String user = System.getProperty("user.name");
// System.out.println(user);
ChromeOptions options = new ChromeOptions();
options.addArguments(
"user-data-dir=C:/Users/" + user.toUpperCase() + "/AppData/Local/Google/Chrome/User Data/Default");
options.addArguments("--start-maximized");
WebDriver cd = new ChromeDriver(options);
cd.get("https://originalwebsite.com");
When I run this i get the below Exception.
Starting ChromeDriver 2.19.346078 (6f1f0cde889532d48ce8242342d0b84f94b114a1) on port 9702
Only local connections are allowed.
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: crashed
(Driver info: chromedriver=2.19.346078 (6f1f0cde889532d48ce8242342d0b84f94b114a1),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 61.39 seconds
Build info: version: '2.48.1', revision: 'd80083d', time: '2015-10-08 21:07:25'
System info: host: 'U0138039-TPD-A', ip: '10.112.78.15', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_67'
Driver info: org.openqa.selenium.chrome.ChromeDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:247)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:148)
at EaselTest.main(EaselTest.java:21)
But in Firefox, this is working fine. And the code that i've used is as below.
ProfilesIni profile = new ProfilesIni();
FirefoxProfile ffprofile = profile.getProfile("default");
WebDriver cd = new FirefoxDriver(ffprofile);
cd.get("https://originalwebsite.com");
Please let me know how can i do it in Chrome, since most of the users here use chrome as their default browser.
Thanks
Seems like selenium is failing to pick up chrome browser where it is installed.
Check this answer : ChromeWebDriver - unknown error: Chrome failed to start: crashed

Karma cannot connect to Chrome in Windows 7

karma start Launches Chrome with correct URL but Chrome just sits there and spins. Also, no other url will work in that window that Karma launched.
Same behavior with Canary
Similar issue with FireFox
Opera and IE work!
if I copy/paste the URL into a functioning Chrome browser, it CONNECTS but after the original test window times out the server shuts down
For some reason I cannot launch Chrome with the user-data flag: --user-data-dir=C:\tmp\karma-7572069 -- it's the same behavior... the browser just spins and no other url works in that window
deleted all user profiles in Chrome & Firefox and re-installed them both... no go
ANY SUGGESTIONS?
After googling and pouring over umpteen similar SO issues I thought for sure it had to do with a corrupt user profile... but after wiping the Chrome user folder and re-installing etc, what else could I try?
Karma: 0.12.28
Chrome: 39.0.2171.95 m
Windows 7
debug log:
DEBUG [config]: Loading config d:\Code\test2\karma.conf.js
DEBUG [plugin]: Loading karma-* from d:\Code\test2\node_modules
DEBUG [plugin]: Loading plugin d:\Code\test2\node_modules/karma-chrome-launcher.
DEBUG [plugin]: Loading plugin d:\Code\test2\node_modules/karma-firefox-launcher.
DEBUG [plugin]: Loading plugin d:\Code\test2\node_modules/karma-ie-launcher.
DEBUG [plugin]: Loading plugin d:\Code\test2\node_modules/karma-jasmine.
DEBUG [plugin]: Loading plugin d:\Code\test2\node_modules/karma-opera-launcher.
INFO [karma]: Karma v0.12.28 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
DEBUG [temp-dir]: Creating temp dir at C:\tmp\karma-7572069
DEBUG [launcher]: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --user-data-dir=C:\tmp\karma-7572069 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate http://localhost:9876/?id=7572069
DEBUG [watcher]: Resolved files:
d:/Code/test2/node_modules/jasmine-core/lib/jasmine-core/jasmine.js
d:/Code/test2/node_modules/karma-jasmine/lib/boot.js
d:/Code/test2/node_modules/karma-jasmine/lib/adapter.js
WARN [launcher]: Chrome have not captured in 60000 ms, killing.
DEBUG [launcher]: Process Chrome exited with code 0
DEBUG [temp-dir]: Cleaning temp dir C:\tmp\karma-7572069
INFO [launcher]: Trying to start Chrome again (1/2).
DEBUG [launcher]: Restarting Chrome
DEBUG [temp-dir]: Creating temp dir at C:\tmp\karma-7572069
DEBUG [launcher]: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --user-data-dir=C:\tmp\karma-7572069 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate http://localhost:9876/?id=7572069
WARN [launcher]: Chrome have not captured in 60000 ms, killing.
DEBUG [launcher]: Process Chrome exited with code 0
DEBUG [temp-dir]: Cleaning temp dir C:\tmp\karma-7572069
INFO [launcher]: Trying to start Chrome again (2/2).
DEBUG [launcher]: Restarting Chrome
DEBUG [temp-dir]: Creating temp dir at C:\tmp\karma-7572069
DEBUG [launcher]: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --user-data-dir=C:\tmp\karma-7572069 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate http://localhost:9876/?id=7572069
WARN [launcher]: Chrome have not captured in 60000 ms, killing.
DEBUG [launcher]: Process Chrome exited with code 0
DEBUG [temp-dir]: Cleaning temp dir C:\tmp\karma-7572069
ERROR [launcher]: Chrome failed 2 times (timeout). Giving up.
DEBUG [launcher]: Disconnecting all browsers
Figured it out. My console was being run as a non-admin. Booo. Now everything works.

IllegalStateException: in SimpleFrameBuilder when running grails app in tcserver w/ insight

I am trying to profile a grails application using insight.
Grails - 2.4.0 or 2.4.1 (tried 2.4.1 to see if it fixed my issue)
GGTS - 3.5.0 w/ eclipse 4.3.2
tcserver - VMWare vFabric tc Server Developer Edition (Runtime) v2.9
(from within eclipse)
PermGenSpace = 1024m
I have tried the following;
Drag the grails application from the project explorer and drop it on the tc server in the Servers pane
Build the grails application with grails dev war and placed the war file into the webapps directory directly via command line
Run As -> Run on Server
I'm seeing the same result, which is the stacktrace below. Anybody have an thoughts as to what might be wrong or how to make this work? If more information is needed, please let me and I'll try to provide it.
Thanks much!
Thantous
EDIT:
Got the server to startup by adjusting the memory of the tcserver. The real issues stopping the server from starting was the heap memory error at the very bottom of the stacktrace. I am still seeing the error for SimepleFrameBuilder, but at least the server starts up now :).
Here is the relevant part of the server config for memory settings;
-Xmx2048m -Xss1024k -XX:MaxPermSize=2048m
-- StackTrace --
2014-06-25 09:13:40,995 [localhost-startStop-1] ERROR errorhandling.CollectionErrors - Disabling aspect com.springsource.insight.plugin.springcore.ClassPathScanOperationCollectionAspect
- IllegalStateException: current frame builder doesn't support frame discarding class com.springsource.insight.intercept.trace.SimpleFrameBuilder
2014-06-25 09:13:41,010 [localhost-startStop-1] ERROR errorhandling.AdviceErrorHandlingAspect - Error swallowed in advice adviceexecution(void com.springsource.insight.collection.AbstractOperationCollectionAspect.afterReturning(Object, JoinPoint.StaticPart))
java.lang.IllegalStateException: current frame builder doesn't support frame discarding class com.springsource.insight.intercept.trace.SimpleFrameBuilder
at com.springsource.insight.intercept.trace.collapse.CollapsingFrameBuilder.getFirstCollapsedFrame(CollapsingFrameBuilder.java:183)
at com.springsource.insight.intercept.trace.collapse.CollapsingFrameBuilder.collapseIfRequired(CollapsingFrameBuilder.java:150)
at com.springsource.insight.intercept.trace.collapse.CollapsingFrameBuilder.exit(CollapsingFrameBuilder.java:72)
at com.springsource.insight.intercept.trace.ThreadLocalFrameBuilder.exit(ThreadLocalFrameBuilder.java:93)
at com.springsource.insight.collection.overflow.CountOperationsTraceOverflowStrategy.doExit(CountOperationsTraceOverflowStrategy.java:196)
at com.springsource.insight.collection.overflow.CountOperationsTraceOverflowStrategy.exit(CountOperationsTraceOverflowStrategy.java:91)
at com.springsource.insight.collection.DefaultOperationCollector.exit(DefaultOperationCollector.java:161)
at com.springsource.insight.collection.DefaultOperationCollector._exitNormal(DefaultOperationCollector.java:74)
at com.springsource.insight.collection.DefaultOperationCollector.exitNormal(DefaultOperationCollector.java:65)
at com.springsource.insight.collection.AbstractOperationCollectionAspect.ajc$afterReturning$com_springsource_insight_collection_AbstractOperationCollectionAspect$2$34342d20_aroundBody2(AbstractOperationCollectionAspect.aj:105)
at com.springsource.insight.collection.AbstractOperationCollectionAspect$AjcClosure3.run(AbstractOperationCollectionAspect.aj:1)
at com.springsource.insight.collection.errorhandling.AdviceErrorHandlingAspect.ajc$around$com_springsource_insight_collection_errorhandling_AdviceErrorHandlingAspect$1$e76a6b03proceed(AdviceErrorHandlingAspect.aj:41)
at com.springsource.insight.collection.errorhandling.AdviceErrorHandlingAspect.ajc$around$com_springsource_insight_collection_errorhandling_AdviceErrorHandlingAspect$1$e76a6b03(AdviceErrorHandlingAspect.aj:43)
at com.springsource.insight.collection.AbstractOperationCollectionAspect.ajc$afterReturning$com_springsource_insight_collection_AbstractOperationCollectionAspect$2$34342d20(AbstractOperationCollectionAspect.aj:1)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[error 2014/06/25 09:14:45.735 PDT <GemfireHeapPoller> tid=0x23] Member: gamera(5640:loner):0:eb9aced3 above critical heap threshold

Selenium Grid 2 for RemoteWebDriver gives an exception for Chrome browser

Please see my grid batch file. (I added both chrome binary and chrome driver location in my path)
My code works perfectly if I use firefox but for chrome and IE it throws an Exception given below. I am sure I am missing a very trivial thing but I am not able to figure it out.
Batch file
set HERE=C:\Users\Administrator\Downloads
set JAVA_HOME=%HERE%\jdk-7u13-windows-x64
set PATH=%JAVA_HOME%\jre\bin;%JAVA_HOME%\bin;%CHROME_DRIVER_LOC%;%IE_DRIVER_LOC%;%CHROME_BINARY_LOC%;%PATH%;
set SELENIUM_VERSION=2.29.0
set CHROME_VERSION=chromedriver_win_26.0.1383.0
set HUB_URL=http://localhost:4444/grid/register
set CHROME_DRIVER_LOC=C:\Users\Administrator\Downloads\chromedriver_win_26.0.1383.0\chromedriver.exe
set IE_DRIVER_LOC=C:\Users\Adminstrator\Downloads\IEDriverServer_x64_2.31.0\IEDriverServer.exe
set CHROME_BINARY_LOC=C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe
start java -jar selenium-server-standalone-2.29.0.jar -role hub
start java -jar selenium-server-standalone-2.29.0.jar -role node
-Dwebdriver.chrome.driver=%CHROME_DRIVER_LOC% -hub %HUB_URL% -port 5556
My sample code:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setBrowserName(DesiredCapabilities.chrome().getBrowserName());
URL url = new URL(“<http://localhost:4444/wd/hub>”);
WebDriver driver = new RemoteWebDriver(url, capabilities);
// And now use this to visit Google
driver.get(“web page”);
Exception I am getting :
Exception in thread “main” org.openqa.selenium.WebDriverException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://code.google.com/p/chromedriver/downloads/list
Command duration or timeout: 608 milliseconds
Build info: version: ’2.29.0′, revision: ’58258c3′, time: ’2013-01-17 22:47:00′
System info: os.name: ‘Windows Server 2008 R2′, os.arch: ‘amd64′, os.version: ’6.1′, java.version: ’1.7.0_13′
Driver info: org.openqa.selenium.remote.RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:533)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:111)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:129)
at test.Test.main(Test.java:32)
Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see ….
Please help! I couldn’t understand what I am doing wrong. I have been struggling with this from quite some time now. Any help will be very much appreciated.
Thanks
Sushmita
I think, the below line is the culprit
start java -jar selenium-server-standalone-2.29.0.jar -role node
-Dwebdriver.chrome.driver=%CHROME_DRIVER_LOC% -hub %HUB_URL% -port 5556
Use below line and check if it is working.
start java -Dwebdriver.chrome.driver=%CHROME_DRIVER_LOC% -jar selenium-server-standalone-2.29.0.jar -role webdriver -hub %HUB_URL% -port 5556
With Chrome and IE, you will need to define a driver executable path, you can fine the files here:
http://code.google.com/p/chromedriver/downloads/list
and http://code.google.com/p/selenium/downloads/list
Then you will need something like this before you create a new ChromeDriver:
String chromeDriverPath = "C:\ChromeDriver.exe";
System.setProperty("webdriver.chrome.driver", chromeDriverPath);
A very simple workaround is to place the IEDriverServer and the chromedriver executables in the same folder as your selenium jar file