You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android 0.3.0: can't connect to LAN servers on Android 17 (missing ACCESS_LOCAL_NETWORK) #62934
The Android app targets SDK 37 but doesn't declare android.permission.ACCESS_LOCAL_NETWORK. On Android 17, apps targeting SDK 37 need that permission to reach the local network, so the OS drops the connection before it leaves the phone. Pairing fails with a timeout, the server never sees a connection, and the app has no local network permission for the user to grant.
Use an Android 17 device on Wi-Fi with no VPN, and run an OpenCode server on the same subnet.
On the server, run opencode pair --url http://<hostname>.local:4096.
Scan the QR code in the app.
Result: URLError -1001 timedOut after about 15 s. The app logs GET /auth/…: URLError -1001 (SocketTimeoutException), a packet capture on the server shows no SYN, and adb shell dumpsys appops --package ai.opencode.mobilecode shows a Reject for ACCESS_LOCAL_NETWORK.
Expected: the app asks for the local network permission and connects.
Thanks for the detailed diagnosis, @osctorand: the packet capture and the dumpsys appops output make the cause very clear.
I couldn't reproduce this in our automated environment. It has no Android 17 device or emulator and no copy of the 0.3.0 (39) build, and the Android app's source isn't in this repository, so I couldn't check its manifest either. A maintainer with access to the mobile app will need to confirm that ACCESS_LOCAL_NETWORK is missing and that pairing over the LAN fails on API 37.
The server side (2.2.6 and opencode pair) doesn't look involved, since no connection attempt ever reached the server.
I'm having the same issue. I just updated my S24 Ultra to Android 17. There's no way to manually give the app this permission without it asking first, so I suppose we'll have to wait.
Activity
opencodejr commentedon Nov 9, 2026
Thanks for the detailed diagnosis, @osctorand: the packet capture and the
dumpsys appopsoutput make the cause very clear.I couldn't reproduce this in our automated environment. It has no Android 17 device or emulator and no copy of the 0.3.0 (39) build, and the Android app's source isn't in this repository, so I couldn't check its manifest either. A maintainer with access to the mobile app will need to confirm that
ACCESS_LOCAL_NETWORKis missing and that pairing over the LAN fails on API 37.The server side (2.2.6 and
opencode pair) doesn't look involved, since no connection attempt ever reached the server.Related, though not the same problem:
a-wayne commentedon Nov 9, 2026
I'm having the same issue. I just updated my S24 Ultra to Android 17. There's no way to manually give the app this permission without it asking first, so I suppose we'll have to wait.