p2panda / aquadoggo

Node for the p2panda network handling validation, storage, aggregation and replication
GNU Affero General Public License v3.0
70 stars 5 forks source link

Failed to write blob to filesystem on Windows #644

Closed Corban-Dallas closed 2 months ago

Corban-Dallas commented 2 months ago

Hello!

I continue to work slowly on my pet project based on Aquadoggo. Recently, I started working with blobs and encountered a bug after running Aquadoggo on Windows after publishing a book file as blob.

[2024-08-31T09:24:24Z INFO  aquadoggo::materializer::tasks::blob] Creating blob at path C:\Users\grish\AppData\Roaming\com.example\ark_books\blob\002048ca646998e925ae0ff91ef364d1b37a4e705b0841b46eb5bd452703b251ff77
[2024-08-31T09:24:24Z ERROR aquadoggo::materializer::worker] Critical error in worker blob with task <QueueItem 362 w. <TaskInput -/002048ca646998e925ae0ff91ef364d1b37a4e705b0841b46eb5bd452703b251ff77>>: Could not create blob file @ C:\Users\grish\AppData\Roaming\com.example\ark_books\blob\002048ca646998e925ae0ff91ef364d1b37a4e705b0841b46eb5bd452703b251ff77: The system cannot find the path specified. (os error 3)

The app has read/write permissions for this directory. The problem is likely related to the path format. Typically, PathBuf under Windows represents paths like this: "C:\\path\\to\\file".

sandreae commented 2 months ago

Hello @Corban-Dallas thanks for posting the issue, good to pick up platform related bugs if that is the case.

Before digging into that though, can I just make sure that the blob directory does exist already, before you're trying to create a new blob? I don't believe it is created by aquadoggo on the fly, the configuration needs to point at an existing directory.

Corban-Dallas commented 2 months ago

Yeah, it does not created during clean app start. Have checked it now, blob is saved if blob dir was created manualy. My bad.