Should I worry about DDMS console log messages "Can't bind to local nnnn for debugger"? - eclipse

I'm new to Android programming (and Eclipse IDE and Android emulator). I've got Hello World and some of Notepad working, but I'm still constantly getting quite a few DDMS console log messages (shown below) about not being able to bind locals for debugger.
[2010-05-29 21:03:16 - ddms] Can't bind to local 8601 for debugger
[2010-05-29 21:05:26 - Device] Failed to delete temporary package: device (emulator-5556) request rejected: device not found
[2010-05-29 21:06:47 - ddms] Can't bind to local 8600 for debugger
[2010-05-29 21:07:05 - ddms] Can't bind to local 8601 for debugger
[2010-05-29 21:07:05 - ddms] Can't bind to local 8602 for debugger
And so on. Is this a problem? Can I get rid of these messages somehow?

In Eclipse, goto
1) Windows->Preference
2) Expand Android menu in the side of the Preference Window.
3) Now select DDMS from it.
4) Then Set the Base local debugger port to "8601" and enable "Use ADBHOST" checkbox and the ABDHOST value should be "127.0.0.1".
5) Click apply and ok.
6) Now you have to restart your ADB, for this you have to login as root user(Assuming linux user) and navigate to Platfrom tools folder of your Android SDK. Then execute,
./adb kill-server
./adb start-server
You will be able to see the message "Daemon started Successfully" . If not repeat step 6 once again until you see the success message.

You can get rid of the the messages by adding following to your hosts file:
127.0.0.1 localhost
ps. hosts file can be found from c:\windows\system32\drivers\etc\hosts
or if you are on linux /etc/hosts

In my situation the problem has been solved by a uninstalling all Java 7. The debugger is now working again!

Related

It is impossible to create a new session because 'createSession' which takes HttpClient,

org.openqa.selenium.WebDriverException: It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z'
I am getting this error randomly i want to know the route cause for this issue in IOS
There are multiple reason behind this issue. There are multiple ways to resolve this issues, depending upon, where these issues are coming from.
1)One issue which occur to me was DesireCapabilities.setCapability() key/value was not correct type. I have resolved this issue by just
DesiredCapabilities.setCapability("capabilities_variable","capabilities_value");
setCapability("appWaitDuration", "600000"); here 600000 was String instead of long or int
Check your setCapability type whether it String/int/long.
2) Check USB Connection is Laptop or Computer, if not connected than same issue.
3) ADB Server might be problem. So adb kill-server and adb start-server
4) Try to change USB and try it out.
5) Sometimes, it might be a proxy issue(Laptop/Desktop may have some proxy setup
in organization, since for Desktop/Laptops are connected with Mobile via TCP/IP Connection).
6) Sometimes, there might be permission required to access PORT (sudo ufw allow portnumber (UBUNTU SYSTEM))
7) Environment variable required Android_SDK_Home and Android Platform Tools path
**> Solution 1st**
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "xyz");
capabilities.setCapability("platformVersion", "6.0");
capabilities.setCapability("platformName", Platform.ANDROID);
capabilities.setCapability("appPackage", "com.hp.HPSupportAssistant");
capabilities.setCapability("appActivity", "com.hp.HPSupportAssistant.MainActivity");
capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 6000); capabilities.setCapability(AndroidMobileCapabilityType.AUTO_GRANT_PERMISSIONS,true);
//desiredCap.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.ANDROID_UIAUTOMATOR2);
**Here comment below line and then run it will work**
desiredCap.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.ANDROID_UIAUTOMATOR2);
**solution 2nd Or keep above line in desired capabilities but before that do
run 3 cmd on cmd promt**
adb shell pm list packages -f > D://t.txt
adb uninstall io.appium.uiautomator2.server
adb uninstall io.appium.uiautomator2.server
desiredCap.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.ANDROID_UIAUTOMATOR2);

Debugging a crashing language server

I apologize if I'm a bit low on details here, but the main issue is actually trying to find the problem with my code. I'm updating an older extension of my own that was based on the Language Server example (https://code.visualstudio.com/docs/extensions/example-language-server). I've run into an issue where when I run the client part of my code using F5, and the debug window fires, I get:
The CSSLint Language Client server crashed 5 times in the last 3 minutes. The server will not be restarted.
Ok... so... here's the thing. The problems view in my extension client code shows nothing. DevTools for that Code window shows nothing.
The problems view for my server code shows nothing. DevTools, ditto.
For the Extension Developer Host instance, DevTools does show this:
messageService.ts:126 The CSSLint Language Client server crashed 5 times in the last 3 minutes. The server will not be restarted.e.doShow # messageService.ts:126
But I can't dig into the details to find a bug. So the question is - assuming that my server code is failing, where exactly would the errors be available?
Here is what I usually do to track server crashes down (I assume your server is written in JavaScript / TypeScript).
Use the following server options:
let serverModule = "path to your server"
let debugOptions = { execArgv: ["--nolazy", "--debug=6009"] };
let serverOptions = {
run: { module: serverModule, transport: TransportKind.ipc },
debug: { module: serverModule, transport: TransportKind.ipc, options: debugOptions}
};
Key here is to use the TransportKind.ipc. Errors that happen in the server and printed to stdio will then show in the output channel associated to your server (the name of the output channel is the name passed to the LanguageClient)
If you want to debug the server startup / initialize sequence you can change the debugOptions to:
let debugOptions = { execArgv: ["--nolazy", "--debug-brk=6009"] };
If the extension is started in debug mode (e.g. for example launched from VS Code using F5) then the LanguageClient automatically starts the server in debug mode. If the extension is started normally (for example as a real extension in VS Code) then the server is started normally as well.
To make this all work you need a latest version of the LSP node npm module both for server can client (e.g. 2.6.x)

Failed to load launch URL with error: Error Domain=TVMLKitErrorDomain Code=3 "(null)"

Description:
I created a new TVML project and launched it. The first error was the App Transport Security, which I fixed via Info.plist :
App Transport Security Settings -> Allow Arbitrary Loads -> YES
Then I ran it again and I'm getting this error:
Failed to load launch URL with error: (null)
appController(_:didFailWithError:) invoked with error: Error
Domain=TVMLKitErrorDomain Code=3 "(null)"
The project seems to stop here (application func in AppDelegate.swift):
appControllerContext.launchOptions["BASEURL"] = AppDelegate.tvBaseURL
print(launchOptions) //returns nil
//error on following line
if let launchOptions = launchOptions as? [String: AnyObject] {
//does not enter here
for (kind, value) in launchOptions {
appControllerContext.launchOptions[kind] = value
}
}
What I've tried:
I attempted changing the tvBaseURL from "http://localhost:9001/" to http://MY-IP-ADDRESS-HERE:9001/
but that didn't change anything.
Question:
What is causing this error and how do I solve it?
You should start the server with port number
enter the following command in terminal
ruby -run -ehttpd . -p9001
And finally your tvBaseURL should navigate to the server folder like this
"http://yourLocalhost:9001/Downloads/TVMLCatalogUsingTVMLTemplates/Server/"
I also faced the same problem, I solved it by changing tvBaseURL in AppDelegate
static let tvBaseURL = "http://127.0.0.1:9001/Downloads/TVMLCatalogUsingTVMLTemplates/Server/"
As you see - I have to show exact path to Server folder. That also works if you put it to some web server.
Hope that it can help!
I just ran into this issue. You need to pay close attention to the terminal output.
I got:
[2019-03-15 12:28:43] INFO WEBrick 1.3.1
[2019-03-15 12:28:43] INFO ruby 2.3.7 (2018-03-28) [universal.x86_64-darwin17]
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/socket.rb:205:
in `bind': Address already in use - bind(2) for 0.0.0.0:9001 (Errno::EADDRINUSE)
Address already in use - bind(2) for 0.0.0.0:9001
At this point you either have to choose a different port number (if you decide to do such then make sure your server's port and your Xcode's project port match) or kill the previous server by ctrl + c or just killing that terminal window.
Also note in some of Apple's sample projects the ruby -run -ehttpd . -p9001 command is to be done in a folder named Server and for others it's just suppose to be done in the App's main folder. Just look into the README file to figure this out.

Eclipse Rhostudio not showing error messages

I have just started using the rhostudio plugin for eclipse 3.7.2 on Windows.
I have erroneous code but the console never seems to output error messages.
When I launch the simulator I do get some logs but as soon as it hits a bad line of code it stops logging and the simulator window goes blank.
Can anybody help?
You can increase the amount of log output by changing the log level in:
rhoconfig.txt
in your projects root folder and setting MinSeverity as follows:
# Rhodes log properties
# log level
# 0-trace, 1-info(app level), 3-warnings, 4-errors
# for production set to 3
MinSeverity = 0
# enable copy log messages to standard output, useful for debugging
LogToOutput = 1

Netbeans: project won't start all of a sudden - Glassfish problems?

I am a first time user of Netbeans, and was just playing around. I followed a very basic tutorial, and when I first ran the project, it opened up my browser (Chrome) and displayed what it should display.
The next day, I want to show it to my buddies, but the project won't start.
The project tab shows the following:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting GlassFish Server 3.1.2
and the other tab "Java DB Database Process" gives me the following:
Wed May 23 19:52:45 CEST 2012 : Sicherheitsmanager mit einfacher Server-Sicherheitsrichtlinie installiert.
Wed May 23 19:52:46 CEST 2012 : Apache Derby Network Server 10.8.1.2 - (1095077) wurde gestartet und ist bereit, Verbindungen am Port 1527 zu akzeptieren.
(the last line translates to "Server was started and is ready to accept connections in port 1527")
The only thing that was different when I tried it was the fact that I was in a public wireless net in University, and not at home. Windows Firewall asked me, if I wanted to grant permission, and I said "Yes"
So basically Netbeans tells me that my project is currently in the process of being started, but nothing happens for ages.
Any ideas what I could possibly have done wrong? I googled the heck out of it, but found nothing.
EDIT: After 20 minutes I get a timeout and a message that the server couldn't be started. I am clueless...
The different network configuration can indeed be a reason for this issue.
You could verify this by either checking the server.log under:
glassfish-install-dir/glassfish/domains/domain1/config/server.log
Scroll down to the last log entry before server start stopped.
Or you can start your server manually in verbose mode. Then you will see all log messages in the console:
Open a console window and switch to the following directory:
glassfish-install-dir/bin
Then enter the following command:
asadmin start-domain --verbose=true