Automatically redirected to "undefined user" page after logging in

Platform (Android, iOS, Website): Windows 10, iNaturalist desktop website.

Browser, if a website issue (Firefox, Chrome, etc) : Firefox 92.0.1 (64 bits)

URLs (aka web addresses) of any relevant observations or pages: https://www.inaturalist.org/users/undefined

Screenshots of what you are seeing (instructions for taking a screenshot on computers and mobile devices: https://www.take-a-screenshot.org/):

Description of problem (please provide a set of steps we can use to replicate the issue, and make as many as you need.):

Step 1: Click on my iNaturalist bookmark (https://www.inaturalist.org/home). As per subject (https://forum.inaturalist.org/t/im-being-automatically-logged-out-of-inaturalist/20332), I then now need to log in since I am never remembered anymore, although the “remember me” button is ticked.

Step 2: I fill my details in and proceed to the site.

Step 3: I am automatically redirected to an “undefined user” page instead of my personal profile. This is new as of no more than a week. As it may be seen on the screenshot, my profile is well logged in, as one can see when hovering my avatar in the upper right corner.

Step 4: Clicking on my avatar finally leads me to my profile.

as it’s a regular user page, I think something triggered the search of it and now your browser just remembered this page, when you log in browser always directs you to the page you opened initially, so it leads me to believe it’s the page that is saved in its memory. Could you provide what your bookmark looks like to see if it’s true or not?

Hi @fffffffff / Marina,

And thanks for replying.
But I’m not sure that this is how it works. My bookmark is set to https://www.inaturalist.org/home (and correctly working for years now
), and leads me to https://www.inaturalist.org/users/sign_in since I am not logged in.

It is when I hit the “Connexion” button that I am redirected to the “undefined user” page.

1 Like

@pisum could you check this problem here?

i don’t have time to look deeply into this this morning, but if someone else wants to look into it first, the couple of things i would check first are:

  1. that the connexion link is taking chris971 to /users/sign_in instead of /login. for someone trying to reproduce the problem, i would have them try to logging in through /users/sign_in. or for someone trying to avoid the problem, i would have them try logging in through https://www.inaturalist.org/login. (i thought i saw something recently where for most languages you should be directed to /login now, but obviously chris971 is still being directed to /users/sign_in for some reason. i wonder which language he is set up for?)
  2. it looks like he might be signing in using an e-mail address rather than an iNaturalist login. that should be fine either, but i wonder if that triggers a slightly different path for logging in? so for someone trying to reproduce the problem, i would try logging in via e-mail, and for someone trying to avoid the problem, i would try logging in using iNaturalist login.

I logged in to my husband’s acc with email and it’s working as intended, going to home page, so there should be more to that.

Thanks, @pisum, for stepping in.

  • I confirm that when trying to open the /home page if not logged in, I am redirected to /users/sign_in ant not to /login.

  • The second problem is that it is not a systematic issue. I would say, it happens every day for my first logging to the website (btw, I am working with the French language enabled). But for instance, I just have logged in again this afternoon, and have been correctly redirected to my personal profile page after hitting the “Connexion” button (yes, always not yet remembered
). So, unfortunately, it is still a “sometimes happening” issue.

  • I’ll try tomorrow to log in with my username instead and see what happens.

2 Likes

okay. i looked at this for a while.

there does appear to be a legitimate minor bug here in that going to https://www.inaturalist.org/home when you’re not already logged in will redirect you to https://www.inaturalist.org/users/sign_in instead of https://www.inaturalist.org/login. (going to https://www.inaturalist.org will redirect you to https://www.inaturalist.org/login .) @tiwane and crew might want to look at addressing that inconsistency.

that said, i wasn’t able to find a way to consistently reproduce your problem. i couldn’t reproduce anything like what you were describing in Firefox at all, and i couldn’t reproduce anything like that in Chrome either. i was able to encounter a slight bug(?) in Edge which was similar but not exactly what you were describing. for a while, i thought i had found a pattern that would consistently reproduce my problem in Edge, but then it stopped being consistent, and now i can’t reproduce the problem at all. so i think whatever the problem was is going to be really hard to track down without a lot of effort.

that said, i suspect that the problem will be easy to work around. instead of navigating to https://www.inaturalist.org/home, just change your shortcut to take you to https://www.inaturalist.org. if you’re not already logged in, that page will provide a link that takes you to https://www.inaturalist.org/login instead of https://www.inaturalist.org/users/sign_in to log in. after a successful sign-in, you will still be redirected to https://www.inaturalist.org/home. (alternatively, you could change your shortcut to take you directly to https://www.inaturalist.org/login, which should automatically redirect you to https://www.inaturalist.org/home if you’re already logged in.)

the reason that i suspect that will help you avoid the problem is that logging in through https://www.inaturalist.org/users/sign_in seemed to be one of the required triggers for the problem that i saw. below is the set of steps that seemed to lead to the small bug(?) that i saw. it was very consistent over many repetitions, until it wasn’t:

  1. start signed out of iNaturalist and without Edge open.
  2. open up Edge
  3. in your new session, go to https://www.inaturalist.org/home. this will redirect you to http://www.inturalist.org/users/sign_in.
  4. sign in using iNaturalist user ID (not e-mail), making sure you check the Remember Me option. upon a successful login, you should be redirected to https://www.inaturalist.org/home.
  5. sign out of iNaturalist.
  6. close Edge. wait a moment to make sure it’s fully close down.
  7. open up Edge.
  8. navigate to https://www.inaturalist.org (not /home). since i had previously signed in with the Remember Me option, i would expect this to redirect me to https://www.inaturalist.org/home, but it just shows me https://www.inaturalist.org as if i hadn’t logged in.
  9. clicking the browser reload button or clicking on the page’s link to log in will then redirect me to https://www.inaturalist.org/home without having to actually log in.

so the problem encountered in step 8 was not exaclty what you were seeing, but i suspect they are related. it’s hard to tell now, since i can no longer consistently reproduce the problem, and i think the better course of action rather than trying to go after whatever this problem might be is just to work around the problem for now until iNat staff can have https://www.inaturalist.org/home redirect to https://www.inaturalist.org/login when it needs you to log in.

2 Likes

Thanks, I’ll add it to my report.

FWIW I use https://www.inaturalist.org/home and can’t replicate the issue.

3 Likes

I’m getting the error too. From memory it seems to happen when the remember me box is unselected on the login and I select it prior to logging in. If that box is already activated it doesn’t happen.

Should add it only started doing this 4 or 5 days ago.

1 Like

are you able to reproduce this consistently? if so, what are your exact steps?

1 Like

Many thanks for the time you took @pisum !

As i needed to log in this morning to be able to check my messages, it was prior to read your long text. So I just did what I had planned yesterday, logging in with my ID (not my email), but from my usual bookmark. So /home took me to /users/sign_in, and hitting “Connexion” opened again the undefined user page.

I’ll try to check your steps later today.

Best,
Christophe

Well the 1st thing I need is for the site to for whatever reason ‘forget’ me which I don’t know how to manually force, but which seems to happen every 2 to 3 days for me.

uploading an observation (or uploading a dummy observation and then deleting it) works for me and at least a couple of others. the next time you close and reopen your browser, you should be forced to log in when you go to the iNat website.

Hi @pisum

I have followed your steps. Everything went as described except for step 9


  • Clicking the reload button
 just reloaded the page, as if I was not logged in (which was the case)
  • Clicking on the log in link redirected me to https://www.inaturalist.org/login in order to log in.

Christophe

then this means that you did not encounter the problem that i saw and you’re still just getting your Remember Me selection revoked.

i think for now (unless anyone else can describe a set of consistent steps to reproduce your issue), you should just try to change your shortcut from https://www.inaturalist.org/home to https://www.inaturalist.org or https://www.inaturalist.org/login and see you still ever get redirected to the undefined page after that. (hopefully that small change will prevent the problem.)

1 Like

Just happened on its own after my wireless hiccuped and I had to reboot.

Navigate to https://www.inaturalist.org/users/sign_in

User name and password are already filled in for me.

Click the Remember Me option

After clicking login, sent to the ‘Undefined User’ page.

Just modified my bookmark. I will check tomorrow morning how it goes. Thanks.

1 Like

next time, would you try going to https://www.inaturalist.org/login instead and see if you still get the undefined user thing?

(i couldn’t reproduce the problem using the steps you outlined.)

I can try, but that is the page you (or at least I do) that you are redirected to if you go to /home and the site has forgotten you.