Commit ebe4655
fix(ios): Resolve getNewScreenTimeToDisplay Promise with number not array (#6438)
* fix(ios): Resolve getNewScreenTimeToDisplay Promise with number not array
`getTimeToDisplay:` typed its block as `RCTResponseSenderBlock` (the
callback convention that wraps results in an `NSArray`), but it is only
invoked via the Promise-based `getNewScreenTimeToDisplay` bridge method,
whose `RCTPromiseResolveBlock` expects a raw value. The Promise therefore
resolved with a single-element array instead of a timestamp number. The
array survived the duration arithmetic via coercion but was assigned
directly as the TTID span's `timestamp`, producing a spurious
`deadline_exceeded` status and an inflated duration.
Retype the block to `RCTPromiseResolveBlock` and resolve with the raw
timestamp (and `nil` on non-iOS instead of an empty array). Adds a native
regression test asserting the resolve value is a scalar `NSNumber`.
Fixes #6433
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Update changelog
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Alexander <alex@apantiukhov.com>
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>1 parent ffe2d6c commit ebe4655
4 files changed
Lines changed: 29 additions & 5 deletions
File tree
- packages/core
- RNSentryCocoaTester/RNSentryCocoaTesterTests
- ios
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
33 | 56 | | |
34 | 57 | | |
35 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
0 commit comments