Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to log in #371

Open
OlaFosheimGrostad opened this issue Apr 16, 2022 · 20 comments
Open

unable to log in #371

OlaFosheimGrostad opened this issue Apr 16, 2022 · 20 comments

Comments

@OlaFosheimGrostad
Copy link

When logging in I get "https://ide.csound.com/profile/undefined" and is redirected to "https://ide.csound.com/404".

@hlolli
Copy link
Member

hlolli commented Apr 16, 2022

how are you logging in, with facebook/gmail/email?

@vlazzarini
Copy link
Member

vlazzarini commented Apr 17, 2022

that's happening on my iphone with safari, I have not checked on the desktop. I'm logging in with my email.

Maybe the accounts server is down?

@OlaFosheimGrostad
Copy link
Author

I used Chrome on Mac, I am logging in with my email.

@vlazzarini
Copy link
Member

I can't login either from desktop on Chrome. I can load projects with links, and I can run them. Looks like the password server might be busted.

If I try to login with Facebook credentials, I get

Firebase: Invalid IdP response/credential: https://csound-ide.firebaseapp.com/__/auth/handler?error_code=1349126&error_message=App+not+set+up:+This+app+is+still+in+development+mode,+and+you+don't+have+access+to+it.+Switch+to+a+registered+test+user+or+ask+an+app+admin+for+permissions.&_=_ (auth/invalid-credential-or-provider-id).  [Dismiss](javascript:void(0))

@vlazzarini
Copy link
Member

vlazzarini commented Apr 17, 2022

However, I can login with google and access a profile. With this, the link under "profile" does not go to "undefined". That may be the issue.
Also, when trying to log in with my email, the profile photo does not appear.

@hlolli
Copy link
Member

hlolli commented Apr 17, 2022

For me firefox and chrome work fine. But the bug lies in the password based login vs google oauth. I'm working on a fix (along with other regressions that came about).

@hlolli
Copy link
Member

hlolli commented Apr 17, 2022

I am suspecting now that these are two different issues reported here.

The /profile/undefined I was able to reproduce when creating new account. There seems to be a bug with the profile completion step, for which I've pushed a fix hopefully fixing @OlaFosheimGrostad's issue.

As for the login mechanism failing, I'm unable to reproduce, I may suspect cache?

For the other comment, when logging in with email vs google, that the profile isn't visible. It's a use case that I didn't fully consider. I fear we are creating 2 different users when the same email is provided to email login or google oauth login. There's a way to unify identity with oauth, I need to look into that, to make that behavior automaitc. I fear at this stage, that it's better to stick with always google or always email.

@vlazzarini
Copy link
Member

I tried to log in now from my phone into my email-based account. I could login, but my account avatar did not load and clicking on "profile" led me to the same 404 error.

I don't think it is to do with cache.

@hlolli
Copy link
Member

hlolli commented Apr 18, 2022

@vlazzarini I see so it sounds like to me that the email-based account is a different user entity in our database and it doesn't have a username yet, which you pick after the account is created. That explains what I noticed, that /profile/undefined is a result of incompleted account creation process. A process which had a bug which I hoped to have changed yesterday. Try logging in and out in a desktop, and see if you get a modal window offering you to select username, bio, description etc.

@vlazzarini
Copy link
Member

But I had an account for over two years. Does it mean it's lost?

@hlolli
Copy link
Member

hlolli commented Apr 18, 2022

No absolutely not. Let me look deeper into this. I'm just theorizing that your main account is the one where you don't get /undefined, there's nothing disappeared?

@vlazzarini
Copy link
Member

Ok, this looks like a Chrome-specific issue at least on the desktop.
I can log in and go to my profile on Safari, while on Chrome, after logging in, my profile is still "undefined". I can go directly to my profile by passing the URL with my username. It takes a while for the page to be populated with my projects and at the corner, I still see a "login" button as if I had not logged in. If I click on a project, I can edit it.

Maybe it's cache after all?

@vlazzarini
Copy link
Member

I cleared the cache and I still get the same results.

@hlolli
Copy link
Member

hlolli commented Apr 19, 2022

ok thanks for your patience here @vlazzarini

my current theory is this is your profile https://ide.csound.com/profile/vlz ?

all good nothing's gone!

the part where I'm still trying to understand, is if firebase/google, know that the email/password account is one and the same account as google-oauth login. I'm theorizing that the way use go about logging forces you into certain profile, regardless of if the email used is the same for googel-oauth or email/password, that these are two different accounts. If not, it's still important for me to debug this, to know yes the browser and environment, but also, if this behavior is the same regardless of how you log in.

@vlazzarini
Copy link
Member

yes, that's my profile and I can access it. But I can't login and go to it from Chrome.

If I use google OAUTH, I think I end up in a different profile, because the email is different.

I'm not concerned about my own account. What I'm worried is for other users who might get stuck (I have a class using the IDE).

@hlolli
Copy link
Member

hlolli commented Apr 19, 2022

to narrow it down

Firefox/Safari: login with email works
Chrome: login with email fails (undefined profile)

You nuked the cache, just for completion, when you try to login using "In-Cognito" that also fails the same way (in cognito is another nice way to rule out cache issues)?

@hlolli
Copy link
Member

hlolli commented Apr 19, 2022

btw I'll try to do something about cache invalidation, I bet full class of students with cache issues isn't the most fun situation to be in.

@hlolli
Copy link
Member

hlolli commented Apr 19, 2022

it seems index.html is not cached

> curl -I https://ide.csound.com                                                                                                                   openjdk
HTTP/2 200
cache-control: max-age=0,public,must-revalidate
content-type: text/html; charset=utf-8
etag: "2262ea5db773cc88278439fdb5c1052a19626dd186249bd4f7ae3819d975b70a"
last-modified: Mon, 18 Apr 2022 20:38:15 GMT
strict-transport-security: max-age=31556926
accept-ranges: bytes
date: Tue, 19 Apr 2022 18:38:41 GMT
x-served-by: cache-fra19136-FRA
x-cache: MISS
x-cache-hits: 0
x-timer: S1650393521.398741,VS0,VE76
vary: x-fh-requested-host, accept-encoding
content-length: 1194

but some assets like runtime-main.js is

2022-04-19 20 40 50

this could explain strange behavior, since we updated so many npm packages since last deployment

cc. @eddyc @kunstmusik

should be relatively easy to fix

@vlazzarini
Copy link
Member

vlazzarini commented Apr 19, 2022

it's working on my phone both with Safari and Chrome now. I can't check on desktop at the moment but will try later.

@vlazzarini
Copy link
Member

yes, I can confirm now that I can log in and go to my profile on Chrome. Whatever you've done seems to have fixed it, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants