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

supabase / supabase-swift / 31194585392
85%

Build:
DEFAULT BRANCH: main
Ran 07 Aug 2026 03:59PM UTC
Jobs 1
Files 102
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

07 Aug 2026 03:50PM UTC coverage: 84.559% (+0.06%) from 84.497%
31194585392

push

github

web-flow
fix(supabase): stop listenForAuthEvents task from leaking SupabaseClient (#1191)

`listenForAuthEvents()` started a `Task` whose body called the instance
method `handleTokenChanged`, implicitly capturing `self` strongly. The
task loops over `auth.authStateChanges`, a stream that never finishes, so
the strong reference was permanent. `deinit` cancels that task, but
`deinit` can only run once the retain count reaches zero -- which the task
itself prevented. Every `SupabaseClient` created without a static
`accessToken` option therefore leaked for the life of the process.

The stream is now resolved before the task starts, so the task no longer
needs `self` to reach `auth`, and `self` is captured weakly. Each
iteration re-acquires the client and exits the loop once it's gone.
Auth-state handling for a live client is unchanged.

The same cycle existed for the cached sub-clients: `rest`, `storage` and
`functions` were handed the `fetchWithAuth`/`uploadWithAuth` method
references, which capture `self`, and are themselves cached in
`mutableState`. Those are now closures capturing only the dependencies
they need (the `URLSession` and the access-token provider), so touching a
sub-client no longer pins the client either.

Closes #1187

26 of 32 new or added lines in 1 file covered. (81.25%)

64 existing lines in 2 files now uncovered.

8773 of 10375 relevant lines covered (84.56%)

1034971.17 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
76.98
0.11% Sources/Supabase/SupabaseClient.swift

Coverage Regressions

Lines Coverage ∆ File
63
88.4
0.24% Sources/RealtimeV2/RealtimeClientV2.swift
1
76.98
0.11% Sources/Supabase/SupabaseClient.swift
Jobs
ID Job ID Ran Files Coverage
1 31194585392.1 07 Aug 2026 03:59PM UTC 102
84.56
GitHub Action Run
Source Files on build 31194585392
  • Tree
  • List 102
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #31194585392
  • 99cb5263 on github
  • Prev Build on main (#31194561221)
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