orbitdb-archive / orbit-db-http-api

A HTTP API Server for the OrbitDB distributed peer-to-peer database
MIT License
37 stars 11 forks source link

Database interaction issues #49

Open kamil-wojtowicz opened 2 years ago

kamil-wojtowicz commented 2 years ago

Hi guys! I've been trying to set up your API on my Ubuntu 20.04 machines and I've ran into some issues. First of all, my setup

  1. The API doesn't seem to work with go-ipfs 0.10.0 and up Every curl database request is replied with statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred. I can only obtain the "/identity" . When I dropped the go-ipfs version to 0.9.0 I managed to create some simple databases. Still, I can't create a database with a modified access in such a way: curl -X POST http://localhost:3000/db/testdb -H "Content-Type: application/json" --data '{"create":"false","type":"feed","accessController":{"type": "orbitdb","write": ["3045022100e7abaa4675852d37e42a0a2bcc660250472805cd83364125419d19470391cb0b022000f840f50ab1928a0accc6c992394e79f0e9376f3b5e964c79a5e14aa8c65df2"]}}' This command is also replied with the same "500" error. The API shows this error message:
    Debug: internal, implementation, error 
    TypeError: __db_write.includes is not a function
    at DBManager.db_info (/api/src/lib/db-manager.js:85:39)
    at handler (/api/src/lib/orbitdb-api.js:117:32)

    I've tested this on both the Docker image (from dockerhub) and the code from the repo. The docker image presents the aforementioned behavior The code form the repo also presents the same behaviour when I run it with node v12.0.0 The code from the repo just hangs when I run it with node v16.13.1

Any help will be appreciated. Thanks in advance!

sgmihai commented 2 years ago

I tried with 0.14 and 0.9, both give me code 500 with curl, when trying to create a database.

spriyabalan commented 2 years ago

I am also facing the same issue. Create DB gives 500 error