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

ERROR: Cannot read properties of undefined (reading 'map') #2

Open
test123-all opened this issue Jan 22, 2023 · 2 comments
Open

ERROR: Cannot read properties of undefined (reading 'map') #2

test123-all opened this issue Jan 22, 2023 · 2 comments

Comments

@test123-all
Copy link

test123-all commented Jan 22, 2023

Hey,
I happily found your influxdb node for n8n.
But I can't get the block to work. Since there is no documentation, am I doing something wrong?
Screenshot_20230122_161608

I get the following error:

ERROR: Cannot read properties of undefined (reading 'map')

Stack
TypeError: Cannot read properties of undefined (reading 'map')
    at Object.execute (/home/node/.n8n/nodes/node_modules/n8n-nodes-influxdb/nodes/InfluxDb/InfluxDb.node.ts:50:78)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:659:28)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:585:53

I tried the following:

  • converting the parameters to arrays
  • putting '"' signs around the names
  • putting ',' behind each representation
  • using a different user token for the authentication

The code/JSON to reproduce my not working minimal example n8n block workflow is:

{
  "meta": {
    "instanceId": "b4c0477d9c77b502d994bf5d4f1a071143b79c0201f8c81c86a75fe53af936a4"
  },
  "nodes": [
    {
      "parameters": {
        "measurement": "=measurementName",
        "tags": "=heightTag",
        "fields": "=heightField",
        "options": {
          "timestampField": "=timestamp_test"
        }
      },
      "id": "25bbe152-61cb-4116-9a44-cbe6fea27ab3",
      "name": "InfluxDB",
      "type": "n8n-nodes-influxdb.influxDb",
      "typeVersion": 1,
      "position": [
        1960,
        80
      ],
      "credentials": {
        "influxDb": {
          "id": "1",
          "name": "InfluxDB 2.x account"
        }
      }
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "measurementName",
              "value": "test_measurement"
            },
            {
              "name": "heightTag",
              "value": "cm"
            },
            {
              "name": "timestamp_test",
              "value": "2023-01-22T00:20:46+0000"
            }
          ],
          "number": [
            {
              "name": "heightField",
              "value": 100
            }
          ]
        },
        "options": {}
      },
      "id": "50361251-e837-48d9-a79e-367293182727",
      "name": "Set1",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        1700,
        80
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "id": "f8e898d3-26eb-4ef0-8fbd-807a2c62122e",
      "name": "Schedule Trigger1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        1440,
        80
      ]
    }
  ],
  "connections": {
    "Set1": {
      "main": [
        [
          {
            "node": "InfluxDB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "Set1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Kind regards

@Benjamin-Hofftoth
Copy link

Same Issue on my side:

TypeError: Cannot read properties of undefined (reading 'map') at Object.execute (/home/XX/.n8n/nodes/node_modules/n8n-nodes-influxdb/nodes/InfluxDb/InfluxDb.node.ts:50:78) at Workflow.runNode (/home/XX/.npm/_npx/a8a7eec953f1f314/node_modules/n8n-workflow/src/Workflow.ts:1270:19) at /home/XX.npm/_npx/a8a7eec953f1f314/node_modules/n8n-core/src/WorkflowExecute.ts:939:29

Bildschirmfoto vom 2023-01-25 11-24-54

@JaCoB1123
Copy link

I just had the same problem and the solution for me was adding a default tag and supplying any value.

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

3 participants