n8n-io/n8n

Microsoft OneDrive Trigger - Watch Nested Folders results in error

bryantlee opened this issue · 5 comments

Bug Description

No issues on watching a folder by ID. But the moment I click on "Watch Nested Folders" - I get the following error:

{ "errorMessage": "Cannot read properties of undefined (reading 'startsWith')", "errorDetails": {}, "n8nDetails": { "n8nVersion": "1.37.3 (Self Hosted)", "binaryDataMode": "default", "stackTrace": [ "TypeError: Cannot read properties of undefined (reading 'startsWith')", " at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/OneDrive/MicrosoftOneDriveTrigger.node.js:92:88", " at Array.filter (<anonymous>)", " at Object.poll (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Microsoft/OneDrive/MicrosoftOneDriveTrigger.node.js:92:45)", " at processTicksAndRejections (node:internal/process/task_queues:95:5)", " at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:747:32)", " at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:660:53", " at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1062:20" ] } }

image

To Reproduce

  1. Configure MSFT OneDrive Trigger
  2. Trigger on "File Created"
  3. Enable Watch Folder
  4. Enter Folder ID
  5. Enable Watch Nested Folders

Expected behavior

Ability to get events for nested folders in OneDrive folder

Operating System

Official Docker

n8n Version

1.37.3

Node.js Version

v18.19.1.

Database

SQLite (default)

Execution mode

main (default)

Hey @bryantlee,

Thanks for the report, I have popped in a PR that should resolve this and will be available in a future release once reviewed and merged.

thank you!

I am not sure if you already noticed but the error only appears when testing so you can still activate your workflow and it should work.

I noticed you mention during testing in your pr. I've already worked around it but great to know I can simplify my flow soon. Thanks!