Possible Bug with Set node Vers 0.225

Hi,
Updated cloud version (and also happening on hosted) to the latest 0.225 and 0.226 from 0.222 and now have an unexpected behaviour on set node that now ends with Error.

Any ideas on what changed?

ok flow

flow

ok response before update

Error

TypeError: Cannot read properties of undefined (reading 'name')
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1203:96
    at Array.forEach (<anonymous>)
    at cleanupParameterData (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1200:32)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1196:38
    at Array.forEach (<anonymous>)
    at cleanupParameterData (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1196:19)
    at getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1226:9)
    at Object.getNodeParameter (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1446:24)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Set/Set.node.js:173:18)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:652:51)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:592:68
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Digging in.
one of the values set on the set node comes from a previous XML to Json node.
Any idea on how to solve?

Thanks!
Andres

The set node cant handle this:

[Object: {“lst”: [{“name”: “responseHeader”, “bool”: {““: “true”, “name”: “zkConnected”}, “int”: [{””: “0”, “name”: “status”},{““: “6”, “name”: “QTime”}], “lst”: {“name”: “params”, “str”: {””: “*”, “name”: “fl”}, “arr”: {“name”: “fq”, “str”: [“instanceId:0007c211-2aa4-49d9-b185-a77b82da7aa6”, “productId:68675”]}}},{“name”: “facet_counts”, “lst”: [{“name”: “facet_queries”},{“name”: “facet_fields”},{“name”: “facet_ranges”},{“name”: “facet_intervals”},{“name”: “facet_heatmaps”}]}], “result”: {“name”: “response”, “numFound”: “1”, “start”: “0”, “maxScore”: “1.0”, “doc”: {“str”: [{““: “0007c211-2aa4-49d9-b185-a77b82da7aa6”, “name”: “instanceId”},{””: “345408”, “name”: “defaultSkuId”},{““: “[{"TotalReview": 0,"ReviewRate": 0.0,"SkuId": "345408"},{"TotalReview": 0,"ReviewRate": 0.0,"SkuId": "345409"},{"TotalReview": 0,"ReviewRate": 0.0,"SkuId": "345410"},{"TotalReview": 0,"ReviewRate": 0.0,"SkuId": "345411"},{"TotalReview": 0,"ReviewRate": 0.0,"SkuId": "345412"},{"TotalReview": 0,"ReviewRate": 0.0,"SkuId": "345413"}]”, “name”: “skuDocumentReviewConsolidations”},{””: “68675_all”, “name”: “documentId”},{““: “Hoodie Relaxed Fit con motivo estampado”, “name”: “productName”},{””: “Hoodie Relaxed Fit con motivo estampado”, “name”: “ngramName”},{““: “Hoodie”, “name”: “productFirstName”},{””: “Hoodie Relaxed”, “name”: “productFirstAndSecondName”},{““: “Azul”, “name”: “nameComplement”},{“name”: “keyWords”},{””: “1019679036”, “name”: “linkId”},{““: “instanceId:0007c211-2aa4-49d9-b185-a77b82da7aa6_68675_all”, “name”: “id”},{””: “69DE30EAB304C14CAE2E59A8FAC5DA5C”, “name”: “skuDocumentItemEtag”},{““: “B1FF810C126B4010BBFFCDD44D401A91”, “name”: “skuDocumentItemEtagV2”},{””: “Hoodie Relaxed Fit con motivo estampado”, “name”: “nameToOrder”}], “float”: [{““: “9999876.0”, “name”: “bestPricePerSalesChannel_1”},{””: “0.0”, “name”: “priceFrom”},{““: “0.0”, “name”: “priceTo”},{””: “0.0”, “name”: “listPriceFrom”},{““: “0.0”, “name”: “listPriceTo”}], “int”: [{””: “14”, “name”: “vtexscore”},{““: “0”, “name”: “availabilityPerSalesChannel_1”},{””: “0”, “name”: “isAvailablePerSalesChannel_1”},{““: “0”, “name”: “quantitySoldPerSalesChannel_1”},{””: “1”, “name”: “isActive”},{““: “0”, “name”: “isVisible”},{””: “1”, “name”: “brandId”},{““: “551855”, “name”: “directCategoryId”},{””: “551400”, “name”: “departmentId”},{““: “1”, “name”: “commercialConditionId”},{””: “33”, “name”: “productClusterOrder_225”},{““: “31”, “name”: “productClusterOrder_229”},{””: “45”, “name”: “productClusterOrder_241”},{““: “25”, “name”: “productClusterOrder_247”}], “date”: [{””: “2023-01-24T00:00:00Z”, “name”: “releaseDate”},{““: “2023-03-15T19:39:33.617Z”, “name”: “commercialOfferLastUpdateUtc”},{””: “2023-03-15T19:39:33.617Z”, “name”: “catalogLastUpdateUtc”}], “long”: [{““: “68675”, “name”: “productId”},{””: “1760463865637765120”, “name”: “version”}], “arr”: [{“name”: “skuId”, “long”: [“345408”, “345409”, “345410”, “345411”, “345412”, “345413”]},{“name”: “categoriesId”, “int”: [“551855”, “551459”, “551400”, “551887”, “2880837”, “7741912”]},{“name”: “categoriesFullPath”, “str”: [“/551400/551459/551855/”, “/551400/551459/”, “/551400/”, “/551400/551887/”, “/551400/2880837/”, “/551400/551459/7741912/”]},{“name”: “productClusterIds”, “int”: [“147”, “157”, “166”, “208”, “225”, “229”, “241”, “247”, “387”]},{“name”: “productClusterSearchableIds”, “int”: [“147”, “157”, “247”]},{“name”: “alternateIdValues”, “str”: [“1019679036”, “1019679036001”, “1019679036002”, “1019679036003”, “1019679036004”, “1019679036005”, “1019679036006”]},{“name”: “alternateIds_RefId”, “str”: [“1019679036”, “1019679036001”, “1019679036002”, “1019679036003”, “1019679036004”, “1019679036005”, “1019679036006”]},{“name”: “specificationFilter_123”, “str”: “Manga larga”},{“name”: “specificationFilter_124”, “str”: “Largo normal”},{“name”: “specificationFilter_128”, “str”: “Buzo con capucha”},{“name”: “specificationFilter_134”, “str”: “Lavado a máquina a 40°”},{“name”: “specificationFilter_135”, “str”: “Planchar a temperatura media”},{“name”: “specificationFilter_136”, “str”: “En caso necesario, usar solo lejía sin cloro”},{“name”: “specificationFilter_137”, “str”: “Secadora a temperatura media”},{“name”: “specificationFilter_138”, “str”: “No limpiar en seco”},{“name”: “specificationFilter_156”, “str”: [“Blue/Green”, “Azul/Verde”]},{“name”: “specificationFilter_157”, “str”: “Echoes of a previous life”},{“name”: “specificationFilter_107”, “str”: “Forro de la capucha: Algodón 60%,Poliéster 40%”},{“name”: “specificationFilter_118”, “str”: “Corte relajado”},{“name”: “specificationFilter_119”, “str”: “1019679036”},{“name”: “specificationFilter_161”, “str”: “Cambodia”},{“name”: “specificationFilter_162”, “str”: “Azul”},{“name”: “specificationFilter_173”, “str”: “Hombre”},{“name”: “specificationFilter_174”, “str”: “Adulto”},{“name”: “specificationFilter_175”, “str”: “Ropa”},{“name”: “specificationFilter_176”, “str”: “Casual”},{“name”: “specificationFilter_177”, “str”: “#4A6991”},{“name”: “specificationFilter_178”, “str”: [“Azul”, “Multi”]},{“name”: “specificationFilter_180”, “str”: “Saco”}]}}}]

Solved.

JSON.stringify() the previous response to include in the set node value.

However, something changed in the set node… or teh XML to JSON node because it used to work without having to stringify the json result.

Hi @pradilla - thanks for posting your solution on this! Having a quick peek, I didn’t see any particular change to the Set node since version 0.220.0.

Could you share the original workflow that you were using that failed after updating? When @Jon is back in, he can take a look into what might have happened. :+1:

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