fix: add timing delay in script-02 between feed write and read#1
Merged
NoahMaizels merged 1 commit intoethersphere:mainfrom Mar 30, 2026
Merged
Conversation
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>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
script-02.jsfails immediately after a feed write when the read happens with no delay — the Bee node returns404 "lookup at failed"because the SOC chunk hasn't been indexed yetsetTimeoutdelay after eachwriter.upload()call and before the subsequentreader.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.jsandscript-03.jspass without issue;script-02.jsfails 100% of the time without the delay and passes reliably with it.Test plan
node script-02.jsagainst a local Bee node with a valid batch ID — should complete without errors and print feed indices0nand1n🤖 Generated with Claude Code