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

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

Related

finding Element causing chrome driver instance to crash

First the Environment:
Node JS 16.15.0
Web Driver io v7 (wdio)
wdio/cucumber framework
end to end testing of a website
-obviously using cucumber and feature files
using a test configuration file similar to wdio's
using wdio-chromedriver-service v7.2.6 and npm chromedriver package version ^107 to produce a browser to hit
my browser : chrome v107.0.5304.62
The Question:
an element cannot be found by webDriver as I expect, but the command causes the instance to crash
I am searching for an element that no longer appears on the page (it is a spinner element that shows the page is loading)
I call
if(await this.spinner.isDisplayed())
and then the test run hangs, the debugger tells me the command
INFO webdriver: COMMAND findElement("css selector", "i.fa-spinner")
is running and then nothing else, finally the renderer times out
WARN chromedriver: [SEVERE]: Timed out receiving message from renderer: 600.000
DEBUG webdriver: request failed due to response error: timeout
and the chrome instance crashes shortly later
I am unsure why this behavior is happening, is something wrong with my wdio configuration? or with my chrome driver?
What I have tried
I understand that
browser.setTimeout exists but
I am sure it is not set in my config anywhere.
I have done a global search (using vscode for all development) for browser.setTimeout (no results).
I have manually set browser.setTimeout({ 'implicit': 0 }) (no success).
I have also tried directly hitting a chrome driver instance by manually downloading a chrome driver exe that matched my browser version v107.0.5304.62 and removing the 'services: ['chromedriver']'
from my test config file
when this happens something very interesting occurs, I can keep running after searching for the element that broke the run before, but we dont get very far and the command still causes issues. Chrome driver is throwing errors like
error: 'no such element',
[0-0] message: 'no such element: Unable to locate element: {"method":"css selector","selector":"i.fa-spinner"}\n' +
[0-0] ' (Session info: chrome=107.0.5304.87)'
The browser closes shortly afterwards without progressing through the rest of the tests.
I find it interesting that the version that chrome driver says it is running is 107.0.5304.87 since the version of chromedriver I downloaded clearly says it is v107.0.5304.62 and my chrome version clearly states it is also v107.0.5304.62 .
though theoretically using v107.0.5304.87 shouldnt be an issue according to this
since the 107.0.5304 part matches across the board
I could use some assistance.
We had the same issue this days, seems there is a bug introduced in Chrome 106; try to change config or downgrade Chrome on the machine to use Chrome 105 as with this version is working.

Coded UI doesn't launch testing in Chrome

I have a hand written coded ui test with about 120 test cases. It is working well with IE but I want to run in chrome (or in Edge). I have installed the Cross Browser Selenium components with the chromedriver. After the installation I have changed my code with BrowserWindow.CurrentBrowser = "chrome"; line.
Actually it launches the chrome (68.0.3440.75) but then it fails with this exception :
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: A
exception with a null response was thrown sending an HTTP request to
the remote WebDriver server for URL
http://localhost:4334/session/74ce571a635c376d0982b7f59dc31f3b/title.
The status of the exception was ConnectFailure, and the message was:
Unable to connect to the remote server.
The chromedriver is 2.25 which I know it's not compatible with my chrome, but If I upgrade the chromedriver with the latest version, then it launches and immediately closes itself.
Any suggestions?

Endless Chrome console warnings

I'm getting the same warnings infinitely in the Chrome console (currently at 73k and counting):
ComChannels.ChromeComChannel.Content [WARN ] - _onContentPortDisconnected: Never connected -> Error in connection.
content.Dispatcher [WARN ] - onComChannelConnectionFailed: Called: timeout
My website runs fine but I can't tell myself this isn't a problem with my code. Any ideas what these Warnings refer to?
EDIT: Built my website with GGTS, running Grails 2.4.3 and my JDK is 1.7. Running Twitter Bootstrap and JQuery

LIBGDX ios simulator crash. LibGDX / Robovm compiles for 64bit instead of 32bit. What should I do?

My libgdx app starts up on ios simulator and shows ios intro libgdx pic, then crashes.
I get:
[ERROR] Session could not be started: Error Domain=NSPOSIXErrorDomain Code=3 "Unable to run app in Simulator" UserInfo=0x7f853960ff60 {NSUnderlyingError=0x7f8539464ff0 "Failed to lookup the process ID of se.myapp.IOSLauncher after successful launch. Perhaps it crashed after launch.", NSLocalizedFailureReason=An error was encountered while running (Domain = NSPOSIXErrorDomain, Code = 3), NSLocalizedDescription=Unable to run app in Simulator}
Seems to be related to trying to run 64bit on iPhone 4s, where it is not supported. Does anyone know how to turn off 64bit for robovm in libgdx?
If I change the ios-sim command:
/Users/macuser/Documents/workspace/.metadata/.plugins/org.robovm.eclipse.ui/robovm-1.4.0/bin/ios-sim launch /Users/macuser/Documents/workspace/.metadata/.plugins/org.robovm.eclipse.ui/build/myapp-ios/myapp-ios/ios/x86_64/IOSLauncher.app --timeout 90 --unbuffered --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-4s, 8.0" --stdout /var/folders/ml/zdhkbw3x0g9550pq9mgfrcsw0000gn/T/robovm-stdout-6250612031367207111.fifo --stderr /var/folders/ml/zdhkbw3x0g9550pq9mgfrcsw0000gn/T/robovm-stderr-5592986297298678222.fifo --setenv ROBOVM_LAUNCH_MODE=release --args -rvm:log=warn
To:
/Users/macuser/Documents/workspace/.metadata/.plugins/org.robovm.eclipse.ui/robovm-1.4.0/bin/ios-sim launch /Users/macuser/Documents/workspace/.metadata/.plugins/org.robovm.eclipse.ui/build/myapp-ios/myapp-ios/ios/x86/IOSLauncher.app --timeout 90 --unbuffered --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-4s, 8.0" --stdout /var/folders/ml/zdhkbw3x0g9550pq9mgfrcsw0000gn/T/robovm-stdout-6250612031367207111.fifo --stderr /var/folders/ml/zdhkbw3x0g9550pq9mgfrcsw0000gn/T/robovm-stderr-5592986297298678222.fifo --setenv ROBOVM_LAUNCH_MODE=release --args -rvm:log=warn
It works with the old robovm. But for the new version it seems those directories aren't even built at all, so it fails.
Where should I specify the architecture? There is:
<arch>thumbv7</arch>
in robovm.xml but it doesn't seem to do anything?
Has this anything to do with the eclipse integration plugin (I am running from eclipse)?
OK I found out (after about 12 hours of digging)!
I looked in the wrong place all the time. The solution is (in eclipse) to go to Run Configurations / iOS Simulator App / Choose a device and select 32-bit (x86).

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:

Code use:
enter code here
ProfilesIni profile = new ProfilesIni();
FirefoxProfile ffprofile = profile.getProfile("Other");
WebDriver driver = new FirefoxDriver(ffprofile);
driver.get("http://google.com");
:Run the source the Firefox page open but google.com not opening error
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
reg-app-global","addons":{"fiddlerhook#fiddler2.com":{"descriptor":"C:\\Program Files (x86)\\Fiddler2\\FiddlerHook","mtime":1409222185915,"rdfTime":1406724252000}}},{"name":"app-global","addons":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"descriptor":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","mtime":1411627483703,"rdfTime":1411627483531}}},{"name":"app-profile","addons":{"fxdriver#googlecode.com":{"descriptor":"C:\\Users\\RT-13\\AppData\\Local\\Temp\\anonymous3444483664614526613webdriver-profile\\extensions\\fxdriver#googlecode.com","mtime":1411630550698,"rdfTime":1411630550495}}}]
1411630550942 addons.xpi-utils DEBUG Opening XPI database C:\Users\RT-13\AppData\Local\Temp\anonymous3444483664614526613enter code herewebdriver-profile\extensions.json
1411630550943 addons.xpi DEBUG New add-on fxdriver#googlecode.com installed in app-profile
*** Blocklist::_loadBlocklistFromFile: block`enter code here`list is disabled
1411630551091 addons.xpi-utils DEBUG Make addon app-profile:fxdriver#googlecode.com visible
1411630551094 DeferredSave.extensions.json DEBUG Save changes
1411630551095 DeferredSave.extensions.json DEBUG Save changes
1411630551095 addons.xpi DEBUG New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
1411630551098 addons.xpi-utils DEBUG Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible
1411630551098 DeferredSave.extensions.json DEBUG Save changes
1411630551098 DeferredSave.extensions.json DEBUG Save changes
1411630551098 addons.xpi DEBUG New add-on fiddlerhook#fiddler2.com installed in winreg-app-global
Please downgrade the Firefox version to 31 and add the latest selenium standalone server 2.43 library into the build path. This is a common issue that every one face at least once in a week:)
Solution -
1) Upgrade your Selenium Server i.e. selenium jar "selenium-server-standalone-2.xx.x.JAR" TO "selenium-server-standalone-2.45.0.JAR"
2) Upgrade your Selenium Client Driver i.e. selenium libs folder "selenium-java-2.xx.x" TO "selenium-java-2.45.0"
3) Check and Install compatible version of Firefox
This will RESOLVE your problem.. Cheers !!
Refer - Download updated selenium libs & jar i.e. Version 2.45.0