Closed boppy closed 7 years ago
Thanks for the fast reply!
Setting Java to java-8 (using sudo archlinux-java set java-8-openjdk
) was a good starting point but it took some time to figure out what the next error was about. It states:
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
...
After finding a usefull hint here and there I copied the missing libs (mentioned in here-link) I did not get an error initially.
Connecting works, no startup errors in the console. But as soon as I interact it crashes again (tons of toasts). This time with:
java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2903)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1502)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422)
at remotecontrolpc.desktop.server.Server.connect(Server.java:45)
at remotecontrolpc.desktop.MainScreen$4.run(MainScreen.java:244)
And yes: the app asked for storage perms - that I granted - on first start.
Are you building(deploying) your own project or running pre-compiled jar and apk? I would suggest first run already distributed jar file (dist folder) from terminal and apk (bin folder) in android and check if it is working. There are chances that you didn't deploy project correctly (if you are deploying and then executing).
I used the pre compiled files.
First apk was from F-Droid but I recently installed the apk from this repo. Also the desktop jar is the one from this repo.
You sure java is properly installed on your machine? Can you test the app on different OS (this project has been developed and tested on Ubuntu and Windows).
I am attaching some java files (Server.java and Client.java in p2p folder). These are basic Unit modules of Java Socket Programming. Just check them if they compile and execute properly.
open terminal and move to p2p folder
javac Server.java
java Server 3000
Open another terminal and executejavac Client.java
java Client localhost 3000
Try chatting via two terminal if that work.
p2p.zipI installed Java from the packet manager. I just tried java-8-jdk (provides javac) , java-8-jre and java-8-openjdk.
Your test app works like a charm. Bidirectional chatting is no problem. No compile errors, no runtime errors. - But still the same problem with the "real" app.
Possibly another hint: After starting the app and clicking "reset" (before connecting) it tells:
java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
at java.net.ServerSocket.implAccept(ServerSocket.java:545)
at java.net.ServerSocket.accept(ServerSocket.java:513)
at remotecontrolpc.desktop.server.Server.connect(Server.java:28)
at remotecontrolpc.desktop.MainScreen$4.run(MainScreen.java:244)
I also connected to 127.0.0.1:3000
with telnet. Connection is esablished. After sending "Foo" the server "consoles" (nothing is sent to the [telnet-]client):
java.io.StreamCorruptedException: invalid stream header: 666F6F0D
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:857)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:349)
at remotecontrolpc.desktop.server.Server.connect(Server.java:35)
at remotecontrolpc.desktop.MainScreen$4.run(MainScreen.java:244)
I'll try to run the desktop app on another device this evening (also Antergos). But since I dumped Windows a year ago it'll take until monday to check it on a Windows PC at work.
"Possibly another hint: After starting the app and clicking "reset" (before connecting) it tells:" This is okay. Each time you hit reset button, old socket is closed and new one is created. Okay if app doesn't work on other machines then deploy it on your machine. Build it again and check if that works. If it still does not work then I can connect via Teamviewer to debug it (if you think so).
Same here on windows. I asked a co worker to compile the APK from source: No difference. It works on a Huawei MT7-L09 with Android 4.4.2, but not my N5X + 7.1.2 Android... Same with the APK in this repo.
After closing the App on the Huawei it shows the EOF-Error on console and crashes afterwards, so I have to kill the java process to get an other connection working.
I'll try to find someone able to compile the Java-Part, but I don't think that this would change anything.
So the problem is in android part?? It might be because app has not been tested thoroughly on multiple android devices (Btw you are the first one to report it). I'll try to fix it as soon as possible.
Hey, why the server is not listening when I'm running on Ubuntu 14.0.4 with Android 4.4.4?
https://github.com/varunon9/Remote-Control-PC/raw/master/RemoteControlPC-Studio/app/build/outputs/apk/app-debug.apk download apk from here and try once again. Share console output with me.
The app crash when i opened Live Screen and Media Player didn't run as your preview (screenshot). Then, Power Off shows unsupport os.
I've updated Desktop jar as well as apk file. https://github.com/varunon9/Remote-Control-PC/raw/master/RemoteControlPC-Desktop/dist/RemoteControlPC-Desktop.jar https://github.com/varunon9/Remote-Control-PC/raw/master/RemoteControlPC-Studio/app/build/outputs/apk/app-debug.apk Please re-run and share console output. Note that power off will not work in linux (works in windows) as it requires password to shutdown system. Also Live screen only supports single click. Double click will make it crash (I'll fix it).
hello,when i click "live screen", the app crash.
Java environment: java version "1.8.0_121" Java(TM) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
server exception: java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at remotecontrolpc.desktop.server.Server.connect(Server.java:51) at remotecontrolpc.desktop.MainScreen$4.run(MainScreen.java:244)
android studio exception:
06-21 16:27:55.228 21805-21805/com.example.remotecontrolpc I/hwaps: JNI_OnLoad
06-21 16:27:58.991 21805-21805/com.example.remotecontrolpc W/System.err: android.os.NetworkOnMainThreadException
06-21 16:27:58.991 21805-21805/com.example.remotecontrolpc W/System.err: at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1315)
06-21 16:27:58.991 21805-21805/com.example.remotecontrolpc W/System.err: at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
06-21 16:27:58.991 21805-21805/com.example.remotecontrolpc W/System.err: at java.net.SocketOutputStream.write(SocketOutputStream.java:157)
06-21 16:27:58.991 21805-21805/com.example.remotecontrolpc W/System.err: at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1946)
06-21 16:27:58.991 21805-21805/com.example.remotecontrolpc W/System.err: at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1833)
06-21 16:27:58.991 21805-21805/com.example.remotecontrolpc W/System.err: at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1229)
06-21 16:27:58.991 21805-21805/com.example.remotecontrolpc W/System.err: at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
06-21 16:27:58.991 21805-21805/com.example.remotecontrolpc W/System.err: at com.example.remotecontrolpc.MainActivity.sendMessageToServer(MainActivity.java:232)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at com.example.remotecontrolpc.livescreen.LiveScreenFragment.updateScreenshot(LiveScreenFragment.java:103)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at com.example.remotecontrolpc.livescreen.LiveScreenFragment.onCreateView(LiveScreenFragment.java:90)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at android.os.Handler.handleCallback(Handler.java:761)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at android.os.Handler.dispatchMessage(Handler.java:98)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at android.os.Looper.loop(Looper.java:156)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6531)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at java.lang.reflect.Method.invoke(Native Method)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
06-21 16:27:58.992 21805-21805/com.example.remotecontrolpc W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
06-21 16:27:59.013 21805-21805/com.example.remotecontrolpc W/System.err: android.os.NetworkOnMainThreadException
06-21 16:27:59.013 21805-21805/com.example.remotecontrolpc W/System.err: at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1315)
06-21 16:27:59.013 21805-21805/com.example.remotecontrolpc W/System.err: at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
06-21 16:27:59.013 21805-21805/com.example.remotecontrolpc W/System.err: at java.net.SocketOutputStream.write(SocketOutputStream.java:157)
06-21 16:27:59.013 21805-21805/com.example.remotecontrolpc W/System.err: at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1946)
06-21 16:27:59.013 21805-21805/com.example.remotecontrolpc W/System.err: at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1888)
06-21 16:27:59.013 21805-21805/com.example.remotecontrolpc W/System.err: at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:731)
06-21 16:27:59.013 21805-21805/com.example.remotecontrolpc W/System.err: at java.io.ObjectOutputStream.close(ObjectOutputStream.java:752)
06-21 16:27:59.013 21805-21805/com.example.remotecontrolpc W/System.err: at com.example.remotecontrolpc.MainActivity.socketException(MainActivity.java:258)
06-21 16:27:59.013 21805-21805/com.example.remotecontrolpc W/System.err: at com.example.remotecontrolpc.MainActivity.sendMessageToServer(MainActivity.java:236)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at com.example.remotecontrolpc.livescreen.LiveScreenFragment.updateScreenshot(LiveScreenFragment.java:103)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at com.example.remotecontrolpc.livescreen.LiveScreenFragment.onCreateView(LiveScreenFragment.java:90)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at android.os.Handler.handleCallback(Handler.java:761)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at android.os.Handler.dispatchMessage(Handler.java:98)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at android.os.Looper.loop(Looper.java:156)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6531)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at java.lang.reflect.Method.invoke(Native Method)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
06-21 16:27:59.014 21805-21805/com.example.remotecontrolpc W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
06-21 16:27:59.027 21805-21838/com.example.remotecontrolpc E/OpenGLRenderer: allen debug liyu Key: 103079215104
06-21 16:27:59.029 21805-21805/com.example.remotecontrolpc I/HwPointEventFilter: do not support AFT because of no config
06-21 16:27:59.035 21805-23226/com.example.remotecontrolpc W/System.err: java.io.FileNotFoundException: /RemoteControlPC/screenshot.png (No such file or directory)
06-21 16:27:59.035 21805-23226/com.example.remotecontrolpc W/System.err: at java.io.FileOutputStream.open(Native Method)
06-21 16:27:59.035 21805-23226/com.example.remotecontrolpc W/System.err: at java.io.FileOutputStream.
--------- beginning of crash
06-21 16:27:59.082 21805-21805/com.example.remotecontrolpc E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.remotecontrolpc, PID: 21805 java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at com.example.remotecontrolpc.livescreen.LiveScreenFragment$3.receiveData(LiveScreenFragment.java:111) at com.example.remotecontrolpc.livescreen.UpdateScreenshot.onPostExecute(UpdateScreenshot.java:60) at com.example.remotecontrolpc.livescreen.UpdateScreenshot.onPostExecute(UpdateScreenshot.java:18) at android.os.AsyncTask.finish(AsyncTask.java:692) at android.os.AsyncTask.-wrap1(AsyncTask.java) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:709) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6531) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
is file download/ file sharing working??
When i connect i received blue screen and in some devices when i connected the app crashed when i clicked on live screen
There is no transfer logs on cmd when i send screenshot request only on android 7 and screenshot image is of size 0byte created...whats the issue? tried on S7
I have tested live screen on Android 4.2.2. Since I've no other devices available, I am unable to fix right now. I'll do it ASAP. There is bug in getting external storage path (FileAPI.java, check if file download is working or not). Please do share console exceptions and errors.
When i test with note 4 , no error appears and here's the cmd
With android 7 no errors appears
also get logs like this
All right, just tell me if file download is working? Download some files from laptop and check in phone.
No its not working
I have updated android apk. Check if live screen and file download is working or not.
I have updated Android as well as Desktop app. Please download latest code and check once again
PROBLEM After the connection is successfully established it's closed immediately. A few tons of "Connection closed" toasts are displayed (just flickering around until I kill the app). Java drops 2 exceptions.
DETAILS After starting the JAR (tested it with user rights and sudo) there is an initial Exception:
The server windows opens, shows the correct IP address and port opened. It even states the correct connection once I connect the app. As long as I stay on the prefs page nothing happenes. As soon as I switch to touchpad and touch anything, the toast "Connection closed" appears. The server app still shows "Connected to: /192......", and there is another Exception:
Clicking "File Transfer" simply crashes the app. That might have to do with the lost connection...
Since the only thing I know about Java is that it's getting better after appending "Script" to it, my information might not be enough to debug. ;-)
I also have the logcat output of my last try (I didn't clean up anything. Lines 25-154 are "dups"): https://gist.github.com/boppy/39e981ae651b887de0fd5949ac0608e4
Any ideas on what I'm doing wrong?