Back

[SOLVED] Updating Users Collection When Anon Session is Created

  • 0
  • Databases
  • Functions
punti_z
19 Feb, 2023, 23:35

The local IP address.. I checked that the ip added as endpoint works when accessing appwrite instance from a browser

TL;DR
Solution: The issue was resolved by using the correct endpoint URL, including the protocol "https://" and the "/v1" path. It was also recommended to use the user ID as the document ID for the collection of users. Additionally, error handling was suggested to be implemented.
punti_z
19 Feb, 2023, 23:36

But just the IP address and not /v1 unless that's needed ?

Drake
19 Feb, 2023, 23:37

LAN IP?

Drake
19 Feb, 2023, 23:37

You need the /v1. It should be https://[LAN IP]/v1. Make sure to call client.setSelfSigned() too

Drake
19 Feb, 2023, 23:38

Do you have an Ubuntu server?

punti_z
19 Feb, 2023, 23:38

Let me test and confirm in 10 minutes

punti_z
19 Feb, 2023, 23:39

I can provision one in DO in 5 mins .. Why do you ask ?

Drake
19 Feb, 2023, 23:39

No I'm trying to find out more information about your dev server

punti_z
19 Feb, 2023, 23:40

Oh na just a Dev windows desktop with docker desktop running appwrite .. Very basic

Drake
19 Feb, 2023, 23:40

And you're using your LAN IP and not some private docker IP right?

punti_z
19 Feb, 2023, 23:41

LAN IP indeed.. But if /v1 is required then thats the first issue .. I'll share an update in 5

Drake
19 Feb, 2023, 23:42

Btw, I'd use the user id as the document Id if this is supposed to be a collection of users

Drake
19 Feb, 2023, 23:43

And some error handling in here would be good

punti_z
19 Feb, 2023, 23:44

I did and will but due to it not working I really stripped everything fr the function

punti_z
19 Feb, 2023, 23:47

Nope .. Doesn't work even with /v1 added

punti_z
19 Feb, 2023, 23:49
Drake
19 Feb, 2023, 23:49

You're missing https://

punti_z
19 Feb, 2023, 23:49

Ah ok wait

punti_z
19 Feb, 2023, 23:51

Ok now I am embarresed .. That indeed worked 🫣🫣

punti_z
19 Feb, 2023, 23:51

Thanks so much and apologies for being a dummy

Drake
19 Feb, 2023, 23:51

No worries. I'm glad it's resolved

Drake
19 Feb, 2023, 23:52

[SOLVED] Updating Users Collection When Anon Session is Created

Ponguta_
20 Feb, 2023, 02:19

It must be https, or can we use http?

Drake
20 Feb, 2023, 02:22

I highly recommend always using https in case of redirect issues

Ponguta_
20 Feb, 2023, 02:25

Time to change all my functions envs! 😅

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