simplex-chat / simplex-chat/simplex-chat

[BUG]: invoke `apiNewGroup` and got the error message `Failed reading: empty`

Open
#5,132 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question triage
Dominant language
Haskell
Stars
19.5k
Forks
1.4k
Avg merge
1d 20h
Merged PRs (30d)
71

Description

Question

background

I host my own smp-server and I want to develop bot, so I run the simplex-chat CLI and create a node.js project using official package simplex-chat to connect it. The version of all below:

  1. smp-server: v6.0.2.0
  2. simplex-chat CLI: v6.1.1.0
  3. simplex-chat npm package: v0.2.1

re-product

I used this command to run simplex-chat CLI: simplex-chat --database=test --device-name=mbp --server=smp://xxxxxxx@x.x.x.x:6775 --xftp-server=xftp://xxxxxxxx@x.x.x.x:6776 -l debug --display-name=Test -p 8080

and then create the group in my node.js project

    const newGroup = await chat.apiNewGroup({
      displayName: groupName,
      fullName: groupName,
      // image: icon
    })

then I got the error message Failed reading: empty.

Here is the CLI message:

[INFO 2024-11-02 11:04:26 +0800 src/Simplex/Messaging/Transport/Server.hs:188] binding to 127.0.0.1:8080
[INFO 2024-11-02 11:04:26 +0800 src/Simplex/Messaging/Agent/Client.hs:851] Agent connected to x.x.x.x:6775 (user 1)
[INFO 2024-11-02 11:04:26 +0800 src/Simplex/Messaging/Agent/Client.hs:1541] A (1) --> x.x.x.x:6775 : MiBx SUB
client connected
received command "1" : "/u"
received command "2" : "/show_address"
received command "3" : "/auto_accept on"
received command "4" : "/_group {\"displayName\":\"Notification-Center-X\",\"fullName\":\"Notification-Center-X\"}"

I used simplex-chat CLI terminal mode to create group and it didn't have any problem.
image

Thank you for any help.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the npm package entry point apiNewGroup and compare its request with the CLI's _group command, using the reproduced versions and debug log in the issue. Reproduce the empty-reading error against the stated simplex-chat CLI setup, then confirm that creating the same group through the Node.js package completes without the error.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell, javascript, node.js
Domain
api, backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.