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

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

Closed
1 task done
okikio opened this issue Jul 20, 2022 · 6 comments
Closed
1 task done
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@okikio
Copy link
Member

okikio commented Jul 20, 2022

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

  • I am willing to submit a pull request for this issue.
@okikio okikio added the - P3: minor bug An edge case that only affects very specific usage (priority) label Jul 20, 2022
@natemoo-re
Copy link
Member

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?

@okikio
Copy link
Member Author

okikio commented Jul 20, 2022

@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.

@ran-dall
Copy link
Contributor

ran-dall commented Jul 21, 2022

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.

@okikio
Copy link
Member Author

okikio commented Jul 21, 2022

That's awesome 👌

@lloydjatkinson
Copy link
Contributor

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

@matthewp
Copy link
Contributor

matthewp commented Oct 7, 2022

Not sure what's changed since, but this seems to be working perfectly fine now! I created a repo with a project: https://github.com/matthewp/codespaces-astro-project

@matthewp matthewp closed this as completed Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

5 participants