warpinator-android icon indicating copy to clipboard operation
warpinator-android copied to clipboard

Partial connection between android and windows.

Open whyvy-code opened this issue 6 months ago • 19 comments

I am only able to send files from android to windows, but not the opposite way. It shows partial connection. I have checked for VPN. Tried with vpn disabled as well as enabled, didn't work. Also tried hotspot. Though it works perfectly between two android phones.

Screenshot_20250702-102201~2.png

whyvy-code avatar Jul 02 '25 05:07 whyvy-code

I had a similar issue even with VPN disabled, see #148 .

You can install app called Turmux and run "ifconfig" command to see all the interfaces. Then compare that with Warpinator logs to see which interface it's using. If it is using a left over VPN interface like "tun0" then it might be a match for #148 .

TwistedC0de avatar Jul 02 '25 06:07 TwistedC0de

Screenshot_20250702-141857.png

I got this. Though I don't fully understand. But it seems there is some issue with my phone. While using apps like Warpinator ( I also tried LocalSend), it is able to send files but is unable to receive them. In the logs it mentions inability to share certificate, after which the connection fails. I have another phone and it works fine in that, even though I use the same vpn and dns service in both, plus connected to the same wifi.

whyvy-code avatar Jul 02 '25 09:07 whyvy-code

Could you provide the modified app, where in you altered the java file?

whyvy-code avatar Jul 02 '25 09:07 whyvy-code

I don't think you have the same issue as me (no extra interface like "tun0"), so my patch probably won't work for you. Maybe provide the Warpinator log here and see if @slowscript takes a look.

TwistedC0de avatar Jul 03 '25 03:07 TwistedC0de

latest.log

I am attaching the debug log. The error shows "Couldn't establish duplex".

whyvy-code avatar Jul 03 '25 08:07 whyvy-code

Did you check the firewall on your desktop? Would need to check both in-bound and out-bound.

TwistedC0de avatar Jul 04 '25 09:07 TwistedC0de

Yes. I tried with firewall disabled and enabled. Didn't work.

I have another phone which works with the laptop, but doesn't work with this phone. Seems like phone has some issue.

whyvy-code avatar Jul 06 '25 11:07 whyvy-code

Thanks for the log. Couldn't establish duplex means that the PC does not see the phone or that it does not connect back. However, I got an idea what could be a problem. Looks like I have at some point moved around which parts of code run asynchronously during announcement of the service and ended up in a situation where cleanup of old announcement and the new announcement run at the same time. Please try the attached APK, it is signed with the same keys as regular releases and should install cleanly. Alternatively you can build it yourself from master.

warpinator-release.zip

slowscript avatar Jul 08 '25 13:07 slowscript

Thank you. I will give it a try.

whyvy-code avatar Jul 08 '25 14:07 whyvy-code

Well, it didn't work. The same issue as well.

When I tried sending a file from my phone to another phone, it failed and displayed "Failed to open file for writing. " in the receiving phone.

Anyway, thanks for your effort. I will see if I can do it myself.

whyvy-code avatar Jul 08 '25 16:07 whyvy-code

Also, at times, it shows the below error.

Screenshot_20250708-220720.jpg

whyvy-code avatar Jul 08 '25 16:07 whyvy-code

The "unregistering failed" message is unimportant and should not show up in release versions, I only added it for debugging.

Does the Lenovo device see your phone and does not connect or does it not show up at all? Have you tried manual connection?

There might also be an issue on the other side. If you're using warpinator-windows, you can start it by opening the Terminal (or cmd) in the folder where it is installed and running .\Warpinator.exe -d, which (after closing the program) will write logs into your AppData\Local\Warpinator\latest.log. Winpinator is probably also somehow able to produce logs, although I'm not that familiar with it.

Now there is also a new Android version 1.8.3, where I have tweaked some keep-alive values, that could have caused some issues with connections breaking, although I'm not sure if this is your case.

slowscript avatar Aug 13 '25 18:08 slowscript

Both devices see each other. The first time I tried, it worked. But every subsequent try failed. It only showed half duplex on both devices, both sending.

whyvy-code avatar Aug 16 '25 18:08 whyvy-code

Thanks for the reply. So if I understand correctly, both devices show half duplex at the exact same time? Waiting for duplex means there is a one-way connection, through which the device asks the other if it is also waiting for duplex. If both devices are in this state, it should immediately switch to Connected. If each device shows Waiting for duplex at a different time (e.g. one times out and fails before the other device can connect), that means that this could be fixed by increasing the timeout (currently 5 sec). If you see the Windows device in this state, tap the reconnect button on its device page on the Android app (or vice versa) to make them attempt to connect at the same time. I will also note that the log that you sent does not show the Windows device connecting, there would be messages like (device name) is waiting for duplex... if it was. Ideally I would need logs from both devices that correspond to the same connection attempt.

slowscript avatar Aug 18 '25 09:08 slowscript

@whyvy-code I have discovered a bug in release builds that seems to cause what you are describing (only one device connects at a time). I have posted a build that should fix it here: https://github.com/slowscript/warpinator-android/issues/149#issuecomment-3412558179 . Could you test if it resolves your problem?

slowscript avatar Oct 16 '25 19:10 slowscript

Sure. I will do within 3 days and respond. Thank you for the effort.

whyvy-code avatar Oct 16 '25 19:10 whyvy-code

@slowscript I tried the app with two phones and one laptop. It worked perfectly between laptop(Win 11) - Samsung S8(android 9) and between Samsung S8(android 9) - Nokia 7.1(android 10).

But between laptop(win 11) and Nokia 7.1(android 10), it wasn't even able to detect on both the devices. It seems you have solved the problem. And also that there is some issue with my Nokia phone.

Thank you for the effort. Excellent work.

Also , I am attaching the error shown, in case you wanted to know.

Screenshot_20251017-012547.png

whyvy-code avatar Oct 16 '25 20:10 whyvy-code

Happy to hear the main issue if fixed. From the screenshot it looks like you are trying manual connection, but Warpinator is either not running on the other device (or failing to accept the connection) or there is a network issue (UNAVAILABLE status = underlying TCP connection failed). There might be more information in a debug log. The process of obtaining it was simplified, now you can just tap "Save log" in the 3-dot menu.

slowscript avatar Oct 17 '25 17:10 slowscript

I am attaching the log. Laptop and Nokia phone were not showing each other, so I tried manual but it wasn't able to find each other. warpinator-log.txt

whyvy-code avatar Oct 17 '25 18:10 whyvy-code