lambda-packages icon indicating copy to clipboard operation
lambda-packages copied to clipboard

🐛 BUG: Astro doesn't render properly in GitHub Codespaces on dev mode

Open okikio opened this issue 3 years ago • 5 comments

What version of astro are you using?

1.0.0-beta.72

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

pnpm

What operating system are you using?

Linux

Describe the Bug

On GitHub Codespaces there is an issue in dev mode where Astro will return HTML as a text file.

If you run astro preview this issue isn't there

The issue looks like this, image

The error occurs on all example templates, this is an example repro, but it occurs on all examples https://github.com/okikio/astro-codespaces-error-repro

Link to Minimal Reproducible Example

https://stackblitz.com/github/okikio/astro-codespaces-error-repro

Participation

  • [x] I am willing to submit a pull request for this issue.

okikio avatar Jul 20 '22 01:07 okikio

Thanks @okikio! It's hard to tell if this is an issue on our end or with Codespaces. Any chance you can look into this more?

I wonder if changing anything about the Codespaces settings helps here?

natemoo-re avatar Jul 20 '22 15:07 natemoo-re

@natemoo-re I'm not sure either, @ran-dall thought changing the Dockerfile would solve the problem, but it didn't. From what I can tell, this is an Astro issue as it only affects the dev mode server, but the preview server works as expected.

If you'd like, I can have a debug sesh after work today.

okikio avatar Jul 20 '22 16:07 okikio

I was able to replicate @okikio problem a few different ways, which makes me think it isn't something we're doing (at Astro) but rather an interaction of how GitHub is forwarding the Local Ports thru their Authentication. You don't get the problem if you use the GitHub CodeSpaces extension on MS Edge or directly from within VSCode. The problem is solely when you're using CodeSpaces from a browser window.

That said, Firefox doesn't even connect to CodeSpaces in this context due to it triggering Security Violations.

Therefore, I'm pretty certain this is a limitation of CodeSpaces...and I'm currently working with GitHub to push the problem to the right people there.

ran-dall avatar Jul 21 '22 13:07 ran-dall

That's awesome 👌

okikio avatar Jul 21 '22 13:07 okikio

Just encountered this problem too. This used to work, it only stopped working a few weeks ago.

lloydjatkinson avatar Aug 04 '22 23:08 lloydjatkinson