Android Studio debug native code lldb server work infinity - java

I have Android app which are writed use Java and C++/JNI code. My C++/JNI part work bad. I want to debug native code.
I work in Android Studio.
I did all step which take official site
enter link description here
But when I start debug I see line
Starting LLDB server
And he does not finish. I wait 30 min but he does not finish.
What I must to do. Because I think this bug or I must to take some settings.

I found error. But I did not understand. When I test app from USB cable all work good. But when I want to test my app through wifi (I use Android Wifi ADB) LLDB Debug server start, but not attach to process.
If I debug java code use java debugger all work good.

All output in debug console:
Connecting to org.temp.test
Waiting for application to start debug server
Waiting for application to come online: org.temp.test.test | org.temp.test
Connecting to org.temp.test
Now Launching Native Debug Session
Starting LLDB server: /data/data/org.temp.test/lldb/bin/start_lldb_server.sh /data/data/org.temp.test/lldb unix-abstract /data/data/org.temp.test/lldb/tmp platform-1524470360668.sock "lldb process:gdb-remote packets"

Related

AEM & Eclipse - Remote JAva Application Debug won't run or hit breakpoints, but occupies debug port

I'm running on AEM Perspective with my remote server running. I then run Java Remote Application configuration on port 5402. First time running the debug config, it says it failed. Second time running it it says "Failed to connect to VM. Connection refused."
None of the breakpoints I've set up get hit, or are the icon they're meant to be when debug is running. None of the buttons on the debug view are lit up indicatin debug is actually working. However, eclipse is active as a task for the debug port when I run netstat -ano | findstr :5402 on cmd line.
I have restarted eclipse and AEM about 10 times today trying to get around this as no one on my team is experiencing this issue. I'm new to the tea, though, and all of them have had their environments running for years, so they don't know what step I could be missing that I can't get my env to work like theirs.
This is preventing me from getting work done and is very frustrating. Does anyone know why Eclipse would behave this way?

Gradle should not wait for debugger to attach

does anybody know a way to let gradle run the application in debug mode but not wait until the debugger attachs? I know this is a nice feature to have the debugger attached when the application starts. My google research was not fruitful.
The command I execute to start the application in debug mode.
./gradlew appRunDebug
(which is equivalent to ./gradlew appRun --debug-jvm)
What I see then on the console after several seconds:
Listening for transport dt_socket at address: 5005
<============-> 97% EXECUTING [1m 2s]
At this point I have to attach my debugger to the process in order that the start routine continues. But I just want to have the debug port open and the application fully running without attaching my debugger.
How can this be achived? Thanks for any help. Even the confirmation that this is not possible.
According to https://akhikhl.github.io/gretty-doc/Debugger-support.html, from Gradle 1.1.8 onwards, you should be able to set the debugSuspend property to false and appRunDebug won't start the application in suspended mode.

How to fix error "Enrollment failed" when trying WSO2 IoT 3.3.0 android enrollment?

I set up a new server windows 2012R2 in a VM machine. The latest active-mq and Apache-ant are downloaded. Oracle JDK 8u192 is used. After installation and setup of the WSO2 IoT application, I cannot enroll an android device.
I installed the WSO2IOT by following the instructions in the online documentations for version 3.3.0.
CARBON_HOME and JAVA_HOME are set up in environment variables already.
The process of steps that I go are as follows:
I start the activemq by running it inside a cmd window as instructed by the documentation.
I start broker.bat in another cmd window
I start iot-server.bat in another cmd window
I start analytics.bat in another cmd window
Everything starts and I end up with the text "Carbon .. has stared in ** milliseconds.
I open my management console on https port 9443\devicemgt and login as admin no problem.
After that I connect my galaxy A5 2016 model with android 7.0 to the same network via WiFi. Download the app via QR code from my PC screen to the mobile phone. Install the app and try to register. The IP which I enter is static in the VM and of course I add 8280 port in the wso2 management app on the phone. Then I login with admin/admin credentials which logins successfully but right after that it posts an message on the phone that it is receiving policy and here it stops. The little circle spins (loading) and nothing happens for few minutes after which I get an error "Enrollment failed. Contact the administrator. Enrollment failed." no other message or anything.
On the analytics cmd window I got the following error inside my VM:
[2018-12-20 11:00:00,037] [IoT-Analytics] ERROR {org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter} - Error in executing task: nulljava.lang.NullPointerException
at org.wso2.carbon.analytics.spark.core.CarbonAnalyticsProcessorService.executeQuery(CarbonAnalyticsProcessorService.java:256)
at org.wso2.carbon.analytics.spark.core.CarbonAnalyticsProcessorService.executeScript(CarbonAnalyticsProcessorService.java:206)
at org.wso2.carbon.analytics.spark.core.AnalyticsTask.execute(AnalyticsTask.java:60)
at org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:67)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
And that is basically it I cant move on forward from here. I tried with different java jdk versions as old as 8u144 and I tried with openJDK 8 LTSu191 to no avail.
Other things like creating policies in the devicemgt portal, creating users and browsing the portal works fine.
Did anyone encounter this issue and manage to solve it?
Thanks.
I used WM windows10. The situation fully corresponded to that described by you, with only one difference - I also had an error on the page with the preservation of policies for Android. I also saw that the default policies for windows are reflected in the platform configuration section, and the android policies are missing and cannot be saved due to the error you described. However, in the wso2 home directory I found the Android configuration file in which the default policy !!! was done.
Next, I used ADB to watch the log from the Android device, at the time of binding (enrollment). He only confirmed the previously received information. I saw a 404 http error at the time the device attempted to get a policy agreement. Point.
Unexpected outcome. I downloaded version 3.1.0 instead of the current version 3.3.0. I started the batch file. I went to the platform configuration section, to the Android configuration - the default agreement policy was displayed correctly and you can change it and save the changes. The binding procedure (enrollment) passed without problems - the policy was obtained by the device and then everything went according to official instructions. I fully realize that this is not the answer to the question you raised, but at the same time it can help with a quick start. I hope.
p.s. I tried versions 3.3.1 and 3.3.0 - in both there is a similar problem with the enrollment. Version 3.1.0 does not have this problem. Versions tested on Ubuntu and WM Windows10.
Of course it would be great if the developer representatives tell you where to dig, to use a more current version. Have a nice day.
additionaly - also good work with 3.2.0

Eclipse/Scala(tra) debugger remote

I am running my Scala(tra v.2.3.0) application using ./sbt -jvm-debug 8000 - and get the proper "Listening for transport dt_socket at address: 8000" - followed by container:start. And the container starts, and the app seems to work properly. The JVM used has been set with jenv local oracle64-1.8.0.77.
Now when I go to Eclipse and run my Debug configuration, that is
Connection type: Scala debugger (Socket attach)
Connection localhost, port 8000
Preferred launcher: Scala Remote Launcher
In Scala Debugger tab, "Enable async trace functionality" is ticked
the debugger looks like it is attached, as I get this screen.
However no breakpoint stops, my Variables window is empty, and it looks like a "ghost app".
Any idea about what I could be doing wrong? I seem to have exhausted the usual suspects (but hey, maybe I missed one).

GWT Development mode - Unable to load module in Chrome

I'm trying to load my app in development mode using Chrome v. 20.0 on my local ip 127.0.0.1.
The app fails to load, and the following is displayed:
message:
"GWT Code Server Disconnected
Most likely, you closed GWT Development Mode. Or, you might have lost network connectivity. To fix this, try restarting GWT Development Mode and REFRESH this page."
on top of the previous message (overlaid):
"Plugin failed to connect to Development Mode server at 127.0.0.1:9997
Follow the underlying troubleshooting instructions"
This started to happen about 6-9 months ago and after 1 or 2 page refresh, the module loaded correctly. Now, i cannot load my app in dev-mode at all using Chrome. (in firefox
everything is ok).
I'm using GWT 2.4
UPDATE:
Those errors are not accompanied by any code stack trace output. Usually, if I changed the address form 127.0.0.1 to localhost, the module loaded, but this doesn't work any more...
Had the same problem. Deleting / reinstalling the plugin did the trick for me.
Check Automatically select an unused port of GWT from Run configuration.
My similar problem solved by this
I solved this in chrome by:
go to chrome://extensions/
locate GWT Developer Plugin
uncheck the Enabled box
check the Enabled box
Have a look at http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM
This page is supposed to be displayed in an iframe below the message (hence the message "underlying instructions", but Google has changed some server code on code.google.com and they now prohibit display within iframes, which is why it actually doesn't display.
FYI, the issue has been reported on GWT's issue tracker http://code.google.com/p/google-web-toolkit/issues/detail?id=7301
Your problem might be caused by improper gwt plugin setup. Go to your gwt developer plugin options (red toolbox right upper conner) in chrome and add your web and code server addresses. That worked for me.
Allowing "localhost" as webserver and code server made it work for me (although 127.0.0.1 was specified for both in the browser)

Categories

Resources