Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

grpc empty object when updating the library index  #2046

Copy link
Copy link
Closed
@Bikappa

Description

@Bikappa
Issue body actions

Describe the problem

When using an grpclient to update the library index, command UpdateLibrariesIndex, the download process is ended by and empty object following the "end" message

To reproduce

Start the CLI in deamon mode

arduino-cli daemon

Create an instance (here using the grpcurl tool)

grpcurl \
  -plaintext \
  -import-path ./rpc \
  -proto cc/arduino/cli/commands/v1/commands.proto \
  127.0.0.1:50051 \
  cc.arduino.cli.commands.v1.ArduinoCoreService.Create

Issue an UpdateLibrariesIndex command

grpcurl \
  -plaintext \
  -import-path ./rpc \
  -proto cc/arduino/cli/commands/v1/commands.proto \
  -d '{"instance": {"id": 1}}' \
  127.0.0.1:50051 \
  cc.arduino.cli.commands.v1.ArduinoCoreService.UpdateLibrariesIndex

You should observe an output similar to the following

{
 "downloadProgress": {
   "start": {
     "url": "https://downloads.arduino.cc/libraries/library_index.tar.bz2",
     "label": "Downloading index: library_index.tar.bz2"
   }
 }
}
{
 "downloadProgress": {
   "update": {
     "downloaded": "2358123",
     "totalSize": "2358123"
   }
 }
}
{
 "downloadProgress": {
   "end": {
     "success": true
   }
 }
}
{

}

Notice how there's an empty {} object at the bottom

Expected behavior

The message

{
  "downloadProgress": {
    "end": {
      "success": true
    }
  }
}

Closes the stream with no additional objects

Arduino CLI version

commit a58d5ad

Operating system

macOS

Operating system version

13.1 (22C65)

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details

Metadata

Metadata

Labels

conclusion: resolvedIssue was resolvedIssue was resolvedtopic: codeRelated to content of the project itselfRelated to content of the project itselftopic: gRPCRelated to the gRPC interfaceRelated to the gRPC interfacetype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.