Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to decode schema from value #630

Open
nexy7574 opened this issue Nov 29, 2024 · 2 comments
Open

Unable to decode schema from value #630

nexy7574 opened this issue Nov 29, 2024 · 2 comments
Labels
L2 Few Likelihood needs investigation P1 Nuisance Priority level T2 Rendering or Aesthetic Issue Visual and Sound Polish: Aesthetic issues

Comments

@nexy7574
Copy link

I run two draupnir instances at the moment. Both are running v2.0.0-beta.8 via docker, however, one of them is brand new, and cannot subscribe to policy lists.

Running !draupnir watch <room> makes the bot join the room, and then it will spit out Unable to decode schema from value.

Both times, I get a traceback similar to below:

Fri, 29 Nov 2024 16:30:49 GMT [ERROR] [ActionException] ActionException Unknown 72f1f0ed-b22b-4454-92d8-8fbe7376b546 Unable to decode schema from value TransformEncodeCheckError: The encoded value does not match the expected schema
    at TypeCheck.Encode (/node_modules/@sinclair/typebox/build/cjs/compiler/compiler.js:57:19)
    at /node_modules/matrix-protection-suite/dist/Interface/Value.js:55:60
    at Value.resultify (/node_modules/matrix-protection-suite/dist/Interface/Value.js:64:37)
    at Value.Encode (/node_modules/matrix-protection-suite/dist/Interface/Value.js:55:21)
    at StandardPersistentConfigData.saveConfig (/node_modules/matrix-protection-suite/dist/Config/PersistentConfigData.js:27:44)
    at MjolnirPolicyRoomsConfig.watchList (/node_modules/matrix-protection-suite/dist/Protection/PolicyListConfig/MjolnirPolicyRoomsConfig.js:65:57)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.executor (/draupnir/commands/WatchUnwatchCommand.js:27:16)
    at async StandardCommandInvoker.invoke (/node_modules/@the-draupnir-project/interface-manager/dist/Adaptor/StandardCommandInvoker.js:24:20)
    at async StandardMatrixInterfaceAdaptor.invoke (/node_modules/@the-draupnir-project/interface-manager/dist/MatrixInterfaceAdaptor/MatrixInterfaceAdaptor.js:27:31) {
  schema: {
    title: 'PolicyRoomsConfig',
    type: 'object',
    properties: { references: [Object] },
    required: [ 'references' ],
    [Symbol(TypeBox.Kind)]: 'Object'
  },
  value: { references: [ [MatrixRoomID], [MatrixRoomID], [MatrixRoomID] ] },
  error: {
    type: 54,
    schema: {
      type: 'string',
      [Symbol(TypeBox.Kind)]: 'String',
      [Symbol(TypeBox.Transform)]: [Object]
    },
    path: '/references/0',
    value: MatrixRoomID {
      reference: '!WuBtumawCeOGEieRrp:matrix.org',
      viaServers: []
    },
    message: 'Expected string'
  }
}

This is an issue as the bot fails to subscribe to policy lists.
To rule out the issue being the sheer size of these banlist rooms, I made it join my own personal one, and got the same error.

@FSG-Cat FSG-Cat added L3 Some Users Likelihood P1 Nuisance Priority level T2 Rendering or Aesthetic Issue Visual and Sound Polish: Aesthetic issues L2 Few Likelihood and removed L3 Some Users Likelihood labels Nov 29, 2024
@FSG-Cat
Copy link
Member

FSG-Cat commented Nov 29, 2024

This issue seems to be caused by trying to subscribe to the same list twice thats why it was assigned as a Nuisance and Rendering issue. P1 is provisional as it could be a P2.

@Gnuxie
Copy link
Member

Gnuxie commented Dec 4, 2024

The actual cause of the issue was draupnir responding twice to commands, probably because conduwuit sync responses overlap and send the same event separatly. Apparently this was fixed but i think for now its safe to say the fix is dubious. girlbossceo/conduwuit#606

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L2 Few Likelihood needs investigation P1 Nuisance Priority level T2 Rendering or Aesthetic Issue Visual and Sound Polish: Aesthetic issues
Projects
None yet
Development

No branches or pull requests

3 participants