Possible BUG: NodeJS with Docker / Send Mail Error with attachments

Wappler Version : 4.11
Operating System : macOS Big Sur (M1)
Server Model: NodeJS
Database Type: MySQL
Hosting Type: Docker

Expected behavior

What do you think should happen?

Attachments should be sent with Send Mail

Actual behavior

What actually happens?

I get the following error on post

    "status": "500",
    "message": "path.toSystemPath: Invalid path \"[object Object]\".",
    "stack": "Error: path.toSystemPath: Invalid path \"[object Object]\".\n    at Object.toSystemPath (/opt/node_app/lib/core/path.js:28:19)\n    at Object.getFilesArray (/opt/node_app/lib/core/path.js:19:43)\n    at getFilesArray (/opt/node_app/lib/core/path.js:17:53)\n    at App.send (/opt/node_app/lib/modules/mail.js:43:27)\n    at async App._exec (/opt/node_app/lib/core/app.js:435:30)\n    at async App.exec (/opt/node_app/lib/core/app.js:375:9)\n    at async App.condition (/opt/node_app/lib/modules/core.js:97:17)\n    at async App._exec (/opt/node_app/lib/core/app.js:435:30)\n    at async App._exec (/opt/node_app/lib/core/app.js:406:17)\n    at async App.exec (/opt/node_app/lib/core/app.js:375:9)"

How to reproduce

  • Detail a step by step guide to reproduce the issue
  • A screenshot or short video indicating the problem
  • A copy of your code would help. Include: JS, HTML.
  • Test your steps on a clean page to see if you still have an issue

Project Setting

Server Action

The path in the db is as follows:


The attachment(s) property accepts a single file path or an array of file paths. In your case you give it a full database query result.

I know, but it worked the exact same way with PHP. That is why I was wondering. The Query Result is only the path. What should I change to get the correct array with my actual Server Action Setup?

There was a post about this some time ago:

1 Like

I checked the PHP version and made the changes for NodeJS. Important is that the record has the the path in a property/field called path.

Unzip the file to lib/core.

path.zip (963 Bytes)

1 Like

Thank you for the updated file! I can confirm it is working if the name/alias of the field is set to path.

@patrick thank you for your great support!

This has been fixed in Wappler 4 beta 12

This topic was automatically closed after 47 hours. New replies are no longer allowed.