ethersphere / bee

Bee is a Swarm client implemented in Go. It’s the basic building block for the Swarm network: a private; decentralized; and self-sustaining network for permissionless publishing and access to your (application) data.
https://www.ethswarm.org
BSD 3-Clause "New" or "Revised" License
1.44k stars 338 forks source link

SOC creation is broken in `bee dev` #4652

Open mattiaz9 opened 2 months ago

mattiaz9 commented 2 months ago

Context

bee: 2.0.0-501f8a4e os: macOS 14.4.1 (ARM) node: v20.10.0

Summary

It seems like SOC creation is broken when bee is in dev mode. The api returns a bad request response without any other information about it.

I've tried using a production instance of bee and it works just fine, thus it might be only a dev mode problem.

Expected behavior

It should upload a SOC as expected.

Actual behavior

Bee returns a 400 error: Bad request.

Steps to reproduce

import { Bee } from "@ethersphere/bee-js"

const batchId = "b7f218456f049a1064c27e079a39c0b31cfe7739cfc002a418b5c77447357930"
const client = new Bee("http://localhost:1633")

const { reference } = await client.uploadFile(batchId, "Hello, world!", "Test", {
  contentType: "text/plain",
})

console.log("Reference: ", reference)

const topic = client.makeFeedTopic("my-topic")
const feedWriter = client.makeFeedWriter(
  "sequence",
  topic,
  "bc0cf95cce9e38eea03798562fa6ee760dc58666eb8451c56a85dcf121295380"
)

await feedWriter.upload(batchId, reference)
ottpeter commented 1 month ago

We heard that SOC creation is intentionally not supported in dev mode anymore, but we think development would be much easier, if it would support it. For example, when testing swarm-cli.