Repository navigation
Ask for Android 17 local network access before connecting to a LAN server - #39
Merged
Merged
Conversation
…rver Android 17 blocks apps targeting SDK 37 from the local network until they hold ACCESS_LOCAL_NETWORK (Nearby devices). The app never declared it, so every LAN connect or pairing silently timed out (anomalyco/opencode#62934). Now the permission is declared, and connecting or pairing to a server the existing route classifier calls Local Network asks first, the way iOS shows its own prompt on the first LAN connection. A failure while access is off says why, with Open Settings, instead of the bare timeout. Home's Try Again asks again, else opens Settings. Below SDK 37 nothing changes. Verified: vm.sh check :server :feature:drawer :app. On an API 37 emulator against session-lab at 10.0.2.2: first connect shows the dialog and Allow connects; Don't allow shows the copy with Open Settings, which opens App info; allowing there and connecting again works; pairing via a deep link shows the dialog and a denial shows the copy; a restored Home after a revoke asks on Try Again (or opens Settings when Android won't ask) and reconnects once allowed. On an API 36 slot: no dialog, connects as before.
Tarquinen
force-pushed
the
fix/local-network-permission
branch
from
November 11, 2026 23:12
9d41489 to
16962e9
Compare
Merged
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes anomalyco/opencode#62934.
On Android 17, apps targeting SDK 37 need
ACCESS_LOCAL_NETWORK(Nearby devices) to reach the local network. The app never declared it, so connecting to or pairing with a LAN server timed out.Now connecting or pairing to a local network server shows the system dialog first. If access is off, the error says why and offers Open Settings, and Home's Try Again asks again or opens Settings. Below SDK 37 nothing changes.
Not tested: pairing then Allow (session-lab has no
/auth/connect); it shares the normal connect path.