Hero
It's recommended to initalise the client object only once and pass it everywhere
Votes
0
Replies
24
Participants
Unknown
Messages
25
Hero
It's recommended to initalise the client object only once and pass it everywhere
Hero
also your project Id is still wrong
Rank 1: Thread
done that also, but still i'm getting the error
Rank 1: Thread
Rank 1: Thread
How can i correct my project id?
Hero
show your client instance
Hero
your projectId ( a lont 32 char text) and you passed "neop" in the previous screenshots
Rank 1: Thread
i tried with both
Rank 1: Thread
@Maniac_Fighter , i've changed "neop" to "32char text project id" but now i'm getting another error
Rank 1: Thread
Rank 1: Thread
it's working, but why i'm getting the error "Invalid Origin. Register your new client (com.example.neop) as a new Android platform on your project console dashboard"
Hero
Have you added the project in the appwrite console?
Rank 1: Thread
i added in appwrite dashboard .
Rank 1: Thread
How can i add project into appwrite console
Hero
they are same
Hero
can you show the appwrite dashboard?
Rank 1: Thread
Hero
and can you see your platform with the id (com.example.neop)
Hero
below?
Rank 1: Thread
Rank 1: Thread
Rank 1: Thread
please help @Maniac_Fighter
Hero
No idea what's the issue here. Maybe look at this ?(https://github.com/appwrite/appwrite/issues/743)
Admin
Make sure there aren't any extra spaces. And make sure this is the right project
@gopal I noticed you're initializing your client like this:
Client() ..setEndpoint('endpoint-here') ..setProject('project-id-here') ..setSelfSigned(status: true);Have you tried creating an instance of the client first? I've faced issues at times when using the class constructor by itself to access it's methods. Try this and see if it works:
Client client = Client();client .setEndpoint('endpoint-here') .setProject('project-id-here') .setSelfSigned(status: true);