Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

ERR_HTTP_HEADERS_SENT #35

Open
IronicUsername opened this issue Nov 24, 2022 · 0 comments
Open

ERR_HTTP_HEADERS_SENT #35

IronicUsername opened this issue Nov 24, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@IronicUsername
Copy link
Contributor

Environment

  • Operating System: Darwin
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.12
  • Nitro Version: 0.6.0
  • Package Manager: npm@8.5.0
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Set the ipPinning to true here and either

  • DELETE the session and REFRESH the session
  • RESET the session

both actions where performed on the playground.

Describe the bug

As it seems like, there is a bug in resetting a session when the IP is pinned.
There should be some way of error handling when it comes to the above described case.

Additional context

No response

Logs

[nitro] [dev] [unhandledRejection] Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at new NodeError (node:internal/errors:371:5)
    at ServerResponse.setHeader (node:_http_outgoing:576:11)
    at appendResponseHeader (file:///Users/IronicUsername/Development/personal/nuxt-session/node_modules/h3/dist/index.mjs:280:13)
    at setCookie (file:///Users/IronicUsername/Development/personal/nuxt-session/node_modules/h3/dist/index.mjs:341:3)
    at deleteCookie (file:///Users/IronicUsername/Development/personal/nuxt-session/node_modules/h3/dist/index.mjs:344:3)
    at deleteSession (file:///Users/IronicUsername/Development/personal/nuxt-session/playground/.nuxt/dev/index.mjs:543:3)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async getSession (file:///Users/IronicUsername/Development/personal/nuxt-session/playground/.nuxt/dev/index.mjs:579:5)
    at async ServerResponse.<anonymous> (file:///Users/IronicUsername/Development/personal/nuxt-session/playground/.nuxt/dev/index.mjs:599:21) {
  code: 'ERR_HTTP_HEADERS_SENT'
}
@IronicUsername IronicUsername added the bug Something isn't working label Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant