Skip to content

Error: Can't set headers after they are sent. #114

Description

@GPlay97

View details in Rollbar: https://rollbar.com/gplay97/EVNotifyBackend/items/182/


Error: Can't set headers after they are sent.
  File "_http_outgoing.js", line 491, in validateHeader
  File "_http_outgoing.js", line 498, in ServerResponse.setHeader
  File "/home/gplay97/EVNotifyBackend/node_modules/express/lib/response.js", line 771, in ServerResponse.header
        this.setHeader(field, value);
  File "/home/gplay97/EVNotifyBackend/node_modules/express/lib/response.js", line 170, in ServerResponse.send
          this.set('Content-Type', setCharset(type, 'utf-8'));
  File "/home/gplay97/EVNotifyBackend/node_modules/express/lib/response.js", line 267, in ServerResponse.json
      return this.send(body);
  File "/home/gplay97/EVNotifyBackend/modules/integrations/abrp/index.js", line 23, in db.query
                        res.json({
  File "/home/gplay97/EVNotifyBackend/modules/db/index.js", line 30, in Query.db.query
                    if (typeof callback === 'function') callback(err, queryRes);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 525, in Query.<anonymous>
          fn.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 491, in Query._callback
          ret = fn.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Sequence.js", line 83, in Query.Sequence.end
            this._callback.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Query.js", line 139, in Query._handleFinalResultPacket
      this.end(this._loadError, results, fields);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/sequences/Query.js", line 72, in Query.OkPacket
        this._handleFinalResultPacket(packet);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Protocol.js", line 291, in Protocol._parsePacket
      sequence[packetName](packet);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Parser.js", line 433, in Parser._parsePacket
        this._onPacket(packetHeader);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Parser.js", line 43, in Parser.write
        this._parsePacket(packetHeader);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Protocol.js", line 38, in Protocol.write
      this._parser.write(buffer);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 91, in Socket.<anonymous>
          connection._protocol.write(data);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 525, in Socket.<anonymous>
          fn.apply(this, arguments);
  File "events.js", line 116, in emitOne
  File "events.js", line 211, in Socket.emit
  File "_stream_readable.js", line 263, in addChunk
  File "_stream_readable.js", line 250, in readableAddChunk

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛(critical) bug / error or misbehavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions