gitpod-io / gitpod-io/gitpod

[code] support live preview of local files

Open
#3,831 36 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

editor: code (browser) meta: never-stale type: feature request
Dominant language
TypeScript
Stars
13.8k
Forks
1.4k
Avg merge
17h 58m
Merged PRs (30d)
5

Description

Bug description

Unable to see HTML file and faced a HTTP 400 Bad Request issue. Instead, I saw a text saying : Web Sockets Request was expected.

Steps to reproduce
  1. Create index.html and index.ts file.

index.html :
image

index.ts :
image

  1. Compile index.ts with yarn tsc index.ts and produce an index.js file.

index.js :
image

  1. Create an <h1>Hello</h1> and connect it to index.js.
  2. Open a new tab to access <PORT>-<Gitpod Workspace URL>.
  3. See a text saying : Web Sockets Request was expected.

image

Expected behavior

Display an HTML file and run Javascript in console.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the mentioned index.html, index.ts, and compiled index.js files, then inspect the local-file preview path reached through the workspace URL and port. Done means the HTML renders in a new tab and the JavaScript runs in the browser console without the Web Sockets Request was expected response.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript, typescript
Domain
devtools, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.