Skip to content

Connection failure ("unexpected end of stream") after Mac reboot/sleep/WiFi toggle - requires Mac app restart #224

@tlgeworld

Description

@tlgeworld

Description
Even though AirSync is added to Login Items (so it launches automatically), the connection sometimes fails after the Mac wakes up, reboots, or when WiFi is manually toggled off/on on my Mac.
Both devices still appear in the “available devices” list, but the connection cannot be established until the Mac app is fully quit and relaunched.

Core symptoms (same for reboot / long sleep / WiFi toggle):
Auto connection doesn't work and If I tap quick connect on Android app,it fails with:
AirSync: unexpected end of stream on http://192.168.31.240 (Mac’s IP)
Click 'Tap to connect ' on Android weights and connection tile don't work neither when this problem happens.
Clicking the Android device name(last connected)in the Mac app does nothing.
The only reliable fix is to quit and relaunch AirSync on the Mac.(In this screenshot I toggled off available devices but if it was turned on it will show"MacBook air")
Screenshot_20260410_205947_AirSync.jpg

WiFi toggle specific behavior (slightly different):
When I turn off WiFi on Mac while the devices are connected:
The Mac app continues to show the phone as Connected.
However, the phone’s IP address in the Mac app shows address: n/a.
The Android app correctly shows the Mac as Not connected the entire time.
After turning on WiFi,the mac app will show my phone's ip correctly, HOWEVER,the problem persists.they won't connect and you have to relaunch the app on Mac.
The auto-reconnection issue itself is identical across all three scenarios.
This problem is intermittent:
Sometimes it auto-reconnects after reboot/sleep.
Sometimes it does not (requires manual Mac app restart).

Note: Manually killing the Android app does not trigger the issue — it reconnects quickly after launching android app.

Connection stability has improved A LOT in v3.0.1 beta (older versions often stayed broken even after relaunching the Mac app). In 3.0.1 it now reconnects most of the time, but not always.

Expected Behavior
The apps should automatically reconnect after the Mac wakes/reboots or WiFi is toggled, without any manual restart of the Mac app.

Steps to Reproduce
Add AirSync to Login Items.
Connect both devices successfully.
Perform one of the following:
Reboot the Mac, OR
Put the Mac to sleep overnight, OR
Manually turn WiFi off then back on.
Wait for AirSync to auto-launch(if rebooted)on Mac and open the Android app. If devices didn't connected automatically ,open the app,both devices show each other as available.
Tap Quick Connect on Android → fails with “unexpected end of stream”.
Click Android device name on Mac app → no response.
(WiFi toggle only) Observe Mac app still shows “Connected” with address: n/a when WiFi is off.

Environment
macOS version: 26.4, MacBook air M2
AirSync macOS version: 3.0.1 beta (newest)
AirSync Android version: 3.0
Android version:16, Samsung s24
Network: Stable WiFi (same network, no internet issues

Additional Context
Problem is occasional — sometimes auto-reconnects, sometimes requires Mac app restart.
Happens mostly after Mac reboot, long sleep, or manual WiFi off/on.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions