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

fix(plugin-fm): fix delete file error of cos #4529

Merged
merged 4 commits into from
May 30, 2024
Merged

fix(plugin-fm): fix delete file error of cos #4529

merged 4 commits into from
May 30, 2024

Conversation

mytharcher
Copy link
Contributor

Description

Error thrown when deleting file of COS.

Steps to reproduce

  1. Create a COS storage.
  2. Create a file collection which storage set to the COS.
  3. Upload a file on the table.
  4. Delete the file in the table row.

Expected behavior

File deleted.

Actual behavior

Error thrown:

{"log":"TypeError [ERR_INVALID_ARG_TYPE]: The \"cb\" argument must be of type function. Received undefined\n","stream":"stderr","time":"2024-05-30T05:02:30.36958009Z"}
{"log":"    at makeCallback (node:fs:185:3)\n","stream":"stderr","time":"2024-05-30T05:02:30.369618976Z"}
{"log":"    at Object.unlink (node:fs:1863:14)\n","stream":"stderr","time":"2024-05-30T05:02:30.369624558Z"}
{"log":"    at COSStorage._removeFile (/app/nocobase/node_modules/@nocobase/plugin-file-manager/dist/node_modules/multer-cos/index.js:36:5610)\n","stream":"stderr","time":"2024-05-30T05:02:30.36962885Z"}
{"log":"    at WriteStream.\u003canonymous\u003e (/app/nocobase/node_modules/@nocobase/plugin-file-manager/dist/node_modules/multer-cos/index.js:36:5413)\n","stream":"stderr","time":"2024-05-30T05:02:30.369633355Z"}
{"log":"    at WriteStream.emit (node:events:531:35)\n","stream":"stderr","time":"2024-05-30T05:02:30.369638356Z"}
{"log":"    at WriteStream.emit (node:domain:488:12)\n","stream":"stderr","time":"2024-05-30T05:02:30.369642392Z"}
{"log":"    at emitErrorNT (node:internal/streams/destroy:169:8)\n","stream":"stderr","time":"2024-05-30T05:02:30.369658865Z"}
{"log":"    at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n","stream":"stderr","time":"2024-05-30T05:02:30.369663172Z"}
{"log":"    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {\n","stream":"stderr","time":"2024-05-30T05:02:30.369667386Z"}
{"log":"  code: 'ERR_INVALID_ARG_TYPE'\n","stream":"stderr","time":"2024-05-30T05:02:30.369671752Z"}

Related issues

None.

Reason

No this of promisified function.

Solution

Fix this.

Copy link

height bot commented May 30, 2024

This pull request has been linked to 1 task:

💡Tip: Add "Close T-4401" to the pull request title or description, to a commit message, or in a comment to mark this task as "Done" when the pull request is merged.

This comment has been minimized.

Copy link

Tests results for "E2E"

10 flaky ⚠️ [chromium] › core/client/src/modules/blocks/data-blocks/list/__e2e__/schemaInitializer.test.ts:29:7 › where list block can be added › popup
⚠️ [chromium] › plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/schemaInitailizer.test.ts:14:7 › TableActionInitializers & GanttActionInitializers & MapActionInitializers › TableActionInitializers should add bulk update
⚠️ [chromium] › plugins/@nocobase/plugin-auth/src/client/__e2e__/auth.test.ts:21:7 › auth › register
⚠️ [chromium] › plugins/@nocobase/plugin-file-manager/src/client/__e2e__/block.test.ts:53:7 › file collection block › correctly size
⚠️ [chromium] › plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/datetime/schemaInitializer.test.ts:86:7 › table column & table › configure columns
⚠️ [chromium] › plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaSettings.test.ts:14:7 › bulk edit action setting › data will be updated && edit form configure
⚠️ [chromium] › core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/dragAndDrop.test.ts:12:5 › fields
⚠️ [chromium] › core/client/src/modules/variable/__e2e__/basic.test.ts:14:7 › variables › linkage rules of table view action
⚠️ [chromium] › plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaInitailizer.test.ts:14:7 › TableActionInitializers & GanttActionInitializers & MapActionInitializers should add bulk edit action › bulk edit in TableActionInitializers
⚠️ [chromium] › plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/schemaSettings.test.ts:14:7 › data will be updated && Assign field values && after successful submission › data will be updated && Assign field values && after successful submission

693 passed, 14 skipped
✔️✔️✔️

Full HTML report. Merge workflow run.

@mytharcher mytharcher merged commit 40999ed into main May 30, 2024
22 checks passed
@mytharcher mytharcher deleted the T-4401 branch May 30, 2024 11:22
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

Successfully merging this pull request may close these issues.

None yet

1 participant