Open edwardbrowncross opened 4 years ago
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:
my account still has no email address and spaces errors whenever I try to take any action
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?
Created the PR to fix this: https://github.com/vsls-contrib/spaces/pull/125 Please confirm that it solves your issue.
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:
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": []
}
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
When I try to join a space, all I see is an error. A toast in VS Code shows:
And the VS Code window log shows: