• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 41839991989
94%

Build:
DEFAULT BRANCH: main
Ran 04 Nov 2026 01:40PM UTC
Jobs 12
Files 194
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Nov 2026 01:38PM UTC coverage: 94.189% (+0.01%) from 94.178%
41839991989

push

github

web-flow
fix(realtime): time out a hung accessToken callback (#2124)

## Why

`_resolveAccessTokenAndFlush` awaited the `customAccessToken` callback
with no bound. A third-party callback that never completed left errored
channels unjoined and the send buffer unsent forever. On the heartbeat
path, the hung call also kept `_refreshingAccessTokenOnHeartbeat` set,
so no later heartbeat asked for a token again.

## What changes

Every `customAccessToken` call goes through one helper that bounds it by
the client's `timeout` (10 seconds by default) and fails with a
`TimeoutException`. The timeout is handled like any other callback
error:

- **Connect and reconnect:** the error surfaces as a `channelError`
status and on `onStatusChange`, the buffer stays unsent, and the
connection is closed so the reconnect backoff calls the callback again.
When `setAccessToken` has set a newer token while the call was pending,
the failure is only logged and the channels rejoin with the newer token,
as a superseded successful call already did.
- **Heartbeat:** the current token is kept and the next heartbeat asks
again.
- **`setAccessToken(null)`:** throws the `TimeoutException` instead of
never returning.
- **`httpSend`:** the timeout reaches the caller as an
`AccessTokenException` with the `TimeoutException` as `cause`, as other
callback errors already do.

A late result of a timed-out call is dropped by `Future.timeout`, and
the existing `_accessTokenResolution` generation guard still keeps an
older resolution from overwriting a newer token.

No throttle is added. The heartbeat already calls the callback at most
once per `heartbeatInterval`, and overlapping heartbeats already share
one call. No proactive refresh before `exp` either, because the auth
client already refreshes the session ahead of expiry.

No public API changes, so there is no `MIGRATION.md` section and no
`sdk-compliance.yaml` change.

## Tests

- `socket_test.dart`: a callback that never completes on connect times
o... (continued)

15 of 15 new or added lines in 1 file covered. (100.0%)

12676 of 13458 relevant lines covered (94.19%)

6.9 hits per line

Jobs
ID Job ID Ran Files Coverage
3 supabase_auth - 41839991989.3 04 Nov 2026 01:44PM UTC 34
94.3
GitHub Action Run
4 supabase_test - 41839991989.4 04 Nov 2026 01:40PM UTC 9
93.73
GitHub Action Run
5 iceberg - 41839991989.5 04 Nov 2026 01:40PM UTC 7
99.72
GitHub Action Run
6 supabase_functions - 41839991989.6 04 Nov 2026 01:40PM UTC 4
94.15
GitHub Action Run
7 supabase - 41839991989.7 04 Nov 2026 01:43PM UTC 21
94.52
GitHub Action Run
8 supabase_storage - 41839991989.8 04 Nov 2026 01:41PM UTC 13
95.96
GitHub Action Run
9 postgrest - 41839991989.9 04 Nov 2026 01:42PM UTC 30
92.88
GitHub Action Run
10 supabase_flutter - 41839991989.10 04 Nov 2026 01:40PM UTC 16
89.08
GitHub Action Run
11 supabase_typegen - 41839991989.11 04 Nov 2026 01:42PM UTC 6
94.44
GitHub Action Run
12 supabase_realtime - 41839991989.12 04 Nov 2026 01:42PM UTC 15
92.36
GitHub Action Run
4 supabase_common - 41623445554.4 03 Nov 2026 10:58AM UTC 37
94.39
GitHub Action Run
2 yet_another_json_isolate - 41623445554.2 03 Nov 2026 10:58AM UTC 2
98.65
GitHub Action Run
Source Files on build 41839991989
  • Tree
  • List 194
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41839991989
  • 290fdb0e on github
  • Prev Build on main (#41836602004)
  • Next Build on main (#42010838092)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc