Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

Exception is thrown in intellij 15 #24

Open
athkalia opened this issue Oct 26, 2015 · 6 comments
Open

Exception is thrown in intellij 15 #24

athkalia opened this issue Oct 26, 2015 · 6 comments
Labels

Comments

@athkalia
Copy link

Hello,

as soon as I click the wifi button I get this exception thrown:

String index out of range: -4
java.lang.StringIndexOutOfBoundsException: String index out of range: -4
    at java.lang.String.substring(String.java:1955)
    at com.github.pedrovgs.androidwifiadb.adb.ADBParser.parseGetDeviceIp(ADBParser.java:71)
    at com.github.pedrovgs.androidwifiadb.adb.ADB.getDeviceIp(ADB.java:68)
    at com.github.pedrovgs.androidwifiadb.adb.ADB.connectDeviceByIp(ADB.java:56)
    at com.github.pedrovgs.androidwifiadb.adb.ADB.connectDevices(ADB.java:49)
    at com.github.pedrovgs.androidwifiadb.AndroidWiFiADB.connectDevices(AndroidWiFiADB.java:45)
    at com.github.pedrovgs.androidwifiadb.action.AndroidWiFiADBAction$1.run(AndroidWiFiADBAction.java:52)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:365)
    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:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)

Seeing this in Intellij 15 EAP, v 143.379.11

@pedrovgs pedrovgs added the bug label Oct 26, 2015
@pedrovgs
Copy link
Owner

@athkalia which plugin version are you using? Can you try to execute this commands and paste the output here?

adb tcpip 5555
adb connect 192.168.2.131

Replace 192.168.2.131 with the IP assigned to your device.

Thanks!

@athkalia
Copy link
Author

Hello,

I am using latest version, v1.2. When I use the commands it works fine and I get connected, I tried an over the air deployment and it succeeded. But once I disconnect and I am connected via USB again, if I click on your plugin button I get the very same exception

@pedrovgs
Copy link
Owner

Please, execute that commands and paste the result here. I need to check if there is something wrong with the output adb prints.

@athkalia
Copy link
Author

adb tcpip 5555
restarting in TCP mode port:5555

then there's no cursor to continue writing.
If I open a new command line to type the second command i get:
adb connect 192.168.1.94 (my ip)
connected to 192.168.1.94:5555

Then it works fine. Seems like there problem lies in the intellij plugin,
version of intellij is 143.747.6 (very latest 15 version)

@pedrovgs
Copy link
Owner

@athkalia can you try again with the latest version I've released?

@athkalia
Copy link
Author

Hello

I can see the device connected in the new little window that you added for intellij. When I click on connect I get the message:

"Unable to connect device 'HTC_One_max' Review your WiFi connection"

note that if I hit

adb devices

in the terminal, my device is there, and i can deploy stuff to it just fine.

Also note that I have my wifi enabled on the phone and I can browse the internet just fine from it.

P.S. in the intellij plugin description, as far as the release notes are concerned it would be better if the latest version was at the top instead of the bottom.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants