Redirect loop with Codespaces beta

I’ve just joined the Codespaces beta. On clicking on the link to the workspace, it goes into a redirect loop with these 2 URLs:

I am on Chrome 85.

Hey @ hongshaoyang, thanks for reporting this!

Looks like the browser cannot set either cookie or localStorage record. Is the loop infinite? If it is, that might suggest issues with localStorage.

Can you see if what’s in cookies/localstorage in DevTools -> Application tab? We expect __Host-vssaas.session cookie and vsc-partner-info localstorage record to be saved.

Also can you try incognito window without browser extensions?

It looks like __Host-vssaas.session is set but not vsc-partner-info. I’ve also tried incognito without extensions and tried to change Chrome’s cooking settings to allow all cookies, but neither of these work.

@hongshaoyang thanks for the reply, that scopes down the issue a bit. Could you do this:

  1. Open the in a chromium-based browser.
  2. When it connections, pop up the DevTools and switch to the Network tab, then check the “Preserve log” checkbox above the network requests table.
  3. Click on a Codespace link so it will try to connect to the Codespace.
  4. Click on the Export HAR arrow and send the archive to Please don’t attach it to this thread as it might contain sensitive information.

That would give me the ability to look at what happens at the authorization step in more detail.

Thanks @legomushroom, have sent you an email with the HAR file.

1 Like

@hongshaoyang, thanks for the info! The data you’ve sent to me is perfectly fine so it scopes down the issue a bit more.

Few questions:

  • Does it fail in all browsers you have or just one?
  • Are there any errors in the DevTools console? (please send them to me if you see anything there)
  • Do you have any records in the LocalStorage at all or there are some and only the vsc-partner-info record is missing?

I’ll dive into logging to see if I can catch anything interesting. If that does not help, do you think we can have a screen share session to debug this together?

  • I tried with Firefox Developer Edition 81 and it worked fine, so it might be a Chrome issue.
  • The only error i see is stats.ts:41 POST net::ERR_BLOCKED_BY_CLIENT which I believe is just sending browser stats and is blocked by uBlock origin.
  • LocalStorage has one record: vscs-oauth-flow-attmept-count: 1 [sic]

Yes, I am fine with a screenshare session to debug this.

Hold on, there’s actually another error in the console:

VM36 workbench.web.api.nls.js:4 Uncaught ReferenceError: define is not defined
    at VM36 workbench.web.api.nls.js:4
(anonymous) @ VM36 workbench.web.api.nls.js:4

Could this be relevant?

Thanks for trying out all of these :+1:

Both errors don’t look related, the fact that you have just a single LocalStorage record is very interesting. I suspect that is an issue with LocalStorage or WebCrypto APIs in Chrome but would be great to put my hands on the live browser in a screen share session since I cannot repro it on my end.

I see your profile says you are in Singapore and it is past midnight there, please ping me by email when you back online so we can arrange the debugging session. Thanks a lot!

1 Like

Just finished the screenshare debugging session with hongshaoyang.
Looks like the extension was blocking/removing localStorage records.

1 Like