Skip to content

Code not working properly with Appwrite 9.0.1  #3

@rsbichkar

Description

@rsbichkar

Hi,
Thank you very much for this flutter twitter clone. I am learning to use Riverpod with AppWrite from your project.

However, I faced some issues while working with Appwrite 9 version in Flutter 3.10.6 (latest stable version). I am currently using Appwrite 1.3.8 local version. Also tested it with AppWrite Cloud. The model.Account was replaced by model.User in AuthAPI and AuthController files. Also the stack trace demangling was used.

void main() {
  runApp(
    const ProviderScope(
      child: MyApp(),
    ),
  );
  FlutterError.demangleStackTrace = (StackTrace stack) {
    if (stack is stack_trace.Trace) return stack.vmTrace;
    if (stack is stack_trace.Chain) return stack.toTrace().vmTrace;
    return stack;
  };
}

The issues faced are as follows:

  1. After a user logs out and another user logs in the profile page still shows the old user which is also used for the Tweets
  2. The error 'Null check operator used on a null value' is thrown for the following line in currentUserDetailsProvider definition:
  final currentUserId = ref.watch(currentUserAccountProvider).value!.$id;
  1. Also Realtime subscription is lost
flutter: subscription: ws://192.168.1.148:4003/v1/realtime?project=64b3ea1af0287f509fa5&channels%5B%5D=databases.64b3ecdbe0aea219dd76.collections.64c4cdd09a56cf2bd378.documents
flutter: subscription: null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions