Back

[SOLVED] Flutter macOS: AppwriteException: null, Connection failed (0)

  • 0
  • Flutter
  • Cloud
StefanB
15 May, 2023, 11:37

I try to connect with Cloud beta current version via macOS Flutter app (iOS is working) I get following error: AppwriteException: null, Connection failed (0) after _account.createEmailSession I added the macOS platform in the dashboard under the project Any ideas whats causing this error?

appwrite: ^9.0.0 flutter: 3.7.12

TL;DR
The user was experiencing a connection failed error (AppwriteException: null, Connection failed (0)) on a Flutter macOS app. The solution was to grant internet permissions by following the guidance in this Stack Overflow post: <https://stackoverflow.com/questions/61196860/how-to-enable-flutter-internet-permission-for-macos-desktop-app>. The user confirmed that this solution worked.
safwan
15 May, 2023, 11:53

The same code works perfectly fine for iOS?

safwan
15 May, 2023, 11:53

Have you followed this for macOS?

StefanB
15 May, 2023, 11:57

Yes I added the platform Maybe the package name must be different to the iOS app?

Binyamin
15 May, 2023, 14:16

Can you share the code in which you're connecting the client to Appwrite cloud

StefanB
15 May, 2023, 16:23

In short:

TypeScript
final client = Client(endPoint: "https://cloud.appwrite.io/v1");
_account = Account(client)

final session = await _account.createEmailSession(
      email: username,
      password: password,
    );

I have only one instance of client for all requests

wadman
15 May, 2023, 17:50

in the cloud already updated to version 1.3.x for client version 9.0.0?

Binyamin
15 May, 2023, 17:51

No, 8.1.0

StefanB
15 May, 2023, 17:56

can this cause the issua although ios is working?

Binyamin
15 May, 2023, 17:56

I don't think so but it's worst a shot

Drake
15 May, 2023, 19:00

have you granted internet permissions?

StefanB
15 May, 2023, 19:12

where do I need to do this?

StefanB
15 May, 2023, 19:16

Solved, thanks a lot! Following the first answer will help out

StefanB
15 May, 2023, 19:17

[SOLVED] Flutter macOS: AppwriteException: null, Connection failed (0)

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