Opened 10 months ago

Closed 8 months ago

#2405 closed defect (fixed)

Android Bote bug

Reported by: Meeh Owned by: Meeh
Priority: major Milestone: 0.9.39
Component: apps/android Version: 0.9.38
Keywords: Cc:
Parent Tickets: Sensitive: no

Description

2019-01-24 19:48:10.146 12066-12328/? E/I2P: I2PBote [ConnectTask?] Can't initialize the application. net.i2p.client.I2PSessionException: [I2P-Bote]: Cannot connect to the router on [Domain socket connection]:0 net.i2p.client.I2PSessionException: [I2P-Bote]: Cannot connect to the router on [Domain socket connection]:0

at net.i2p.client.I2PSessionImpl.connect(I2PSessionImpl.java:559)
at i2p.bote.I2PBote.initializeSession(I2PBote.java:296)
at i2p.bote.I2PBote.access$600(I2PBote.java:129)
at i2p.bote.I2PBote$ConnectTask?.run(I2PBote.java:971)

Caused by: java.io.IOException: Connection refused

at android.net.LocalSocketImpl?.connectLocal(Native Method)
at android.net.LocalSocketImpl?.connect(LocalSocketImpl?.java:292)
at android.net.LocalSocket?.connect(LocalSocket?.java:131)
at net.i2p.client.DomainSocket?.<init>(DomainSocket?.java:34)
at net.i2p.client.DomainSocketFactory?.createSocket(DomainSocketFactory?.java:24)
at net.i2p.client.I2PSessionImpl.connect(I2PSessionImpl.java:491)
at i2p.bote.I2PBote.initializeSession(I2PBote.java:296) 
at i2p.bote.I2PBote.access$600(I2PBote.java:129) 
at i2p.bote.I2PBote$ConnectTask?.run(I2PBote.java:971) 

Subtickets

Change History (4)

comment:1 Changed 8 months ago by zzz

Milestone: undecided0.9.39

dup of #2349 but I closed that one, as this one is assigned to OP.
@OP I understand you have a fix for .39, please add details here.

comment:2 Changed 8 months ago by Meeh

After several hours fighting this, it got clear that the android API has been more and more "closed down" and restricted over the years. I've come to the conclusion that for Bote to talk to the I2P router, they need to share UID. For Bote users this mean they would have to uninstall the current, and reinstall a new Bote release. Android is enforcing this because of security.

So to sum it up:
The permission that gives network access does not allow local network access if socket listener not equals same uid.
We would have to redeploy Bote with right uid.

comment:3 Changed 8 months ago by Meeh

The solution, which also require a reinstall, is to add android:sharedUserId="net.i2p" to both projects manifest files.

comment:4 Changed 8 months ago by Meeh

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.