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

Turn off HTTPS in Vite dev server in Connect #47849

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Conversation

ravicious
Copy link
Member

@ravicious ravicious commented Oct 23, 2024

After one of the vite or electron-vite updates, pnpm start-term started showing a blank window. Opening the dev tools revealed that the browser failed to load some individual source files with error ERR_HTTP2_PROTOCOL_ERROR. The workaround was to Cmd+R, sometimes multiple times.

Vite's has a bunch of issues about this, but they've all been closed. We tried adjusting a couple of Vite settings, but none of that helped (further increasing maxSessionMemory, server.warmup, server.fs.cachedChecks). Fortunately, it seems that turning off HTTPS for the dev server does the trick.

AFAIK the Web UI needs HTTPS in its dev server for PROXY_TARGET to work with pnpm start-teleport. Connect does no such proxying, so having HTTPS enabled is not strictly necessary. For what it's worth, APIs such as crypto.randomUUID still work.

Unlike in the Web UI, turning of HTTPS in development doesn't make the dev environment differ from the prod environment, as in a packaged app the frontend files are read from the disk rather than being returned by a server.

@ravicious ravicious added no-changelog Indicates that a PR does not require a changelog entry backport/branch/v15 backport/branch/v16 labels Oct 23, 2024
@github-actions github-actions bot requested review from avatus and rudream October 23, 2024 10:01

This comment was marked as off-topic.

Copy link
Contributor

@gzdunek gzdunek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to work!

@ravicious ravicious added this pull request to the merge queue Oct 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 23, 2024
@ravicious ravicious added this pull request to the merge queue Oct 23, 2024
Merged via the queue into master with commit 3c79bae Oct 23, 2024
42 of 43 checks passed
@ravicious ravicious deleted the r7s/teleterm-vite-https branch October 23, 2024 14:15
@public-teleport-github-review-bot

@ravicious See the table below for backport results.

Branch Result
branch/v15 Create PR
branch/v16 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/branch/v15 backport/branch/v16 no-changelog Indicates that a PR does not require a changelog entry size/sm ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants