EVNotify/EVNotifyBackend

TypeError: Cannot read property 'NORMAL_SPEED' of undefined

Opened this issue · 1 comments

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


TypeError: Cannot read property 'NORMAL_SPEED' of undefined
  File "/home/gplay97/EVNotifyBackend/modules/helper/index.js", line 89, in Object.calculateTime
            estimatedNormalTime: ((!port || port === 'normal_charge_port') ? parseFloat((amountToCharge / (realChargingSpeed || speeds[car].NORMAL_SPEED)).toFixed(2)) : null),
  File "/home/gplay97/EVNotifyBackend/modules/qr/index.js", line 242, in qrStatus
                        codeObj.estimatedTime = helper.calculateTime(
  File "/home/gplay97/EVNotifyBackend/modules/qr/index.js", line 95, in db.query
            callback(err, ((!err && dbRes && dbRes[0]) ? dbRes[0] : null));
  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 502, in Query.<anonymous>
          fn.apply(this, arguments);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/Connection.js", line 468, 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 123, in Query.EofPacket
      this._handleFinalResultPacket(packet);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Protocol.js", line 278, in Protocol._parsePacket
      sequence[packetName](packet);
  File "/home/gplay97/EVNotifyBackend/node_modules/mysql/lib/protocol/Parser.js", line 76, in Parser.write
          this._onPacket(this._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 502, 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
  File "_stream_readable.js", line 208, in Socket.Readable.push
  File "net.js", line 601, in TCP.onread

Da sollte man vielleicht mal einen weiteren Check einbauen 🤔 würde ich mir sonst die Tage mal angucken 👍