Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

signup does not work #205

Closed
Enteee opened this issue Nov 25, 2019 · 16 comments
Closed

signup does not work #205

Enteee opened this issue Nov 25, 2019 · 16 comments

Comments

@Enteee
Copy link

Enteee commented Nov 25, 2019

When I try to register I do get:

You must provide param `error` to `generate`.

and:

m@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4387:23
g[1]@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4396:60
A.prototype.generate@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4429:33
z</r._updateURL@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4642:23
z</r.finalizeTransition@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4625:120
z</r.getTransitionByIntent/r.promise<@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4619:255
w@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4702:12
_@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4700:128
p</t.invoke@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4235:163
p</t.flush@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4227:74
m</t.flush@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4240:358
q</r._end@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4302:9
q</r.end@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4257:230
q</r._run@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4304:118
q</r.run@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4266:13
c@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:3116:27
authenticate/</<@https://www.opensource-challenge.ch/assets/opensource-challenge-client-67d354fb0ec5aea26e918896a7d41a0a.js:16:143
w@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4702:12
_@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4700:128
v@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4698:107
p</t.invoke@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4235:163
p</t.flush@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4227:74
m</t.flush@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4240:358
q</r._end@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4302:9
e/this._boundAutorunEnd@https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4252:574
@nerrehmit
Copy link

Hi,
Sorry about that. Once you click on "Sign in" there should be another smaller browser window prompting you to sign in to github. Do you see that second window?
I can reproduce the "error" you are getting by simply closing said window without authenticating to github.
Check if you maybe have an extensions blocking it.

@olibrian
Copy link
Member

olibrian commented Nov 25, 2019

could be the same issue as mention in #71 ?

if so, who could help?

@Enteee
Copy link
Author

Enteee commented Nov 26, 2019

This happens after I did confirm the popup dialog. Hence after I let your application have access to my github account.

I did try this with firefox and chrome, as well as a chrome instance with all popup and script blockers deactivated. I do think there is something in my profile which you don't handle properly in the application. Just a wild guess which might be completely unrelated, but maybe you don't handle Github PRO accounts properly? Not that I think that they are much different from other accounts...

@Enteee
Copy link
Author

Enteee commented Nov 26, 2019

Just noticed that I do seem to get a different stacktrace in chrome:

You must provide param `error` to `generate`.

Show stack
Error: You must provide param `error` to `generate`.
    at m (https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4387:23)
    at Array.<anonymous> (https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4396:59)
    at A.generate (https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4429:33)
    at u._updateURL (https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4642:23)
    at u.finalizeTransition (https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4625:120)
    at https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4619:255
    at w (https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4702:12)
    at _ (https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4700:128)
    at https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4235:163
    at e.flush (https://www.opensource-challenge.ch/assets/vendor-516db705de5657305fa857ec73629e34.js:4227:74)

@Enteee
Copy link
Author

Enteee commented Nov 27, 2019

pretty sure that the error message / stack traces are just an artifact of some bodged error handling here. And therefore provide no useful information. They are basically hiding the real hiccup. Which is reviled when looking at the console: It seems like app/authenticators/osc.js tries to request /api/v1/tokens via mirage in an incorrect way.

Which then returns with:

Mirage: [500] POST /api/v1/token mirage-esm.js:6910:19

and Response body:

{
  "message": "tokens is undefined",
  "stack": "Mirage: Your POST handler for the url /api/v1/token threw an error:\n\n_default/<@http://localhost:4200/assets/opensource-challenge-client.js:4095:9\nhandle@webpack://__ember_auto_import__/./node_modules/miragejs/dist/mirage-esm.js?:2813:19\n_getMirageResponseForRequest@webpack://__ember_auto_import__/./node_modules/miragejs/dist/mirage-esm.js?:3326:31\nhandle@webpack://__ember_auto_import__/./node_modules/miragejs/dist/mirage-esm.js?:3306:19\n_registerRouteHandler/<@webpack://__ember_auto_import__/./node_modules/miragejs/dist/mirage-esm.js?:7845:31\nhandleRequest@webpack://__ember_auto_import__/./node_modules/pretender/dist/pretender.es.js?:399:30\nsend@webpack://__ember_auto_import__/./node_modules/pretender/dist/pretender.es.js?:186:21\nfetch/<@http://localhost:4200/assets/vendor.js:86584:15\ninitializePromise@http://localhost:4200/assets/vendor.js:78674:15\nPromise@http://localhost:4200/assets/vendor.js:79196:35\nfetch@http://localhost:4200/assets/vendor.js:86521:16\nself.default@http://localhost:4200/assets/vendor.js:86623:27\nmakeRequest/<@http://localhost:4200/assets/vendor.js:141295:28\ninitializePromise@http://localhost:4200/assets/vendor.js:78674:15\nPromise@http://localhost:4200/assets/vendor.js:79196:35\nmakeRequest@http://localhost:4200/assets/vendor.js:141294:14\nauthenticate/<@http://localhost:4200/assets/opensource-challenge-client.js:196:14\ninitializePromise@http://localhost:4200/assets/vendor.js:78674:15\nPromise@http://localhost:4200/assets/vendor.js:79196:35\nauthenticate@http://localhost:4200/assets/opensource-challenge-client.js:190:14\nsuperWrapper@http://localhost:4200/assets/vendor.js:48090:22\nauthenticate@http://localhost:4200/assets/vendor.js:141782:28\nauthenticate@http://localhost:4200/assets/vendor.js:142689:22\n_toriiLogin@http://localhost:4200/assets/opensource-challenge-client.js:5984:35\n"
}
from mirage-esm.js:6928:19

My best guess is that this happens probably because the ember-simple-auth plugin was updated quite a few times [1] [2], without changing the custom authenticator provider

@Robin481
Copy link

Robin481 commented Nov 28, 2019

Tried using older versions of ember-simple-auth, sadly those didn't solve the problem.
Error happens here:

return { access_token: tokens.first().attrs.accessToken }

Trying to find out what is happening.

@topaxi
Copy link
Member

topaxi commented Nov 28, 2019

Everything related to mirage does not relate to any problem in production, as mirage is only a mock api to be used locally if you do not run the real backend. I don't think it is possible to login to the development build without running the real API aswell.

@Robin481
Copy link

Thanks for the hint @topaxi , do you have any ideas to where the problem might be or how to debug it more efficiently?

@TheWalkingLeek
Copy link

As far as i can see it seems like this You must provide param error to generate. error seems to be happening on

this.transitionTo('error', err)

Because the given model (in this case the variable err) is not correctly being serialized (https://api.emberjs.com/ember/3.12/classes/Route/methods/transitionTo?anchor=transitionTo). Thus ember dying. When i was testing locally i even had the value false in the err variable which does definitely not seem healthy.
But this would also mean that there is an error happening before this one and therefore not solve the original problem...

@felixfontein
Copy link

I'm also still getting this error message. But today I noticed that I'm actually logged in afterwards, so this issue is not that critical anymore - at least for me :)

@Robin481
Copy link

Robin481 commented Dec 4, 2019

@felixfontein this is actually right.
There was a redeploy with a small fix and this seems to sort of fix it.
For now trying to log in two times fixes this issues. Although this is not optimal it's a good solution for the moment.

@felixfontein
Copy link

That's definitely not optimal, but works for me ;) Thanks!

@Enteee
Copy link
Author

Enteee commented Dec 5, 2019

Sorry, this does not work for me. I will not grant an application access to my personal data which breaks when I do so.

@Robin481
Copy link

Robin481 commented Dec 9, 2019

@Enteee it should work now. Feel free to test it and give us feedback if there are any persisting issues.

As to the previous problem that required two logins: There were never any concerns to be had about your personal data. The flow of the code had an issue where it created the user (when logging in for the first time) but didn't find aforementioned user in the next step. When the user then tried a second login attempt it was able to find the user without an issue.

This is also the reason why users that participated in previous years never had this issue.

@Enteee
Copy link
Author

Enteee commented Dec 9, 2019

and which pull request now fixed the issue?

@Robin481
Copy link

Robin481 commented Dec 9, 2019

@Enteee it was not one PR but in fact several commits over the last week.
You can find them in this repository: https://github.com/opensource-challenge/opensource-challenge-api

The open-source challenge has a client and an api and the problem was finally found in the elixir api.

The last commit on this issue is this one: opensource-challenge/opensource-challenge-api@0c40439

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

No branches or pull requests

7 participants