Skip to content

fix: keep the server running when mDNS can't send (GRYT-2001) - #356

Merged
grytchat merged 1 commit into
mainfrom
claude/GRYT-2001-mdns-error
Nov 1, 2026
Merged

grytchat merged 1 commit into
mainfrom
claude/GRYT-2001-mdns-error

Conversation

@grytchat

@grytchat grytchat commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

On a machine with no multicast route, the server's log ends at send EHOSTUNREACH 224.0.0.251:5353 and clients can't reach it any more. It happens on GitHub's macOS runners, and a self-hosted VM could hit it too.

bonjour-service throws from a socket event unless it gets an error callback (mdns-server.js:16), and the try/catch in tryBonjour can't catch that. It now gets a callback that logs one warning, so the server carries on without LAN discovery.

Look at: I couldn't reproduce this on my Mac, which has a multicast route. The real test is the Phone flows job in Gryt-chat/mobile#482, which checks out server main.

🤖 Generated with Claude Code

bonjour-service throws from a socket event unless it's given an error
callback, and nothing can catch that. On a machine with no multicast route,
EHOSTUNREACH then took the server down. Losing LAN discovery now logs one
warning and the server stays up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grytchat
grytchat merged commit db9278d into main Nov 1, 2026
7 checks passed
@grytchat
grytchat deleted the claude/GRYT-2001-mdns-error branch November 1, 2026 16:35
grytchat added a commit to Gryt-chat/mobile that referenced this pull request Nov 1, 2026
It didn't stop the crash. Gryt-chat/server#356 fixes that in the server,
which this job checks out from main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
grytchat added a commit to Gryt-chat/mobile that referenced this pull request Nov 1, 2026
* test: tap through the phone app with Maestro (GRYT-1999)

Two flows to start with: Add a server from the server drawer, which froze
the app until mobile#481, and sending and long-pressing a message. Putting
the freeze back makes the first one fail at the sheet.

CI runs them nightly and on PRs that change them, against a server built
from source, since macOS runners have no Docker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: find buttons by name in the phone flows (GRYT-2000)

@gryt/ui-native 0.18.2 shows Dialog and Drawer contents to the accessibility
tree, so the position taps go. The drawer flow also checks that tapping
outside still closes it. CI picks an iPhone the runner has, and a failed
build now fails the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: keep the flows' server up on CI and pass the keyboard tip

The runner has no multicast route, and the server's log stops at an mDNS
send error, so the test server no longer advertises itself. A fresh
simulator also shows a keyboard tip that covers the screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: give the flows' server a multicast route instead of hiding it

SERVER_DISCOVERABLE=false also takes /info away, so the server check timed
out. A route over loopback keeps discovery on and the mDNS send working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: give Maestro's iOS driver longer to start on CI

Its two-minute default ran out on the runner. The Maestro download also
retries now, after a DNS failure on the runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: drop the multicast route from the flows' server

It didn't stop the crash. Gryt-chat/server#356 fixes that in the server,
which this job checks out from main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: hide the keyboard before closing the add-server sheet

On CI the Close tap opened Control Center instead of reaching the app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: only tap Close if hiding the keyboard left the sheet open

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: end the drawer flow on the sheet working, not on closing it

Hiding the keyboard behaves differently on the runner, and closing the
sheet isn't what this flow is for. It now checks that the sheet shows and
takes typing, and that tapping outside closes the drawer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Sivert <316918682+grytchat@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant