Skip to content

[saveFiles / standalone] : client.query is not a function #1014

@ecnivtwelve

Description

@ecnivtwelve

Issue description

When starting a connector using yarn standalone the saveFiles() function won't execute resulting in an error saying client.query is not a function

Reproductible steps

  1. Clone konnectors/cozy-konnector-template
  2. Use saveFiles() in the konnector (example i used that saves the cozy logo : https://gist.github.com/ecnivtwelve/b7086ab0f76bf1f25c3797a624811cfc)
  3. Console reports a crash

Console logs

> yarn standalone
yarn run v1.22.22
$ cozy-konnector-standalone
BaseKonnector: debug : Preparing konnector...
BaseKonnector: debug : Running konnector main...
saveFiles: warn : There is no sourceAccountIdentifier given to saveFiles
saveFiles: warn : saveFiles: no deduplication key is defined, file deduplication will be based on file path
saveFiles: warn : saveFiles: no sourceAccountIdentifier is defined in options, file deduplication will be based on file path
BaseKonnector: warn : Error from konnector
BaseKonnector: debug : Error caught by BaseKonnector
BaseKonnector: critical : client.query is not a function
debug : Capture exception and die
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment

  • Node : 20.15.1
  • cozy-konnector-libs : 5.11.0
  • cozy-jobs-cli : 2.4.2
  • cozy-konnector-build : 1.7.0

Side notes

  • saveBills() function seems to work
  • It seems that client.new provided by the libs doesn't work either

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions