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

Plugin accounting-files failed: TypeError [ERR_INVALID_ARG_TYPE] #71

Open
sebasanta opened this issue Aug 29, 2024 · 0 comments
Open

Plugin accounting-files failed: TypeError [ERR_INVALID_ARG_TYPE] #71

sebasanta opened this issue Aug 29, 2024 · 0 comments

Comments

@sebasanta
Copy link

When starting Haraka with haraka-plugin-accounting-files installed I get this error:
[CRIT] [-] [server] Plugin accounting-files failed: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
at Object.writeFileSync (node:fs:2350:5)
at createFileIfNotExist (node_modules/haraka-plugin-accounting-files/index.js:393:12)
at GenerateNewFile (node_modules/haraka-plugin-accounting-files/index.js:360:9)
at exports.init_plugin (node_modules/haraka-plugin-accounting-files/index.js:75:5)
at plugins.run_next_hook (node_modules/Haraka/plugins.js:518:28)
at plugins.run_hooks (node_modules/Haraka/plugins.js:429:13)
at Server.setup_smtp_listeners (node_modules/Haraka/server.js:459:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I fixed this by changing line 393 of index.js
from fs.writeFileSync(filename);
to fs.writeFileSync(filename,'');

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