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

Custom hosts no longer work in Browser mode #6076

Closed
6 tasks done
cooper667 opened this issue Jul 10, 2024 · 0 comments · Fixed by #6079
Closed
6 tasks done

Custom hosts no longer work in Browser mode #6076

cooper667 opened this issue Jul 10, 2024 · 0 comments · Fixed by #6079
Assignees
Labels
feat: browser Issues and PRs related to the browser runner p4-important Violate documented behavior or significantly improves performance (priority)

Comments

@cooper667
Copy link

Describe the bug

: crypto.randomUUID()

This line uses crypto.randomUUID() which is only available in a secure context. Localhost is considered secure, but when using a custom domain (we use one that is just an A record with 127.0.0.1) the page isn't secure without setting up SSL certs, so crypto.randomUUID() isn't available

Reproduction

      api: {
        host: "aDomainThatPointsToLocalhost.com",
      },

then run browser tests as usual, they should fail

System Info

System:
    OS: macOS 14.2.1
    CPU: (8) arm64 Apple M2
    Memory: 219.69 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.1.0 - /usr/local/bin/node
    Yarn: 1.22.21 - /opt/homebrew/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.6.1 - ~/Library/pnpm/pnpm
    bun: 1.0.26 - ~/.bun/bin/bun
  npmPackages:
    @vitest/browser: ^2.0.1 => 2.0.1 
    @vitest/ui: ^2.0.1 => 2.0.1 
    @vitest/utils: ^2.0.1 => 2.0.1 
    vite: ^5.3.3 => 5.3.3 
    vitest: ^2.0.1 => 2.0.1

Used Package Manager

npm

Validations

@sheremet-va sheremet-va added feat: browser Issues and PRs related to the browser runner p3-minor-bug An edge case that only affects very specific usage (priority) p4-important Violate documented behavior or significantly improves performance (priority) and removed pending triage p3-minor-bug An edge case that only affects very specific usage (priority) labels Jul 10, 2024
@userquin userquin self-assigned this Jul 10, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: browser Issues and PRs related to the browser runner p4-important Violate documented behavior or significantly improves performance (priority)
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants