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

supabase / supabase-flutter / 29563951630
87%

Build:
DEFAULT BRANCH: main
Ran 17 Jul 2026 07:44AM UTC
Jobs 9
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

17 Jul 2026 07:42AM UTC coverage: 86.783% (-0.004%) from 86.787%
29563951630

push

github

web-flow
fix(realtime_client): stop throwing internally when converting null cell values (#1612)

## What kind of change does this PR introduce?

Bug fix (internal exception noise; no observable behavior change).

## What is the current behavior?

`convertCell`'s doc comment says *"If the value of the cell is `null`,
returns null"* — but the code never checks for null. A null value in an
`int2/int4/int8/oid` (or `float4/float8/numeric`) column falls through
to `toInt`/`toDouble`, which do:

```dart
try {
  return int.parse(value.toString()); // null → "null" → FormatException
} catch (_) {
  return null;
}
```

So every `postgres_changes` payload containing a null numeric column
throws (and immediately catches) `FormatException: Invalid radix-10
number (at character 1) null` inside the library.

The converted result is correct, but the exception-as-control-flow fires
on **every CDC frame** for any subscribed table with nullable numeric
columns. In practice this means anyone debugging a realtime Flutter app
with "break on all exceptions" enabled gets stopped in
`integers_patch.dart` constantly, with no way to silence it from app
code.

For reference, realtime-js doesn't have this problem: its `toNumber`
only parses `typeof value === 'string'` and passes null through
untouched.

## What is the new behavior?

- `convertCell` short-circuits `null` → `null`, matching its own
documented behavior and realtime-js
- `toInt`/`toDouble` use `tryParse` instead of `parse` inside try/catch,
so unparseable strings also no longer throw internally

Output is unchanged for every input — existing tests already pin
`convertCell('int8', null) => null` and `convertCell('float8', null) =>
null`, and they still pass. Added direct unit tests for
`toInt`/`toDouble` covering null, empty, and non-numeric inputs.

## Additional context

Repro: subscribe to `postgres_changes` on any table with a nullable
`integer` column, update a row while the column is null, run with a
debugger set to br... (continued)

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

5535 of 6378 relevant lines covered (86.78%)

3.92 hits per line

Jobs
ID Job ID Ran Files Coverage
7 supabase_flutter - 29563951630.7 17 Jul 2026 07:44AM UTC 10
79.31
GitHub Action Run
8 supabase - 29563951630.8 17 Jul 2026 07:45AM UTC 16
82.61
GitHub Action Run
9 realtime_client - 29563951630.9 17 Jul 2026 07:46AM UTC 11
90.11
GitHub Action Run
3 postgrest - 29417623650.3 15 Jul 2026 01:06PM UTC 10
85.33
GitHub Action Run
7 functions_client - 29417623650.7 15 Jul 2026 01:04PM UTC 3
98.85
GitHub Action Run
5 gotrue - 29417623650.5 15 Jul 2026 01:07PM UTC 28
87.6
GitHub Action Run
8 supabase_common - 29417623650.8 15 Jul 2026 01:04PM UTC 10
100.0
GitHub Action Run
9 yet_another_json_isolate - 29417623650.9 15 Jul 2026 01:04PM UTC 1
93.65
GitHub Action Run
2 storage_client - 29417623650.2 15 Jul 2026 01:06PM UTC 13
84.42
GitHub Action Run
Source Files on build 29563951630
  • Tree
  • List 102
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29563951630
  • 42068e47 on github
  • Prev Build on main (#29417623650)
  • Next Build on main (#29584102933)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc