Skip to content
Back

appwrite self host ubuntu server, Flutter

  • 0
  • Flutter
Hassan
22 Feb, 2025, 22:46

i use ubuntu server and install appwrite (docker) when i login in flutter: account.createEmailPasswordSession(email: email, password: password) Error: Unhandled Exception: type 'Null' is not a subtype of type 'bool' the error in appwrite 14.0.0 package target.dart file (targets: List<Target>.from(map['targets'].map((p) => Target.fromMap(p))),)

factory Target.fromMap(Map<String, dynamic> map) { return Target( $id: map['$id'].toString(), $createdAt: map['$createdAt'].toString(), $updatedAt: map['$updatedAt'].toString(), name: map['name'].toString(), userId: map['userId'].toString(), providerId: map['providerId']?.toString(), providerType: map['providerType'].toString(), identifier: map['identifier'].toString(), expired: map['expired'], // this is null ); }

TL;DR
Developers are encountering an 'Unhandled Exception' in their Flutter app when trying to authenticate with Appwrite self-hosted on Ubuntu Server. The error points to a data type mismatch in the 'Target.fromMap' function in the Appwrite package code. The issue lies in the 'expired' field being null. To resolve the problem, developers should handle null values properly in the 'Target.fromMap' function, possibly by setting a default value or adding a null check.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more