matrixgpt / matrix-chatgpt-bot

Talk to ChatGPT via any Matrix client!
GNU Affero General Public License v3.0
230 stars 64 forks source link

Missing field `version` at line 1 column 9481 #283

Open PaarthShah opened 4 months ago

PaarthShah commented 4 months ago

Using docker: ghcr.io/matrixgpt/matrix-chatgpt-bot <none> b0dd379aee4e 4 months ago 367MB

root@REDACTED:~# docker pull ghcr.io/matrixgpt/matrix-chatgpt-bot:latest
latest: Pulling from matrixgpt/matrix-chatgpt-bot
Digest: sha256:f07bf6adbdf98405af39ce1e328a94cbba5c9585fb063efd751582475e1bf50f
Status: Image is up to date for ghcr.io/matrixgpt/matrix-chatgpt-bot:latest
ghcr.io/matrixgpt/matrix-chatgpt-bot:latest
yarn run v1.22.19
$ node --enable-source-maps dist/index.js
Thu, 29 Feb 2024 07:31:53 GMT [INFO] [index] Starting bot using ChatGPT model: gpt-4-1106-preview
Thu, 29 Feb 2024 07:31:53 GMT [INFO] [index] Using promptPrefix: <|im_sep|>Instructions:
You are ChatGPT, a large language model trained by OpenAI.
Current date: February 29, 2024<|im_sep|>

node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: Failed to deserialize or serialize a JSON value missing field `version` at line 1 column 9481] {
  code: 'GenericFailure'
}

Node.js v20.11.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
djmaze commented 4 months ago

Very similar error here with one of my bots. It occurs since v3.1.5. When downgrading to v3.1.4, the error disappears.

yarn run v1.22.19
$ node --enable-source-maps dist/index.js
Tue, 05 Mar 2024 21:43:08 GMT [INFO] [index] Starting bot using ChatGPT model: gpt-3.5-turbo
Tue, 05 Mar 2024 21:43:08 GMT [INFO] [index] Using promptPrefix: <|im_sep|> 
Current date: March 5, 2024<|im_sep|>

Tue, 05 Mar 2024 21:43:08 GMT [ERROR] [MatrixHttpClient] (REQ-5) { errcode: 'M_NOT_FOUND', error: 'Event not found.' }
Tue, 05 Mar 2024 21:43:08 GMT [ERROR] [MatrixHttpClient] (REQ-6) { errcode: 'M_NOT_FOUND', error: 'Event not found.' }
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: Failed to deserialize or serialize a JSON value missing field `version` at line 1 column 13059] {
  code: 'GenericFailure'
}

Node.js v20.11.1
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.

When removing the docker volume for the storage, runs further but then exits with an encryption error:

{
  errcode: 'M_UNKNOWN',
  error: `One time key signed_curve25519:AAAAAAAAAA4 already exists. Old key: {"key":"REDACTED","signatures":{"REDACTED":{"ed25519:REDACTED":"REDACTED"}}}; new key: {'key': 'REDACTED', 'signatures': {'REDACTED': {'ed25519:REDACTED': 'REDACTED'}}}`
}
/usr/src/app/node_modules/matrix-bot-sdk/src/http.ts:110
        throw new MatrixError(errBody, response.statusCode);

It seems to me the crypto store somehow broke so it does not work for 3.1.5 anymore, or similar.

djmaze commented 4 months ago

I now had to switch to a new bot user and downgrade to v3.1.4. I would have key and sync errors with 3.1.5.

Narakuku commented 3 months ago

same issue