Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

[Error (E_UNKNOWN) Encountered an unexpected error] Details: error: invalid input syntax for integer: "NaN #474

Closed
Hupeli opened this issue Oct 17, 2019 · 8 comments

Comments

@Hupeli
Copy link

Hupeli commented Oct 17, 2019

rawStack: 'error: invalid input syntax for integer: "NaN"\n' +
' at Connection.parseE (node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)\n' +
' at Connection.parseMessage (node_modules/sails-postgresql/node_modules/pg/lib/connection.js:366:17)\n' +
' at Socket. (node_modules/sails-postgresql/node_modules/pg/lib/connection.js:105:22)\n' +
' at Socket.emit (events.js:210:5)\n' +
' at Socket.EventEmitter.emit (domain.js:476:20)\n' +
' at addChunk (_stream_readable.js:308:12)\n' +
' at readableAddChunk (_stream_readable.js:289:11)\n' +
' at Socket.Readable.push (_stream_readable.js:223:10)\n' +
' at TCP.onStreamRead (internal/stream_base_commons.js:182:23)',
details: 'Details: error: invalid input syntax for integer: "NaN"\n',
model: undefined

@LKI
Copy link

LKI commented Oct 19, 2019

same issue. I found this bug under NO_AUTH.

Fixed after remove NO_AUTH

@pantsel
Copy link
Owner

pantsel commented Oct 19, 2019

@LKI , at what point using the NO_AUTH setting did you encounter that bug? Can you please tell me how to reproduce?

@LKI
Copy link

LKI commented Oct 19, 2019

@pantsel I use kubernetes to create a konga deployment. Reproduce steps are here:

  • use NO_AUTH env to create a new konga deployment
  • when creating first connection, dashboard will pop a Invalid input syntax for integer
  • remove NO_AUTH env, apply and restart the deployment
  • now it's ok to create connections

Sample k8s yml:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: konga
  namespace: konga
spec:
  selector:
    matchLabels:
      app: konga
  replicas: 1
  template:
    metadata:
      labels:
        app: konga
    spec:
      restartPolicy: Always
      initContainers:
        - name: konga-init
          image: pantsel/konga:0.14.5
          command: ["node", "bin/konga.js", "prepare", "--adapter", "postgres", "--uri", "postgresql://konga@konga:5432/konga"]
      containers:
        - name: konga
          image: pantsel/konga:0.14.5
          env:
            - name: DB_ADAPTER
              value: postgres
            - name: DB_HOST
              value: konga
            - name: DB_PORT
              value: "5432"
            - name: DB_USER
              value: konga
            - name: TOKEN_SECRET
              value: konga
            - name: DB_DATABASE
              value: konga
            - name: NODE_ENV
              value: production
            - name: NO_AUTH
              value: "true"
          resources:
          ports:
            - containerPort: 1337

@pantsel
Copy link
Owner

pantsel commented Oct 19, 2019

@LKI ,

please try Konga 0.14.6.
I've just released a patch.

@LKI
Copy link

LKI commented Oct 19, 2019

@pantsel OK, I'll try

@LKI
Copy link

LKI commented Oct 19, 2019

@pantsel same issue still, screenshot is here:

image

trace:

"error: invalid input syntax for integer: "NaN"
    at Connection.parseE (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)
    at Connection.parseMessage (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:366:17)
    at Socket.<anonymous> (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:105:22)
    at Socket.emit (events.js:198:13)
    at Socket.EventEmitter.emit (domain.js:448:20)
    at addChunk (_stream_readable.js:288:12)
    at readableAddChunk (_stream_readable.js:269:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)"

@pantsel
Copy link
Owner

pantsel commented Oct 19, 2019

@LKI , ok found the issue.

Just released another patch on v0.14.7

@LKI
Copy link

LKI commented Oct 19, 2019

@pantsel It's fixed!
Thanks a lot for such rapid contribution! 🌹

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants