2

Basically as the title says.

I have a UUID field which is declared NOT NULL:

sheet_id TEXT AS UUID NOT NULL,

The field is mapped from a non-nullable field in our model class:

val sheetId: UUID,

But there has been a non-trivial number of Non-fatal Exception: android.database.sqlite.SQLiteConstraintException non-fatals logged for that field in Crashlytics. How is this possible?

The model/table in question has other NOT NULL UUID fields that don't seem to have this issue.

qtfw
  • 31
  • 3
  • Did you ever figure this out? I'm experiencing the same thing. – mtrewartha Jun 15 '21 at 15:50
  • @mtrewartha in the `.sq` file for my insert statements, instead of using `INSERT INTO VALUES ?;`, do it field by field `INSERT INTO
    (field1, field2, field3 ...) VALUES (?, ?, ? ...);` We stopped seeing that non-fatal after we started doing this.
    – qtfw Jun 17 '21 at 00:12
  • Interesting. The issue actually disappeared randomly for me, so it seems to be something transient, but I'll keep that in mind if I see it again. Thanks! – mtrewartha Jun 17 '21 at 02:19

0 Answers0