Back

[Solved] 404 in flutter

  • 0
  • Flutter
  • Accounts
Ipsoka
27 Mar, 2023, 20:56

Im running my appwrite instance locally for development purpuses, and whenever I do a request (e.g. creating an account) I get 404. Why is that?

` client = Client() .setEndpoint("https://172.20.163.38:80/v1") <-- local ip of my WSL2 .setProject("12345...") .setSelfSigned(status: true);

var account = Account(client);

account.create( userId: ID.unique(), email: "&#97;&#98;&#99;&#64;&#x6d;&#x61;&#x69;&#108;&#46;&#x64;&#x65;", password: "fake_password", );`

Im running appwrite inside WSL2, might that cause problems?

TL;DR
Issue: Getting a 404 error when making requests in a Flutter app using Appwrite locally. Solution: Remove the ":80" port from the endpoint URL. Explanation: The user was running Appwrite inside a WSL2 instance and was encountering a 404 error when making requests. The solution provided was to remove the ":80" port from the endpoint URL in the Flutter app. After removing the port, the issue was resolved and requests were successful.
Binyamin
27 Mar, 2023, 20:56

Take out the :80 port and try again

Binyamin
27 Mar, 2023, 20:57

but you should be able to point 'https://127.0.0.1/v1` if you've opened the 80 port

Ipsoka
27 Mar, 2023, 20:59

Taking out the port worked!

Ipsoka
27 Mar, 2023, 20:59

[Solved] 404 in flutter

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