Ftp list file error

I am writing to report an issue I am experiencing with the FTP node. Specifically, I am using the node to list files in a directory. It works perfectly fine with filenames that are in Latin characters, but it fails to work with non-Latin languages such as Chinese.

What is the error message (if any)?

ERROR: Cannot create property ‘modifyTime’ on string ‘#短发.mp4’

TypeError: Cannot create property 'modifyTime' on string '#短发.mp4'
    at normalizeFtpItem (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Ftp/Ftp.node.js:56:21)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Ftp/Ftp.node.js:537:60
    at Array.forEach (<anonymous>)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Ftp/Ftp.node.js:537:42)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:653:28)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:590:53

Information on your n8n setup

Hi @macosupdate!

I was able to at least list a file with the FTP node using the list command that had non-latin characters:

Could you let me know if your server is SFTP or FTP, and what provider you’re using? There may be an issue with the UTF8 encoding :thinking:

1 Like

I’m using FTP not SFTP
I’m using nas synology’s FTP

With Synology, it looks like there’s some issues with uploading files and keeping their filenames intact with certain types of encoding.

You could also try to force UTF8. SFTP in particular, if you switch to it, must use UTF-8 (which could also be the issue you’re running into here).

I was able to access and action on files with non-Latin characters just fine from inside n8n, so you might need to head over to Synology’s community forum to troubleshoot a little further.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.