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

Bug in 1.34.0 when using timeMin set to $now when getting all events in Google Calendar node #8961

Closed
blastik opened this issue Mar 23, 2024 · 2 comments

Comments

@blastik
Copy link

blastik commented Mar 23, 2024

Bug Description

Im getting the following error

{
  "errorMessage": "date.endsWith is not a function",
  "errorDetails": {},
  "n8nDetails": {
    "n8nVersion": "1.34.0 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "TypeError: date.endsWith is not a function",
      "    at hasTimezone (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Calendar/GenericFunctions.js:131:36)",
      "    at addTimezoneToDate (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Calendar/GenericFunctions.js:133:9)",
      "    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Calendar/GoogleCalendar.node.js:340:83)",
      "    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:724:42)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:660:68",
      "    at processTicksAndRejections (node:internal/process/task_queues:95:5)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1062:20"
    ]
  }
}

To Reproduce

It seems that from 1.34.0 when using timeMin parameter set to $now it does not work any longer

    {
      "parameters": {
        "operation": "getAll",
        "calendar": {
          "__rl": true,
          "value": "whatever@whatever.es",
          "mode": "list",
          "cachedResultName": "whatever@whatever.es"
        },
        "limit": 8,
        "options": {
          "timeMin": "={{ $now }}",
          "orderBy": "startTime",
          "singleEvents": true
        }
      },
      "id": "UID",
      "name": "Google Calendar",
      "type": "n8n-nodes-base.googleCalendar",
      "typeVersion": 1,
      "position": [
        160,
        180
      ],
      "credentials": {
        "googleCalendarOAuth2Api": {
          "id": "UID",
          "name": "whatever"
        }
      }
    },

Expected behavior

Fetch calendar events

Operating System

Truenas / K8S

n8n Version

1.34.0

Node.js Version

18.19.1

Database

PostgreSQL

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Mar 25, 2024

Hey @blastik,

Is this still an issue for you in 1.34.1?

@blastik
Copy link
Author

blastik commented Mar 26, 2024

fixed in 1.34.1

@blastik blastik closed this as completed Mar 26, 2024
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

2 participants