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

Callback must be a function, received undefined when using BlobS3Backend #280

Open
umesh-timalsina opened this issue Aug 16, 2022 · 0 comments

Comments

@umesh-timalsina
Copy link

I am using an S3 compatible minio storage bucket as a backend for one of our webgme deployments, with the following configuration the blob.

config.blob.s3 = {
    accessKeyId: process.env.MINIO_ACCESS_KEY,
    secretAccessKey: process.env.MINIO_SECRET_KEY,
    region: '',
    s3ForcePathStyle: true,
    endpoint: 'http://localhost:9001',
    sslEnabled: false
}

However, it looks like there's a missing callback function on the following line.

The error stack is below:

{
  date: 'Tue Aug 16 2022 10:50:11 GMT-0500 (Central Daylight Time)',
  process: {
    pid: 85750,
    uid: 1000,
    gid: 1000,
    cwd: '/home/umesh/isis/symbench/scm/model_trainer',
    execPath: '/home/umesh/.nvm/versions/node/v14.20.0/bin/node',
    version: 'v14.20.0',
    argv: [
      '/home/umesh/.nvm/versions/node/v14.20.0/bin/node',
      '/home/umesh/isis/symbench/scm/model_trainer/app.js'
    ],
    memoryUsage: {
      rss: 98295808,
      heapTotal: 29528064,
      heapUsed: 27617576,
      external: 22791369,
      arrayBuffers: 20007815
    }
  },
  os: { loadavg: [ 1.83, 1.26, 1.34 ], uptime: 64031.5 },
  trace: [
    {
      column: 7,
      file: 'internal/errors.js',
      function: 'new NodeError',
      line: 322,
      method: null,
      native: false
    },
    {
      column: 11,
      file: 'fs.js',
      function: 'makeCallback',
      line: 177,
      method: null,
      native: false
    },
    {
      column: 14,
      file: 'fs.js',
      function: 'Object.unlink',
      line: 1245,
      method: 'unlink',
      native: false
    },
    {
      column: 20,
      file: '/home/umesh/isis/symbench/scm/model_trainer/node_modules/webgme-engine/src/server/middleware/blob/BlobS3Backend.js',
      function: null,
      line: 124,
      method: null,
      native: false
    },
    {
      column: 28,
      file: 'events.js',
      function: 'ReadStream.emit',
      line: 400,
      method: 'emit',
      native: false
    },
    {
      column: 12,
      file: 'domain.js',
      function: 'ReadStream.emit',
      line: 475,
      method: 'emit',
      native: false
    },
    {
      column: 10,
      file: 'internal/streams/destroy.js',
      function: 'emitCloseNT',
      line: 87,
      method: null,
      native: false
    },
    {
      column: 21,
      file: 'internal/process/task_queues.js',
      function: 'processTicksAndRejections',
      line: 81,
      method: null,
      native: false
    }
  ],
  stack: [
    'TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined',
    '    at new NodeError (internal/errors.js:322:7)',
    '    at makeCallback (fs.js:177:11)',
    '    at Object.unlink (fs.js:1245:14)',
    '    at ReadStream.<anonymous> (/home/umesh/isis/symbench/scm/model_trainer/node_modules/webgme-engine/src/server/middleware/blob/BlobS3Backend.js:124:20)',
    '    at ReadStream.emit (events.js:400:28)',
    '    at ReadStream.emit (domain.js:475:12)',
    '    at emitCloseNT (internal/streams/destroy.js:87:10)',
    '    at processTicksAndRejections (internal/process/task_queues.js:81:21)'
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant