Back

[SOLVED] Getting error Unexpected '<' when trying to login in appwrite cli

  • 0
  • Functions
AYUSH
15 Mar, 2023, 05:11
TL;DR
The user was getting an error "Unexpected '<' when trying to log in the appwrite CLI. The issue was resolved by setting the correct API endpoint using the command `appwrite client --endpoint https://[HOSTNAME_OR_IP]/v1`. If the issue persists, the user was advised to check if they could access the target from the command line and try running the prebuilt darwin binary from a specific GitHub release.
Binyamin
15 Mar, 2023, 05:16

Try to run the prebuilt darwin binary from here

https://github.com/appwrite/sdk-for-cli/releases/latest

AYUSH
15 Mar, 2023, 05:22

not working 😦

Binyamin
15 Mar, 2023, 05:25

Ohhh I think maybe your domain retuns an HTML content in which give the parser the < character Check that you can access the target from your command line

Binyamin
15 Mar, 2023, 05:27

You can set the endpoint as follows appwrite client --endpoint https://[HOSTNAME_OR_IP]/v1

AYUSH
15 Mar, 2023, 05:29

getting this:- appwrite client --endpoint https://cloud.appwrite.io/v1 ✓ Success

Binyamin
15 Mar, 2023, 05:29

Run like this

Binyamin
15 Mar, 2023, 05:30

appwrite client login --endpoint https://[HOSTNAME_OR_IP]/v1

AYUSH
15 Mar, 2023, 05:30

do i need to add api endpoint in appwrite before login ?

Binyamin
15 Mar, 2023, 05:30

Maybe if you had one in the past. Try to login with the endpoint

Binyamin
15 Mar, 2023, 05:32

Sorry. Just try to login after you have set the client

AYUSH
15 Mar, 2023, 05:32

yes i am doing that.

AYUSH
15 Mar, 2023, 05:33

Thanks now its working 🙂

Binyamin
15 Mar, 2023, 05:33

Good What I think happend is that somehow the cli interface tried to log to a different location in which the answer was in HTML instead of JSON and there you got you < error

Binyamin
15 Mar, 2023, 05:34

😀

AYUSH
15 Mar, 2023, 05:34

ok

AYUSH
15 Mar, 2023, 05:39

[SOLVED] Getting error Unexpected '<' when trying to login in appwrite cli

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