Sentry is not correctly logging SQL from SwiftData

RESOLVED FIXED

Status

()

Firefox for iOS
Data Storage
P1
normal
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: justindarc, Assigned: justindarc)

Tracking

unspecified
Other
iOS

Firefox Tracking Flags

(fxios9.0)

Details

(Whiteboard: [MobileCore][DataLoss])

Attachments

(1 attachment)

(Assignee)

Description

11 months ago
We currently print:

`"SQL error. Error code: \(error.code), \(error) for SQL \(sqlStr.characters.prefix(500))."`

to Sentry which is resulting in an error like:

SQL error. Error code: 1, Error Domain=org.mozilla Code=1 "SQL error or missing database no such table: tabs" UserInfo={NSLocalizedDescription=SQL error or missing database no such table: tabs} for SQL CharacterView(_core: Swift._StringCore(_baseAddress: Optional(0x00000001c44a8600), _countAndFlags: 39, _owner: Optional(Swift.ManagedBuffer<Swift._HeapBufferHeader<Swift._StringBufferIVars>, Swift.UInt16>)), _coreOffset: 0).

We need to convert `CharacterView` back to a `String` for Sentry to properly display it.
(Assignee)

Comment 1

11 months ago
Marking as P1 9.0 blocker and assigning to myself.

We may need to land this in a new beta ASAP to help track down the cause of Bug 1394185. NI? :farhan to give him a heads up that we may need to ship this fix while :st3fan is out.
Assignee: nobody → jdarcangelo
Blocks: 1394185
Status: NEW → ASSIGNED
Iteration: --- → 1.29
tracking-fxios: ? → 9.0
Flags: needinfo?(fpatel)
Priority: -- → P1
Whiteboard: [MobileCore][DataLoss]
(Assignee)

Comment 2

11 months ago
Created attachment 8901525 [details] [diff] [review]
GitHub Pull Request

Simple 2-line patch. We need to ship this in a beta right away.
Attachment #8901525 - Flags: review?(fpatel)
Comment on attachment 8901525 [details] [diff] [review]
GitHub Pull Request

Review of attachment 8901525 [details] [diff] [review]:
-----------------------------------------------------------------

Blargh, my bad.
Attachment #8901525 - Attachment is patch: true
Attachment #8901525 - Attachment mime type: text/x-github-pull-request → text/plain
Attachment #8901525 - Flags: review?(fpatel) → review+

Updated

11 months ago
Flags: needinfo?(fpatel)
You need to log in before you can comment on or make changes to this bug.