-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
Description
Context
When I run the app in ios emulator (that had data before the big plans PR in flutter side) I get this error:
flutter: The following _$ApiError_WhitenoiseImpl was thrown initialize:
flutter: ApiError.whitenoise(message: Database error: SQLx error: error occurred while decoding column
flutter: "last_synced_at": mismatched types; Rust type `core::option::Option<i64>` (as SQL type `INTEGER`) is
flutter: not compatible with SQL type `TEXT`)
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 SimpleDecoder.decode (package:flutter_rust_bridge/src/codec/base.dart:32:9)
flutter: #1 SseCodec._decode (package:flutter_rust_bridge/src/codec/sse.dart:45:55)
flutter: #2 SseCodec.decodeObject (package:flutter_rust_bridge/src/codec/sse.dart:35:12)
Steps to reproduce
- Run an ios emulator that had data before the big plans refactor Change bridge to match new methods #530
- Login with an account that you already had used in whitenoise
Solution?
- I suspect the issue comes from the conversion in
accounts.rs:pub last_synced_at: Option<DateTime<Utc>>
- Not sure yet whether the fix should be on the Flutter side, the Rust side, or both.
- This issue is mainly to investigate why this mismatch is happening and decide where the fix belongs.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done