S3 List all files in a bucket query returns null

I have a S3 query called getAllFiles which lists all the files in an S3 bucket (1300 objects). I reference that query in a Javascript transformer:

var files = {{ getAllFiles.data }}

This query intermittently returns null. Every time my app runs in Preview mode, the query returns null; however, in Edit mode, the query always successfully returns a list of results, so it's not my query logic.

Some hypotheses:

  • Retool has a request timeout for calls to S3, and because it takes too long to return the list of 1300 files, the request times out and returns null as the response
  • S3 is throwing null as a response (unlikely, since the query always succeeds when I manually trigger just the S3 query)
  • Memory issues upon initial page load?

Hi @jessie! This is a bit strange that it works in edit mode but not preview :thinking: Are there any console errors when you're triggering the query in preview mode?

Is it an automatically triggered query? Is the timeout setting maximized to 120 seconds:

It's an automatically triggered query against s3 when the page loads.. I set the timeout to 120 seconds and still get the same error.

Hi @jessie! Can we see a screenshot of the full js transformer?

Is the transformer's response the way that you determine whether the s3 query successfully returned data?