IntelliJ IDEA 13.1 debug throws Unable to open debugger port error for Play 2.3.x on Windows 7 - playframework-2.3

We are using Play 2.3.x for our web application. I wanted to debug the server side code, so performed the following
steps on Windows 7 machine
1) Set the JAVA_OPTIONS to "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999"
2) On IntelliJ IDE : Run > Edit Configurations > Created a configuration with name "myserverdebug" with values ( transport : socket , debugger mode : attach , port : 9999 , host : localhost , modules class path : our project) and apply
3) Run > Debug > Select "myserverdebug"
Then the error thrown is :
Error running ServerDebugTests: Unable to open debugger port : java.net.ConnectException "Connection refused: connect**
Can some one tell me how to resolve this connection port error on Windows 7 ( not Linux )?

debugging changed in play 2.3. Just start activator with -jvm-debug 9999.
Afterwards your debug configuration should work.

Related

Get frequent chrome driver error: driver config / start failed: chrome server returned empty list from http://localhost:(port) in karate standalone

I used to get frequent chrome driver error in karate UI tests. I have been using karate tests in VS code for the past 5 months. Now, I used to get driver config / start failed: chrome server returned empty list from http://localhost:[port] frequently. Sometimes, I need to run 20 times to run the same test to succeed. All other runs throws either "driver config / start failed: chrome server returned empty list" / "ERROR com.intuit.karate - evaluation of 'karate-config.js' failed: javascript function call failed"
I have installed chrome multiple times but I get the same error. Also I have re-imaged my laptop due this issue and through something went wrong. Even now I used to get the above errors often.
I have installed Chrome 64 bit in windows laptop, it get installed in "C:\Program Files\Google\Chrome\Application\chrome.exe" but karate standalone will always check the Chrome path "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" in runtime which doesn't exists.
Note: I have set the chrome.exe installed path in my system environment PATH but karate not considering the path variable. Please advise me on this.
So I have modified the driver config as given below:-
* configure driver = { type: 'chrome', headless: true }
[To]
* configure driver = { type: 'chrome', executable: 'C:/Program Files/Google/Chrome/Application/chrome.exe', headless: true }
Karate version: 0.9.6.RC3
OS : Windows 10 Home
JDK Version
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
Chrome Driver config
configure driver = { type: 'chrome', executable: 'C:/Program Files/Google/Chrome/Application/chrome.exe', headless: true }
Chrome Driver Errors
testui.feature:8 - driver config / start failed: chrome server returned empty list from http://localhost:54311, options: {type=chrome, executable=C:/Program Files/Google/Chrome/Application/chrome.exe, headless=true, target=null}
ERROR com.intuit.karate - evaluation of 'karate-config.js' failed: javascript function call failed:
[1.1:33] test_page.feature:9 - driver config / start failed: chrome server returned empty list from http://localhost:55676, options: {type=chrome, executable=C:/Program Files/Google/Chrome/Application/chrome.exe, headless=true, target=null}
ERROR com.intuit.karate - evaluation of 'karate-config.js' failed: javascript function call failed:
[1.1:33] test_page.feature:11 - evaluation (js) failed: input('#username', 'admin'), failed to get reply for: [id: 23, method: Input.dispatchKeyEvent, params: {modifier=0, type=keyDown, text=k}]
Please guide me how to resolve this issue.
Thanks,
Chandra
I was same error. Actually its finding chrome.exe in different location where actually its not located.
In default it's looking at "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
but actual path was 'C:/Users/ues/AppData/Local/Google/Chrome/Application/chrome.exe'
So check your chrome.exe path.
Hope it's helpful.
I have solved my problem by defining in the config file as;
"karate.configure('driver', { type: 'chrome', port: 9222,
executable: 'C://Program Files//Google//Chrome//Application//chrome.exe' });"
maybe assigning a port help me to solve the issue but one thing to consider here is that u need to use forward slashes in the executable command.
No one else has reported this, so you'll need to figure this out maybe with the help of someone who can troubleshoot your machine. Maybe there are some permission restrictions. Maybe your old processes are still running, so make sure you go to your task manager and kill them etc, this is quite common on Windows.
And please upgrade to 1.0 before trying anything else, because that may help: https://github.com/intuit/karate/wiki/1.0-upgrade-guide
Otherwise we will need your help to maybe debug and suggest changes to the framework. Ideally you should contribute code to Karate, and remember - it is an open source project. If you are able to replicate your problems, follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue - but I'm not sure that is possible with the kinds of issues you are describing.
If none of the above options work, you may need to consider switching to some other framework.
EDIT: most teams run on CI + Docker which is much more stable: https://stackoverflow.com/a/62325328/143475

not able to debug play framework 2.6.x application in Scala IDE

I am new to Play, I have installed SBT 1.0.2, Scala IDE 4.6.1, from play documentation downloaded play-scala-starter-example project, i want to debug the project, i did following things.
set environment variables SBT_OPTS to -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999
tried to run the project with "sbt -jvm-debug 9999 run" but it gives "Not a valid command: jvm-debug"
ran it with "sbt run" and in Scala IDE, i created following configuration,
and added breakpoints in HomeController of sample project, but when i refresh the page running on port 9000 doesnt stop, and when i use "Scala Debugger (Socket Attach) it gives error "Failed to connect to remote VM. Connection timed out." Scala IDE Configuration
I was having trouble setting the enviroment on windows 10 play 2.6, the way I found for play to start listen to the debug port was adding in projectfolder\sbt-dist\conf\sbtconfig , after #Set the extra SBT options:
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999
though it will open socket every time you run sbt
1) Add sbt eclipse plugin in you project.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.2")
2) Set the environment as for debugging follow
set SBT_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5555
sbt run
3) Attache debugger to remote application in eclipse as
i) In Eclipse, right-click your project, then choose Debug As -> Debug Configurations...
ii) Right-click Remote Java Application, then click New.
The host should already be set to localhost. Set the port to 5555 (the default port used by the play debug run command).
iii)Click Apply to save, then Debug to connect to your running Play instance

Cannot launch Chrome using Appium

Cannot open Chrome using Appium (1.4.16.1) on my Android real device (6.0.1)
I'm getting the following error:
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: A new session could not be created.
(Original error: An unknown server-side error occurred while processing the command.
(Original error: unknown error: Device abcd is not online (Driver info: chromedriver=2.18.343845
(73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64))) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Below are my Capabilities:
DesiredCapabilities capabilities = DesiredCapabilities.android();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability("deviceName", "abcd");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
capabilities.setCapability(CapabilityType.VERSION, "6.0.1");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("app", "chrome");
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
Any suggestions ?
You should set a correct deviceName capability. abcd seems like not correct. In the command line execute adb devices and it will show you device's name.
Remove excess line capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
BROWSER_NAME capability set to Chrome
Strongly recommended upgrade to Appium 1.6
Try these,
Kill the node.exe process from Windows Task Manager and Restart your Appium Server.
2.Open SDK Manager and Update latest Packages based on your Device Andriod version.
also,
Reconfigure all the .jar file from Build Path -> Config Build Path -> Library - Remove and Add again all the .jars(if it is Maven then edit/save dependencies in POM.xml again). Hope it works!

ejabberd stops when I am adding mod_http_offline to ejabberd.cfg

I am using ejabberd 2.1.10 for implementing the mod_http_offline mod for IOS push notification. I tried to do this using two solutions like
http://jasonrowe.com/2011/12/30/ejabberd-offline-messages/
&
https://github.com/adamvduke/mod_interact
But both the time when I am adding Modules to the ejabberd configuration file It stops the server and return the below error in the log
ERROR REPORT==== 2014-01-28 15:09:13 ===
C(<0.41.0>:gen_mod:75) : Problem starting the module mod_http_offline for host "23.23.191.229"
options: []
error: function_clause

Getting error in ejabberd when add any module in ODBC mod

I have installed ejabberd to implement my chat application, I have also successfully installed Mysql module and using mysql database in place of mnesia(default of ejabberd).Everything is working fine,Now i am trying to some module for ODBC mod, like mod_muc to mod_muc_odbc, then i am getting error like,
=ERROR REPORT==== 2014-01-20 11:39:08 ===
C(<0.37.0>:gen_mod:75) : Problem starting the module mod_muc_odbc for host "localhost"
options: [{host,"conference.#HOST#"},
{access,muc},
{access_create,muc},
{access_persistent,muc},
{access_admin,muc_admin},
{max_users,500}]
error: undef
=ERROR REPORT==== 2014-01-20 11:39:08 ===
C(<0.37.0>:gen_mod:80) : ejabberd initialization was aborted because a module start failed.
How to fix it ? Another question related with ejabberd is that , Can i see the whole chat record in mysql database, if yes then how ?
I had a same problem. Just another module. This part of log:
{max_users,500}]
error: undef
means that you ejabbered was not compiled with that specific module support.
I am using gentoo linux so it was easy to me to add USE="mymodule" emerge -av ejabered and compile ejjabered with mymodule that was missing.
In your post I can not see what linux distro are you using? But you get a picture from my answer.