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

AWS S3 repeats first item in search with prefix #10996

Closed
leesilverman opened this issue Sep 27, 2024 · 3 comments
Closed

AWS S3 repeats first item in search with prefix #10996

leesilverman opened this issue Sep 27, 2024 · 3 comments
Labels
in linear Issue or PR has been created in Linear for internal review Released

Comments

@leesilverman
Copy link

Bug Description

Looks like for whatever reason the AWS s3 module is just using the first item over and over again instead of looping through all items.

Prefix option is set to use a value from the input. Input has 3 items. The folder (prefix) for the first item has 9 objects. The output has 27 objects. It's the 9 objects from the first item, repeated 3x - once for each input item.

{ "meta": { "instanceId": "56a3b6e808c84fdadd2d80585289500a7b27625c2792fc6c214518fe7ce0a003" }, "nodes": [ { "parameters": { "resource": "bucket", "operation": "search", "bucketName": "wrd-media-archive", "returnAll": true, "additionalFields": { "prefix": "=instagram/{{ $json.id }}" } }, "id": "6db668ef-823d-4fdc-b267-e64c998e3f7d", "name": "List wrd-media-archive-directory", "type": "n8n-nodes-base.awsS3", "typeVersion": 2, "position": [ 1800, 1040 ], "credentials": { "aws": { "id": "xT7Ztjk2dBmYX3TD", "name": "Lee WRD AWS API Key access" } } } ], "connections": {}, "pinData": {} }

To Reproduce

  1. Create a dummy/test bucket
  2. Create an S3 folder named "test"
  3. Create 4 subfolders in test named a, b, c, d
  4. In each subfolder, upload a few files, but make sure they're different so you can distinguish the file contents of a vs b vs c
  5. Create an input with 4 items: id="a", "id="b", etc
  6. Set the AWS S3 module to "Search" and set the prefix option to "test/{{$json.id}}

If you reproduce the bug, you'll see the objects in subfolder a 4x in the output, instead of seeing separate results for each input row.

Expected behavior

All items in the input should be processed. Ideally there's a 1-1 correspondence, where one input row = one output row with an array of search results or empty if there are no results.

Operating System

Amazon Linux 2003

n8n Version

1.59.4

Node.js Version

22

Database

PostgreSQL

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Sep 27, 2024

Hey @leesilverman,

We have created an internal ticket to look into this which we will be tracking as "GHC-261"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Sep 27, 2024
@Joffcom
Copy link
Member

Joffcom commented Sep 30, 2024

Hey @leesilverman,

Thanks for the report, The fix for this has been merged and will be included in the next release.

@janober
Copy link
Member

janober commented Oct 2, 2024

Fix got released with n8n@1.62.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review Released
Projects
None yet
Development

No branches or pull requests

3 participants