Skip to content

fix: add timing delay in script-02 between feed write and read#1

Merged
NoahMaizels merged 1 commit intoethersphere:mainfrom
NoahMaizels:fix/script-02-feed-read-timing
Mar 30, 2026
Merged

fix: add timing delay in script-02 between feed write and read#1
NoahMaizels merged 1 commit intoethersphere:mainfrom
NoahMaizels:fix/script-02-feed-read-timing

Conversation

@NoahMaizels
Copy link
Copy Markdown
Collaborator

Summary

  • script-02.js fails immediately after a feed write when the read happens with no delay — the Bee node returns 404 "lookup at failed" because the SOC chunk hasn't been indexed yet
  • Added a 1-second setTimeout delay after each writer.upload() call and before the subsequent reader.downloadReference() call (two places in the script)

How it was found

Running the scripts against a local Bee node (v7.3.0 API) as part of testing the Dynamic Content developer guide. script-01.js and script-03.js pass without issue; script-02.js fails 100% of the time without the delay and passes reliably with it.

Test plan

  • Run node script-02.js against a local Bee node with a valid batch ID — should complete without errors and print feed indices 0n and 1n

🤖 Generated with Claude Code

After writer.upload() stores a feed SOC chunk, the Bee node needs
a brief moment to index it before reader.downloadReference() can
find it. Without this delay the script fails immediately with a
404 "lookup at failed" error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant