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

Error 500 when trying to join space with github login #120

Open
edwardbrowncross opened this issue Jul 29, 2020 · 5 comments
Open

Error 500 when trying to join space with github login #120

edwardbrowncross opened this issue Jul 29, 2020 · 5 comments

Comments

@edwardbrowncross
Copy link
Contributor

When I try to join a space, all I see is an error. A toast in VS Code shows:

Command 'Live Share Spaces: Join Space' resulted in an error (Request failed with status code 500)

And the VS Code window log shows:

[2020-07-29 10:09:28.545] [renderer1] [error] Request failed with status code 500: Error: Request failed with status code 500
	at e.exports (c:\Users\Edward Browncross\.vscode\extensions\vsls-contrib.spaces-0.1.2\out\extension.js:1:50450)
	at e.exports (c:\Users\Edward Browncross\.vscode\extensions\vsls-contrib.spaces-0.1.2\out\extension.js:1:110355)
	at IncomingMessage.<anonymous> (c:\Users\Edward Browncross\.vscode\extensions\vsls-contrib.spaces-0.1.2\out\extension.js:8:5340)
	at IncomingMessage.emit (events.js:208:15)
	at endReadableNT (_stream_readable.js:1168:12)
	at processTicksAndRejections (internal/process/task_queues.js:77:11)
@edwardbrowncross
Copy link
Contributor Author

edwardbrowncross commented Jul 30, 2020

To investigate further, I started a local instance of the service, which gave this error:

Request: GET /v0/top_spaces
** (exit) an exception was raised:
    ** (FunctionClauseError) no function clause matching in String.contains?/2
        (elixir 1.10.4) lib/string.ex:2216: String.contains?(nil, "@")
        (spaces 0.1.0) lib/spaces/auth.ex:454: LiveShareSpaces.Authentication.get_cascade_user_info/1
        (spaces 0.1.0) lib/spaces/auth.ex:479: LiveShareSpaces.Authentication.get_cascade_claims/1
        (spaces 0.1.0) lib/spaces/auth.ex:379: LiveShareSpaces.Authentication.set_user_claims/1
        (spaces 0.1.0) lib/spaces/http.ex:3: LiveShareSpaces.HTTP.plug_builder_call/2
        (plug_cowboy 2.1.0) lib/plug/cowboy/handler.ex:12: Plug.Cowboy.Handler.init/2
        (cowboy 2.6.3) /opt/app/deps/cowboy/src/cowboy_handler.erl:41: :cowboy_handler.execute/2
        (cowboy 2.6.3) /opt/app/deps/cowboy/src/cowboy_stream_h.erl:296: :cowboy_stream_h.execute/3

It appears that having a nil email address attached to your live share account causes an internal error. Unfortunately, nothing I do makes an email appear against my account in live share when logging in with gituhub. The steps I followed were:

  1. made my email address public on github
  2. deleted my live share account data using the link on this page
  3. recreated fresh live share account data by logging in through VS Code

my account still has no email address and spaces errors whenever I try to take any action

@edwardbrowncross edwardbrowncross changed the title Error 500 when trying to join space Error 500 when trying to join space with github login Jul 30, 2020
@legomushroom
Copy link
Contributor

legomushroom commented Aug 2, 2020

Hey @edwardbrowncross, pardon for the trouble, I'll investigate the issue shortly. AFAIR LiveShare requires an email on the profile to properly work, so at this point, it is not clear if that the issue on the Spaces side or not. Are you able to use LiveShare with this account?

@legomushroom
Copy link
Contributor

Created the PR to fix this: #125 Please confirm that it solves your issue.

@edwardbrowncross
Copy link
Contributor Author

Thanks for looking at this so quickly! Yes I am able to use LiveShare. My colleagues, who all have had the same experience as me, can also use it. We all have (null) as our email address though as this screenshot shows:
image

In case it helps, my LiveShare user profile data looks like this:

{
    "initialProvider": "github",
    "status": "accepted",
    "registrationData": {},
    "providers": {
        "github": {
            "id": "35063432",
            "profileUrl": "https://github.com/edwardbrowncross",
            "displayName": "Edward Browncross",
            "username": "edwardbrowncross",
            "initials": "EB",
            "provider": "github",
            "photos": [
                {
                    "value": "https://avatars2.githubusercontent.com/u/35063432?v=4"
                }
            ],
            "emails": []
        }
    },
    "signupTime": 1596123945571,
    "telemetryId": "1b50d591-8e7b-49cf-bdb3-31521f063035",
    "id": "acaddbe1-d891-4548-ab43-28e7f138c568",
    "workspaces": []
}

@legomushroom
Copy link
Contributor

legomushroom commented Aug 3, 2020

Thanks, AFAIR LiveShare was dependent on the emails to be present at some point and looks like that have changed recently. Unfortunately, the LS Spaces client expects the email to be present in many places and that will need to be refactored. From my smoke testing yesterday, the PR above makes LS Spaces usable, but of course, I could not do the comprehensive testing tonight. cc @lostintangent

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

2 participants