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

Disconnect from identity server fails #10967

Closed
deepbluev7 opened this issue Sep 26, 2019 · 12 comments

Comments

@deepbluev7
Copy link

commented Sep 26, 2019

Description

When trying to disconnect from the identity server in the settings, the button just spins, but the disconnect seems to fail. The console contains some CORS errors and an error to unhandled rejections. Logs will be sent, after this issue is created.

Steps to reproduce

  • Go to settings
  • Click on disconnect from identity server.

Note that I was for some reason connected to matrix.org. I thought I left the identity server blank, when I logged in, but I could be wrong.

Describe how what happens differs from what you expected.

Log: sent

Version information

  • Platform: web

For the web app:

  • Browser: Firefox 68.0.2esr
  • OS: Gentoo
  • URL: riot.neko.dev (Riot 1.4.0-rc.2)
@jryans

This comment has been minimized.

Copy link
Member

commented Sep 26, 2019

@deepbluev7 It looks like your current identity server is being blocked (maybe uBlock as you suspected). Does it allow you disconnect if you disable the blocking?

@deepbluev7

This comment has been minimized.

Copy link
Author

commented Sep 26, 2019

I tried it with disabled uBlock, reloaded without cache, cleared cache from settings and reloaded again, but it still doesn't work and shows the same error in the log, so I don't think it is related to that. I think it is rather because of the CORS violations?

@jryans

This comment has been minimized.

Copy link
Member

commented Sep 26, 2019

Hmm, are you able to load https://matrix.org/_matrix/identity/v2/hash_details as a test? (In a browser tab, it will say unauthorized, but you can check the CORS headers to see what happens.

From the image you shared in the Riot room, it appears that all traffic to https://matrix.org is being blocked by your browser somehow.

@deepbluev7

This comment has been minimized.

Copy link
Author

commented Sep 26, 2019

Yes, I can load it in a different tab. A different tab also wouldn't apply to CORS, as the CORS violation says same origin, and obviously matrix.org is not the same domain as my privately hosted riot.

@jryans

This comment has been minimized.

Copy link
Member

commented Sep 26, 2019

Sure, I am just saying you can check the response headers to confirm whether they contain access-control-allow-headers: *.

@jryans

This comment has been minimized.

Copy link
Member

commented Sep 26, 2019

I have been using matrix.org as a testing identity server for my local Riot without seeing this, so that's why I am assuming so far that it should be something specific to either your Riot or your computer.

@deepbluev7

This comment has been minimized.

Copy link
Author

commented Sep 26, 2019

The headers I get in the response look okay to me:

access-control-allow-headers	
*
access-control-allow-methods	
GET, POST, PUT, DELETE, OPTIONS
access-control-allow-origin	
*

I noticed that I had my browser set to block some cookies from pages I didn't visit, etc. I've since disabled all of that and reloaded riot from scratch. One thing I noticed, I also get a 401 {"errcode": "M_UNAUTHORIZED", "error": "Unauthorized"} as response, could that be the issue, that my browser was blocking matrix.org, when I signed in?

@deepbluev7

This comment has been minimized.

Copy link
Author

commented Sep 26, 2019

The CORS error also seems to be on the https://matrix.org/_matrix/identity/v2/account/register endpoint, for which I'm guessing the PUT fails? The OPTION request seems to have the correct headers though, but I can't find the PUT in the network tab.

@jryans

This comment has been minimized.

Copy link
Member

commented Sep 26, 2019

Well, the unauthorized is because hash_details requires a token from register, so that's expected. (Perhaps that was a bad choice for our testing here...)

The sequence of requests should start with (assuming matrix.org was the IS as in your case):

  • OPTIONS https://matrix.org/_matrix/identity/v2/account/register
  • POST https://matrix.org/_matrix/identity/v2/account/register
  • ... followed by several more ...

Could you check the behaviour in different browser and/or a different computer to try to see if it's something local only?

@deepbluev7

This comment has been minimized.

Copy link
Author

commented Sep 26, 2019

I have the same behaviour on a different computer, but I'm using the same browser with the same plugins there. If I sign in in a new profile, that has the default plugins and settings, the problem goes away. My guess is, that I never registered with the IS, because it was blocked or I signed in with an old version of riot, and so I don't have the tokens to unregister with the IS. I would still expect being able to remove IS usage though.

@jryans

This comment has been minimized.

Copy link
Member

commented Sep 26, 2019

Right, I agree you should be able to stop using the IS even if it's inaccessible, and that's tracked as #10909.

It's good to hear that it works for you in separate browser. It should still work in your current browser profile as well, and it appears something on your machine is somehow still blocking requests in that environment, so that could be worth investigating locally to compare browser settings and add-ons.

In any case, the work for #10909 will also unblock your case here, so I think I'll close this and consider it a duplicate of #10909.

@jryans jryans closed this Sep 26, 2019
@jryans jryans added phase:2 and removed phase:1 labels Sep 26, 2019
@deepbluev7

This comment has been minimized.

Copy link
Author

commented Sep 26, 2019

Yep, sounds alright. I guess that really is a blocking issue on my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.