Back

[SOLVED] "Connection refused" - Cant connect Windows app with Appwrite

  • 0
  • Flutter
safian_haq
2 Sep, 2023, 15:23

I'm learning how to use appwrite and wanted to create a windows application which uses appwrite.

The appwrite server is self hosted locally and I have sucessfully used the auth functions on an Android emulator. I'm using Flutter and Dart to create a Windows version of the app, but I'm unable to actually connect to the appwrite instance.

The following is the endpoint that I'm using (which I'm guessing is the issue):

"https://localhost/v1"

Can someone help with this?

TL;DR
User is unable to connect a Windows app to Appwrite, receiving a "Connection refused" error. The solution is to add the Windows platform to the application in the Appwrite console and use the correct endpoint, such as "http://localhost:99/v1" when self-hosting. Upgrading the Appwrite version may also help resolve the issue.
D5
2 Sep, 2023, 15:31

You're hosting your appwrite instance locally in your computer, I guess?

D5
2 Sep, 2023, 15:32

If so, instead of localhost, you will need to set your computer's local IP address

safian_haq
2 Sep, 2023, 16:57

@D5 Yep doing that but still facing the same isse.

safian_haq
2 Sep, 2023, 16:58

Out of all the adapters listed I'm using the "Wireless LAN adapter Wifi"

Should I use another one as I tried all of them and it didn't work.

safian_haq
2 Sep, 2023, 16:59

The first one is the connection string that I'm using.

D5
2 Sep, 2023, 20:38

@safian_haq What's your appwrite version?

D5
2 Sep, 2023, 20:44

Also, do you can access your appwrite instance by running localhost in your browser or the IP?

safian_haq
3 Sep, 2023, 18:08

Can access the appwrite instance by using localhost in my browser. Also can access appwrite from Android using the 10.0.2.2 IP address.

I had 1.3.8, just upgraded to 1.4.1 today, will share if the issue still persists.

D5
3 Sep, 2023, 18:14

Then you can use localhost

D5
3 Sep, 2023, 18:15

But you need to add it as flutter app in the console

safian_haq
3 Sep, 2023, 18:21

Can you please explain this a little bit or share a link?

safian_haq
8 Sep, 2023, 14:01

Ok turns out, I had not added my Windows platform to application.

-_-

Thanks for the help @Steven and @D5

D5
8 Sep, 2023, 14:13

I see. Great!

D5
8 Sep, 2023, 14:13

[SOLVED] "Connection refused" - Cant connect Windows app with Appwrite

safian_haq
8 Sep, 2023, 14:19

Also for anyone who faces the "semaphore timeout error" in Windows double check your client.endPoint. When self hosting the following address worked for me: "http://localhost:99/v1"

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