Back

[SOLVED] Session expired error

  • 0
  • Web
  • Cloud
D5
2 Jun, 2023, 13:30

I mean, how are you using appwrite?

TL;DR
User is experiencing a session expired error. They have identified that React setState updates are asynchronous and may be causing a bug. They have also mentioned using Appwrite. No solution is provided in the thread.
KehindeJ
2 Jun, 2023, 13:30

To be honest, I don't know, I'm just following the documentation. What is the difference

D5
2 Jun, 2023, 13:30
D5
2 Jun, 2023, 13:30

True?

KehindeJ
2 Jun, 2023, 13:30

Yes.

D5
2 Jun, 2023, 13:31

If @joeyouss or @Steven could take a look into this issue?

KehindeJ
2 Jun, 2023, 13:33

Thank you so much, I'll appreciate it a lot. This has been giving me anxiety.

D5
2 Jun, 2023, 13:35

Yes, it's a bit weird. I suppose it's more like a mistake in the code, but if they could take a look I think it's going to be better, since I have less experience with Js/web frameworks, etc

KehindeJ
2 Jun, 2023, 13:35

Thank you so much.

D5
2 Jun, 2023, 13:38

If you're using any web framework, specify it here, to make it easier to find the problem

KehindeJ
2 Jun, 2023, 13:39

I'm using React

KehindeJ
2 Jun, 2023, 13:39

The app had been working fine until yesterday (I'm still working on the app though).

D5
2 Jun, 2023, 13:40

Maybe there's a conflict with the changes you've made?

KehindeJ
2 Jun, 2023, 13:43

Well, I don't think that's the problem. But I'll check again

KehindeJ
2 Jun, 2023, 13:57

You were right!. I just checked it and I noticed there is a bug that dosen't immediately update the local storage since React setState updates are asynchronous

D5
2 Jun, 2023, 13:57

So that solves it?

D5
2 Jun, 2023, 13:58

Seems like then it overwrites what appwrite stored (session)?

KehindeJ
2 Jun, 2023, 13:58

It should. Once I figure out how to fix the bug πŸ˜† .

D5
2 Jun, 2023, 13:59

Be careful that doesn't creates another new bug πŸ˜… (the bug fix)

KehindeJ
2 Jun, 2023, 14:00

The appwrite stored session works fine. I monitored it in the storage tab in my browser, Once I log out, the session is removed and once I log in, it is restored which I guess is should be the expected behavior.

KehindeJ
2 Jun, 2023, 14:02

I hope so too πŸ˜… . I'll have to brush up on how React handles state updates. Something new to learn πŸ˜… . Thank so much for your help.

D5
2 Jun, 2023, 14:03

Can I mark this as solved then?

D5
2 Jun, 2023, 14:04

If you continue having the problem write here again or create a new post

KehindeJ
2 Jun, 2023, 14:05

You can! Thank You.

D5
2 Jun, 2023, 14:08

[SOLVED] Session expired error

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