Skip to content

Crash when requesting platforms list over gRPC #1434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4ntoine opened this issue Sep 7, 2021 · 34 comments · Fixed by #1519
Closed

Crash when requesting platforms list over gRPC #1434

4ntoine opened this issue Sep 7, 2021 · 34 comments · Fixed by #1519
Assignees
Labels
topic: gRPC Related to the gRPC interface type: imperfection Perceived defect in any part of project

Comments

@4ntoine
Copy link
Contributor

4ntoine commented Sep 7, 2021

Bug Report

Current behavior

via gRPC - requesting the list of platforms

it crashes with the stacktrace:

> arduino-cli daemon
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x47ca4ba]

goroutine 8 [running]:
github.com/arduino/arduino-cli/commands.PlatformReleaseToRPC(0x0, 0x0)
	github.com/arduino/arduino-cli/commands/core.go:31 +0x3a
github.com/arduino/arduino-cli/commands/core.GetPlatforms(0xc00124ab00, 0xc0011e5b00, 0x0, 0xc000559b10, 0x400dd25, 0x4b20a40)
	github.com/arduino/arduino-cli/commands/core/list.go:54 +0x1c5
github.com/arduino/arduino-cli/commands/daemon.(*ArduinoCoreServerImpl).PlatformList(0xc0001b3fc0, 0x4ca1a70, 0xc0012ae3c0, 0xc00124ab00, 0xc0001b3fc0, 0xc0012ae3c0, 0xc000065b80)
	github.com/arduino/arduino-cli/commands/daemon/daemon.go:272 +0x2f
github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1._ArduinoCoreService_PlatformList_Handler(0x4b413a0, 0xc0001b3fc0, 0x4ca1a70, 0xc0012ae3c0, 0xc001277500, 0x0, 0x4ca1a70, 0xc0012ae3c0, 0xc0010dff90, 0x6)
	github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1/commands.pb.go:3834 +0x217
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000083380, 0x4cab8d8, 0xc000001b00, 0xc0011e5b00, 0xc00023edb0, 0x5220ea0, 0x0, 0x0, 0x0)
	google.golang.org/[email protected]/server.go:1024 +0x522
google.golang.org/grpc.(*Server).handleStream(0xc000083380, 0x4cab8d8, 0xc000001b00, 0xc0011e5b00, 0x0)
	google.golang.org/[email protected]/server.go:1313 +0xd4c
google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00032e030, 0xc000083380, 0x4cab8d8, 0xc000001b00, 0xc0011e5b00)
	google.golang.org/[email protected]/server.go:722 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/[email protected]/server.go:720 +0xa5

Expected behavior

Expected to have a response

Environment

  • CLI version (output of arduino-cli version):
> arduino-cli version
arduino-cli alpha Version: 0.18.3 Commit: d710b642 Date: 2021-05-21T17:04:33Z
  • OS and platform:
    macOS mojave 10.14.6

Additional context

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 7, 2021

However the following cli request succeeds:

> arduino-cli core list
ID              Installed Latest Name                  
arduino:avr     1.8.3     1.8.3  Arduino AVR Boards    
esp32:esp32     1.0.4     1.0.4  ESP32 Arduino         
esp8266:esp8266 2.7.1     2.7.1  ESP8266 Boards (2.7.1)

@per1234
Copy link
Contributor

per1234 commented Sep 8, 2021

arduino-cli alpha Version: 0.18.3

Hi @4ntoine. Thanks so much for your report. I see you're using a significantly outdated version of Arduino CLI. Please try again with the latest nightly build and then post an update with your results:
https://arduino.github.io/arduino-cli/dev/installation/#nightly-builds

Note also that there have been some recent breaking changes to the gRPC API:
https://arduino.github.io/arduino-cli/dev/UPGRADING/

@per1234 per1234 added status: waiting for information More information must be provided before work can proceed topic: gRPC labels Sep 8, 2021
@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

@per1234 This is the most recent version that is available via brew on mac (just tried). I will try more recent one.

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

Same for 0.19.0:

/tmp/bin asmirnov
> ./arduino-cli version
arduino-cli alpha Version: 0.19.0 Commit: 56419ecd Date: 2021-09-02T14:47:35Z
/tmp/bin asmirnov
> ./arduino-cli daemon
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x47f9d24]

goroutine 36 [running]:
github.com/arduino/arduino-cli/commands.Init(0xc0000af7a0, 0xc0004d3c00, 0x40109f8, 0x10)
	/home/build/commands/instances.go:170 +0x64
github.com/arduino/arduino-cli/commands/daemon.(*ArduinoCoreServerImpl).Init(0xc00038a720, 0xc0000af7a0, 0x4d1b748, 0xc000069750, 0xc00038a720, 0x18)
	/home/build/commands/daemon/daemon.go:226 +0x6a
github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1._ArduinoCoreService_Init_Handler(0x4b974e0, 0xc00038a720, 0x4d19468, 0xc0007f6240, 0x5310e38, 0xc00024c900)
	/home/build/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go:1164 +0x113
google.golang.org/grpc.(*Server).processStreamingRPC(0xc00018ca80, 0x4d1f658, 0xc00049ca80, 0xc00024c900, 0xc000383170, 0x52d21a0, 0x0, 0x0, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1464 +0xcd8
google.golang.org/grpc.(*Server).handleStream(0xc00018ca80, 0x4d1f658, 0xc00049ca80, 0xc00024c900, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1544 +0xca5
google.golang.org/grpc.(*Server).serveStreams.func1.(0xc0000b4070, 0xc00018ca80, 0x4d1f658, 0xc00049ca80, 0xc00024c900)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:878 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/go/pkg/mod/google.golang.org/[email protected]/server.go:876 +0x1fd
/tmp/bin asmirnov

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

Same for nightly build:

/tmp asmirnov
> curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh -s nightly-latest
Installing in /tmp/bin
ARCH=64bit
OS=macOS
Using curl as download tool
Downloading https://downloads.arduino.cc/arduino-cli/nightly/arduino-cli_nightly-latest_macOS_64bit.tar.gz
An existing arduino-cli was found at /usr/local/bin/arduino-cli. Please prepend "/tmp/bin" to your $PATH or remove the existing one.
arduino-cli alpha Version: nightly-20210908 Commit: 7415e26 Date: 2021-09-08T01:25:40Z installed successfully in /tmp/bin
/tmp asmirnov
> cd bin/
/tmp/bin asmirnov
> ./arduino-cli version
arduino-cli alpha Version: nightly-20210908 Commit: 7415e26 Date: 2021-09-08T01:25:40Z
/tmp/bin asmirnov
> ./arduino-cli daemon
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x4815d44]

goroutine 10 [running]:
github.com/arduino/arduino-cli/commands.Init(0xc00044c8d0, 0xc000147c00, 0x4010738, 0x10)
	/home/build/commands/instances.go:171 +0x64
github.com/arduino/arduino-cli/commands/daemon.(*ArduinoCoreServerImpl).Init(0xc0002d5d90, 0xc00044c8d0, 0x4d43cc8, 0xc000466bb0, 0xc0002d5d90, 0x18)
	/home/build/commands/daemon/daemon.go:226 +0x6a
github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1._ArduinoCoreService_Init_Handler(0x4bb6f00, 0xc0002d5d90, 0x4d418c8, 0xc0000123c0, 0x5346b18, 0xc000305680)
	/home/build/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go:1164 +0x113
google.golang.org/grpc.(*Server).processStreamingRPC(0xc000258a80, 0x4d47c38, 0xc000082a80, 0xc000305680, 0xc00044c270, 0x5308100, 0x0, 0x0, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1533 +0xcd8
google.golang.org/grpc.(*Server).handleStream(0xc000258a80, 0x4d47c38, 0xc000082a80, 0xc000305680, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1613 +0xca5
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc00012cd50, 0xc000258a80, 0x4d47c38, 0xc000082a80, 0xc000305680)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:934 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/go/pkg/mod/google.golang.org/[email protected]/server.go:932 +0x1fd

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

I've noted now (for 0.19.0 and later) it fails during the init() (that's probably due to breaking changes you've mentioned). I will update my .proto file and retry

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

Yup, i've regenerated the source code (for 0.19.0) and i can see version request succeeds, but init fails.
Here are the tests (Dart):

import 'package:arduino_cli_dart/cc/arduino/cli/commands/v1/commands.pbgrpc.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:grpc/grpc.dart';

void main() {
  ClientChannel _getChannel() => ClientChannel(
    'localhost',
    port: 50051,
    options: const ChannelOptions(credentials: ChannelCredentials.insecure()),
  );

  ArduinoCoreServiceClient _getClient() => ArduinoCoreServiceClient(_getChannel());

  test(' version request',  () async {
    final channel = _getChannel();
    final client = _getClient();
    var versionResponse = await client.version(VersionRequest());
    final version = versionResponse.version;
    print('Arduino cli version is: $version');
    await channel.shutdown();
  });

  test('init request',  () async {
    final channel = _getChannel();
    final client = ArduinoCoreServiceClient(channel);
    var initResponse = await client.init(InitRequest.getDefault()).single;
    expect(initResponse.hasError(), false);
    await channel.shutdown();
  });
}

I can provide access to the repo if necessary.

@per1234 per1234 removed the status: waiting for information More information must be provided before work can proceed label Sep 8, 2021
@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

jic (trying "0.19.0" with test):

/tmp asmirnov
> curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh -s 0.19.0
Installing in /tmp/bin
ARCH=64bit
OS=macOS
Using curl as download tool
Downloading https://downloads.arduino.cc/arduino-cli/arduino-cli_0.19.0_macOS_64bit.tar.gz
An existing arduino-cli was found at /usr/local/bin/arduino-cli. Please prepend "/tmp/bin" to your $PATH or remove the existing one.
arduino-cli alpha Version: 0.19.0 Commit: 56419ecd Date: 2021-09-02T14:47:35Z installed successfully in /tmp/bin
/tmp asmirnov
> cd bin/
/tmp/bin asmirnov
> ./arduino-cli daemon
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x47f9d24]

goroutine 66 [running]:
github.com/arduino/arduino-cli/commands.Init(0xc0004961b0, 0xc000061c00, 0x40109f8, 0x10)
	/home/build/commands/instances.go:170 +0x64
github.com/arduino/arduino-cli/commands/daemon.(*ArduinoCoreServerImpl).Init(0xc000454740, 0xc0004961b0, 0x4d1b748, 0xc0000a4080, 0xc000454740, 0x18)
	/home/build/commands/daemon/daemon.go:226 +0x6a
github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1._ArduinoCoreService_Init_Handler(0x4b974e0, 0xc000454740, 0x4d19468, 0xc0004ae000, 0x5310e38, 0xc0004a4000)
	/home/build/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go:1164 +0x113
google.golang.org/grpc.(*Server).processStreamingRPC(0xc00025aa80, 0x4d1f658, 0xc000471b00, 0xc0004a4000, 0xc00044b1a0, 0x52d21a0, 0x0, 0x0, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1464 +0xcd8
google.golang.org/grpc.(*Server).handleStream(0xc00025aa80, 0x4d1f658, 0xc000471b00, 0xc0004a4000, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1544 +0xca5
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc00003afd0, 0xc00025aa80, 0x4d1f658, 0xc000471b00, 0xc0004a4000)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:878 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/go/pkg/mod/google.golang.org/[email protected]/server.go:876 +0x1fd
/tmp/bin asmirnov

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

Here is the repo to reproduce.
Here is the test.
The proto files are in the dir.
To run the test flutter test.

Let me know if i need to update anything or missing anything (or just doing the wrong way).

@silvanocerza
Copy link
Contributor

Interesting, I'll investigate. Thanks for all the feedback.

Cool to see a project in Flutter use the Arduino CLI. :)

@umbynos
Copy link
Contributor

umbynos commented Sep 8, 2021

I opened another issue to track the homebrew problem #1435

@silvanocerza
Copy link
Contributor

@4ntoine the gRPC interface changed quite a bit with 0.19.0, the initialization step has been split in two parts, first you must Create an Instance and only then you can Init it.

It should be something like this in Dart.

    var createResponse = await client.create(CreateRequest.getDefault());
    var initRequest = InitRequest.create();
    initRequest.instance = createResponse.instance;
    var initResponse = await client.init(initRequest).single;

This change has been documented in the Upgrading guide: https://arduino.github.io/arduino-cli/0.19/UPGRADING/#change-of-behaviour-of-grpc-init-function

If you manage to fix this let us know if there are still issues with the PlatformList function.

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

@silvanocerza Thanks for the explanation! I will try it

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

It works now, thanks!
PS. However i'd suggest to be more careful with breaking backward compatibility

@4ntoine 4ntoine closed this as completed Sep 8, 2021
@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

Ahh, i was too happy when init() started working.
Now GetPlatform() fails (with "0.19.0"):
The test:

test('get platforms',  () async {
    final channel = _getChannel();
    final client = ArduinoCoreServiceClient(channel);
    var createResponse = await client.create(CreateRequest.getDefault());
    var initResponse = await client.init(InitRequest(
        instance: createResponse.instance
    )).single;

    final platformsResponse = await client.platformList(PlatformListRequest(
      instance: createResponse.instance,
      all: true
    ));

    await channel.shutdown();
  });

The crash:

/tmp/bin asmirnov
> ./arduino-cli core list
Error initializing instance: loading platform release esp8266:[email protected]: loading boards: skipping loading of boards esp8266:esp8266:espduino: malformed custom board options
ID              Installed Latest Name                  
arduino:avr     1.8.3     1.8.3  Arduino AVR Boards    
esp32:esp32     1.0.4     1.0.4  ESP32 Arduino         
esp8266:esp8266 2.7.1     2.7.1  ESP8266 Boards (2.7.1)

/tmp/bin asmirnov
> ./arduino-cli daemon
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x78 pc=0x47f34ba]

goroutine 20 [running]:
github.com/arduino/arduino-cli/commands.PlatformReleaseToRPC(0x0, 0x0)
	/home/build/commands/core.go:31 +0x3a
github.com/arduino/arduino-cli/commands/core.GetPlatforms(0xc0048fe040, 0xc000639b00, 0x0, 0xc0001a7b30, 0x400e125, 0x4b74380)
	/home/build/commands/core/list.go:48 +0x1ec
github.com/arduino/arduino-cli/commands/daemon.(*ArduinoCoreServerImpl).PlatformList(0xc000446600, 0x4d14a70, 0xc001d04030, 0xc0048fe040, 0xc000446600, 0xc001d04030, 0xc00024fba0)
	/home/build/commands/daemon/daemon.go:314 +0x2f
github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1._ArduinoCoreService_PlatformList_Handler(0x4b974e0, 0xc000446600, 0x4d14a70, 0xc001d04030, 0xc001d08000, 0x0, 0x4d14a70, 0xc001d04030, 0xc001d02008, 0x6)
	/home/build/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go:1683 +0x217
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000210a80, 0x4d1f658, 0xc000001380, 0xc000639b00, 0xc00043eed0, 0x52d04c0, 0x0, 0x0, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1217 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc000210a80, 0x4d1f658, 0xc000001380, 0xc000639b00, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1540 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc00018a2b0, 0xc000210a80, 0x4d1f658, 0xc000001380, 0xc000639b00)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:878 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/go/pkg/mod/google.golang.org/[email protected]/server.go:876 +0x1fd
/tmp/bin asmirnov
> ./arduino-cli version
arduino-cli alpha Version: 0.19.0 Commit: 56419ecd Date: 2021-09-02T14:47:35Z

@4ntoine 4ntoine reopened this Sep 8, 2021
@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

yup, same with nightly:

> curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh -s nightly-latest
Installing in /tmp/bin
ARCH=64bit
OS=macOS
Using curl as download tool
Downloading https://downloads.arduino.cc/arduino-cli/nightly/arduino-cli_nightly-latest_macOS_64bit.tar.gz
An existing arduino-cli was found at /usr/local/bin/arduino-cli. Please prepend "/tmp/bin" to your $PATH or remove the existing one.
arduino-cli alpha Version: nightly-20210908 Commit: 7415e26 Date: 2021-09-08T01:25:40Z installed successfully in /tmp/bin
/tmp asmirnov
> 
/tmp asmirnov
> cd bin/
/tmp/bin asmirnov
> ./arduino-cli version
arduino-cli alpha Version: nightly-20210908 Commit: 7415e26 Date: 2021-09-08T01:25:40Z
/tmp/bin asmirnov
> ./arduino-cli daemon
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x78 pc=0x480f4fa]

goroutine 68 [running]:
github.com/arduino/arduino-cli/commands.PlatformReleaseToRPC(0x0, 0x0)
	/home/build/commands/core.go:31 +0x3a
github.com/arduino/arduino-cli/commands/core.GetPlatforms(0xc0031e4040, 0xc0001bea20, 0x0, 0xc00013bb30, 0x400de65, 0x4b93c60)
	/home/build/commands/core/list.go:48 +0x1ec
github.com/arduino/arduino-cli/commands/daemon.(*ArduinoCoreServerImpl).PlatformList(0xc000285d20, 0x4d3cc90, 0xc0031ea030, 0xc0031e4040, 0xc000285d20, 0xc0031ea030, 0xc000848ba0)
	/home/build/commands/daemon/daemon.go:314 +0x2f
github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1._ArduinoCoreService_PlatformList_Handler(0x4bb6f00, 0xc000285d20, 0x4d3cc90, 0xc0031ea030, 0xc0031ee000, 0x0, 0x4d3cc90, 0xc0031ea030, 0xc0031e8008, 0x6)
	/home/build/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go:1683 +0x217
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000208a80, 0x4d47c38, 0xc000001800, 0xc0001bea20, 0xc0003f81e0, 0x5306400, 0x0, 0x0, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1286 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc000208a80, 0x4d47c38, 0xc000001800, 0xc0001bea20, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1609 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000124190, 0xc000208a80, 0x4d47c38, 0xc000001800, 0xc0001bea20)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:934 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/go/pkg/mod/google.golang.org/[email protected]/server.go:932 +0x1fd

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

Note i haven't fully migrated (but i guess the message is enough (same that i get with cli) and it should not crash anyway).

@silvanocerza
Copy link
Contributor

silvanocerza commented Sep 8, 2021

I had to change your tests a bit since I had some issues with async, this is what I ran:

  test('init request', () async {
    final channel = _getChannel();
    final client = ArduinoCoreServiceClient(channel);
    var createResponse = await client.create(CreateRequest.getDefault());
    await for (var res
        in client.init(InitRequest(instance: createResponse.instance))) {
      expect(res.hasError(), false);
    }
    await channel.shutdown();
  });

  test('get platforms', () async {
    final channel = _getChannel();
    final client = ArduinoCoreServiceClient(channel);
    var createResponse = await client.create(CreateRequest.getDefault());
    await for (var res
        in client.init(InitRequest(instance: createResponse.instance))) {
      expect(res.hasError(), false);
    }

    final platformsResponse = await client.platformList(
        PlatformListRequest(instance: createResponse.instance, all: true));

    for (var platform in platformsResponse.installedPlatforms) {
      print(platform.id);
    }

    await channel.shutdown();
  });

And this is the output:

$ flutter test
00:01 +0:  version request                                                                                                                        
Arduino cli version is: 0.19.0
00:02 +2: get platforms                                                                                                                           
adafruit:avr
adafruit:nrf52
adafruit:samd
TeeOnArdu:avr
adafruit:wiced
arduino:avr
arduino:mbed_edge
arduino:mbed_nano
arduino:mbed_portenta
arduino:mbed_rp2040
arduino:megaavr
arduino:nrf52
arduino:sam
arduino:samd
Arrow:samd
atmel-avr-xminis:avr
emoro:avr
esp32:esp32
industruino:samd
Intel:arc32
Intel:i586
Intel:i686
arcore:avr
littleBits:avr
SparkFun:apollo3
SparkFun:avr
SparkFun:esp32
esp8266:esp8266
SparkFun:samd
SPRESENSE:spresense
Microsoft:win10
arduino:mbed
00:02 +3: All tests passed!

I can't seem to reproduce the issue, the request returns correctly.

Could you show the output of arduino-cli config dump? Maybe there's some package index that has issues?

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

@silvanocerza There is obviously some difference in set up (probably platforms).

> ./arduino-cli config dump
board_manager:
  additional_urls: []
daemon:
  port: "50051"
directories:
  data: /Users/asmirnov/Library/Arduino15
  downloads: /Users/asmirnov/Library/Arduino15/staging
  user: /Users/asmirnov/Documents/Arduino
library:
  enable_unsafe_install: false
logging:
  file: ""
  format: text
  level: info
metrics:
  addr: :9090
  enabled: true
output:
  no_color: false
sketch:
  always_export_binaries: false
updater:
  enable_notification: true

Anything just looking into the source code at the lines where is crashes?

@silvanocerza
Copy link
Contributor

I see your board_manager.additional_urls are empty:

board_manager:
  additional_urls: []

How did you install esp32:esp32 and esp8266:esp8266? Did you remove the URLs after installing them?

Also can you run daemon with the --verbose flag? It gives much more information.

Anything just looking into the source code at the lines where is crashes?

Simply put the CLI can't find the latest release of a platform, no idea which nor why it can't find it. I can technically already fix it but I first want to know the root cause for a more thourough fix.

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

@silvanocerza

Nope, i did not remove anything intentionally, i can still see it in IDE settings:

Снимок экрана 2021-09-08 в 21 29 53

> ./arduino-cli daemon --verbose
INFO[0000] Config file not found, using default values  
INFO[0000] arduino-cli version nightly-20210908         
INFO[0000] Setting up Prometheus metrics on :9090/metrics 
INFO[0000] Starting daemon on TCP address 127.0.0.1:50051 
INFO[0000] Daemon is now listening on 127.0.0.1:50051... 
INFO[0020] Checking if CLI is Bundled into the IDE      
INFO[0020] Adding libraries dir                          dir=/Users/asmirnov/Documents/Arduino/libraries location=user
INFO[0020] Checking signature                            index=/Users/asmirnov/Library/Arduino15/package_index.json signatureFile=/Users/asmirnov/Library/Arduino15/package_index.json.sig trusted=true
INFO[0020] Loading hardware from: /Users/asmirnov/Library/Arduino15/packages 
INFO[0020] Loading package arduino from: /Users/asmirnov/Library/Arduino15/packages/arduino/hardware 
INFO[0020] Checking signature                            error="opening signature file: open /Users/asmirnov/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/installed.json.sig: no such file or directory" index=/Users/asmirnov/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/installed.json signatureFile=/Users/asmirnov/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/installed.json.sig
INFO[0020] Loaded platform                               platform="arduino:[email protected]"
INFO[0020] Checking existence of 'tools' path: /Users/asmirnov/Library/Arduino15/packages/arduino/tools 
INFO[0020] Loading tools from dir: /Users/asmirnov/Library/Arduino15/packages/arduino/tools 
INFO[0020] Loaded tool                                   tool="arduino:[email protected]"
INFO[0020] Loaded tool                                   tool="arduino:[email protected]"
INFO[0020] Loaded tool                                   tool="arduino:[email protected]"
INFO[0020] Loaded tool                                   tool="arduino:[email protected]"
INFO[0020] Loading package builtin from: /Users/asmirnov/Library/Arduino15/packages/builtin 
INFO[0020] Checking existence of 'tools' path: /Users/asmirnov/Library/Arduino15/packages/builtin/tools 
INFO[0020] Loading tools from dir: /Users/asmirnov/Library/Arduino15/packages/builtin/tools 
INFO[0020] Loaded tool                                   tool="builtin:[email protected]"
INFO[0020] Loaded tool                                   tool="builtin:[email protected]"
INFO[0020] Loaded tool                                   tool="builtin:[email protected]"
INFO[0020] Loaded tool                                   tool="builtin:[email protected]"
INFO[0020] Loaded tool                                   tool="builtin:[email protected]"
INFO[0020] Loading package digistump from: /Users/asmirnov/Library/Arduino15/packages/digistump/hardware 
INFO[0020] Checking existence of 'tools' path: /Users/asmirnov/Library/Arduino15/packages/digistump/tools 
INFO[0020] Loading tools from dir: /Users/asmirnov/Library/Arduino15/packages/digistump/tools 
INFO[0020] Loaded tool                                   tool="digistump:[email protected]"
INFO[0020] Loading package esp32 from: /Users/asmirnov/Library/Arduino15/packages/esp32/hardware 
INFO[0020] Loaded platform                               platform="esp32:[email protected]"
INFO[0020] Loaded platform                               platform="esp32:[email protected]"
INFO[0020] Checking existence of 'tools' path: /Users/asmirnov/Library/Arduino15/packages/esp32/tools 
INFO[0020] Loading tools from dir: /Users/asmirnov/Library/Arduino15/packages/esp32/tools 
INFO[0020] Loaded tool                                   tool="esp32:[email protected]"
INFO[0020] Loaded tool                                   tool="esp32:[email protected]"
INFO[0020] Loaded tool                                   tool="esp32:[email protected]"
INFO[0020] Loading package esp8266 from: /Users/asmirnov/Library/Arduino15/packages/esp8266/hardware 
INFO[0020] Checking existence of 'tools' path: /Users/asmirnov/Library/Arduino15/packages/esp8266/tools 
INFO[0020] Loading tools from dir: /Users/asmirnov/Library/Arduino15/packages/esp8266/tools 
INFO[0020] Loaded tool                                   tool="esp8266:[email protected]"
INFO[0020] Loaded tool                                   tool="esp8266:[email protected]"
INFO[0020] Loaded tool                                   tool="esp8266:[email protected]"
INFO[0020] Loaded tool                                   tool="esp8266:[email protected]"
INFO[0020] Adding libraries dir                          dir=/Users/asmirnov/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.1/libraries location=platform
INFO[0020] Adding libraries dir                          dir=/Users/asmirnov/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries location=platform
INFO[0020] Adding libraries dir                          dir=/Users/asmirnov/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/libraries location=platform
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x78 pc=0x480f4fa]

goroutine 24 [running]:
github.com/arduino/arduino-cli/commands.PlatformReleaseToRPC(0x0, 0x0)
	/home/build/commands/core.go:31 +0x3a
github.com/arduino/arduino-cli/commands/core.GetPlatforms(0xc004c1a040, 0xc00016d200, 0x0, 0xc0000c5b30, 0x400de65, 0x4b93c60)
	/home/build/commands/core/list.go:48 +0x1ec
github.com/arduino/arduino-cli/commands/daemon.(*ArduinoCoreServerImpl).PlatformList(0xc00020fce0, 0x4d3cc90, 0xc004c20030, 0xc004c1a040, 0xc00020fce0, 0xc004c20030, 0xc0004bbba0)
	/home/build/commands/daemon/daemon.go:314 +0x2f
github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1._ArduinoCoreService_PlatformList_Handler(0x4bb6f00, 0xc00020fce0, 0x4d3cc90, 0xc004c20030, 0xc004c24000, 0x0, 0x4d3cc90, 0xc004c20030, 0xc004c1e008, 0x6)
	/home/build/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go:1683 +0x217
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00018ea80, 0x4d47c38, 0xc00050a180, 0xc00016d200, 0xc000402270, 0x5306400, 0x0, 0x0, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1286 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc00018ea80, 0x4d47c38, 0xc00050a180, 0xc00016d200, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1609 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0004c2000, 0xc00018ea80, 0x4d47c38, 0xc00050a180, 0xc00016d200)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:934 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/go/pkg/mod/google.golang.org/[email protected]/server.go:932 +0x1fd

@silvanocerza
Copy link
Contributor

Aha! You installed them with the IDE, this is something that I didn't consider.

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

Yup, but i installed 1.8.2 via IDE and then upgraded it to 1.8.3 via gRPC.

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

BTW i'm having this:

> ./arduino-cli core list
Error initializing instance: loading platform release esp8266:[email protected]: loading boards: skipping loading of boards esp8266:esp8266:espduino: malformed custom board options
ID              Installed Latest Name                  
arduino:avr     1.8.3     1.8.3  Arduino AVR Boards    
esp32:esp32     1.0.4     1.0.4  ESP32 Arduino         
esp8266:esp8266 2.7.1     2.7.1  ESP8266 Boards (2.7.1)

Can it be a reason?

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 8, 2021

I've uninstalled all the toolchains using cli and installed "arduino:avr" again. Unfortunately i'm still having the crash.
Not sure what i can check:

> ./arduino-cli core list
ID          Installed Latest Name              
arduino:avr 1.8.3     1.8.3  Arduino AVR Boards

/tmp/bin asmirnov
> 
/tmp/bin asmirnov
> ./arduino-cli daemon --verbose
INFO[0000] Config file not found, using default values  
INFO[0000] arduino-cli version 0.19.0                   
INFO[0000] Setting up Prometheus metrics on :9090/metrics 
INFO[0000] Starting daemon on TCP address 127.0.0.1:50051 
INFO[0000] Daemon is now listening on 127.0.0.1:50051... 
INFO[0010] Checking if CLI is Bundled into the IDE      
INFO[0010] Adding libraries dir                          dir=/Users/asmirnov/Documents/Arduino/libraries location=user
INFO[0010] Checking signature                            index=/Users/asmirnov/Library/Arduino15/package_index.json signatureFile=/Users/asmirnov/Library/Arduino15/package_index.json.sig trusted=true
INFO[0010] Loading hardware from: /Users/asmirnov/Library/Arduino15/packages 
INFO[0010] Loading package arduino from: /Users/asmirnov/Library/Arduino15/packages/arduino/hardware 
INFO[0010] Checking signature                            error="opening signature file: open /Users/asmirnov/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/installed.json.sig: no such file or directory" index=/Users/asmirnov/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/installed.json signatureFile=/Users/asmirnov/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/installed.json.sig
INFO[0010] Loaded platform                               platform="arduino:[email protected]"
INFO[0010] Checking existence of 'tools' path: /Users/asmirnov/Library/Arduino15/packages/arduino/tools 
INFO[0010] Loading tools from dir: /Users/asmirnov/Library/Arduino15/packages/arduino/tools 
INFO[0010] Loaded tool                                   tool="arduino:[email protected]"
INFO[0010] Loaded tool                                   tool="arduino:[email protected]"
INFO[0010] Loaded tool                                   tool="arduino:[email protected]"
INFO[0010] Loaded tool                                   tool="arduino:[email protected]"
INFO[0010] Loading package builtin from: /Users/asmirnov/Library/Arduino15/packages/builtin 
INFO[0010] Checking existence of 'tools' path: /Users/asmirnov/Library/Arduino15/packages/builtin/tools 
INFO[0010] Loading tools from dir: /Users/asmirnov/Library/Arduino15/packages/builtin/tools 
INFO[0010] Loaded tool                                   tool="builtin:[email protected]"
INFO[0010] Loaded tool                                   tool="builtin:[email protected]"
INFO[0010] Loaded tool                                   tool="builtin:[email protected]"
INFO[0010] Loaded tool                                   tool="builtin:[email protected]"
INFO[0010] Loaded tool                                   tool="builtin:[email protected]"
INFO[0010] Loading package digistump from: /Users/asmirnov/Library/Arduino15/packages/digistump/hardware 
INFO[0010] Checking existence of 'tools' path: /Users/asmirnov/Library/Arduino15/packages/digistump/tools 
INFO[0010] Loading tools from dir: /Users/asmirnov/Library/Arduino15/packages/digistump/tools 
INFO[0010] Loaded tool                                   tool="digistump:[email protected]"
INFO[0010] Loading package esp32 from: /Users/asmirnov/Library/Arduino15/packages/esp32/hardware 
INFO[0010] Checking existence of 'tools' path: /Users/asmirnov/Library/Arduino15/packages/esp32/tools 
INFO[0010] Loading tools from dir: /Users/asmirnov/Library/Arduino15/packages/esp32/tools 
INFO[0010] Loaded tool                                   tool="esp32:[email protected]"
INFO[0010] Loaded tool                                   tool="esp32:[email protected]"
INFO[0010] Loaded tool                                   tool="esp32:[email protected]"
INFO[0010] Loading package esp8266 from: /Users/asmirnov/Library/Arduino15/packages/esp8266/hardware 
INFO[0010] Checking existence of 'tools' path: /Users/asmirnov/Library/Arduino15/packages/esp8266/tools 
INFO[0010] Loading tools from dir: /Users/asmirnov/Library/Arduino15/packages/esp8266/tools 
INFO[0010] Loaded tool                                   tool="esp8266:[email protected]"
INFO[0010] Loaded tool                                   tool="esp8266:[email protected]"
INFO[0010] Loaded tool                                   tool="esp8266:[email protected]"
INFO[0010] Loaded tool                                   tool="esp8266:[email protected]"
INFO[0010] Adding libraries dir                          dir=/Users/asmirnov/Library/Arduino15/packages/arduino/hardware/avr/1.8.3/libraries location=platform
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x78 pc=0x47f34ba]

goroutine 41 [running]:
github.com/arduino/arduino-cli/commands.PlatformReleaseToRPC(0x0, 0x0)
	/home/build/commands/core.go:31 +0x3a
github.com/arduino/arduino-cli/commands/core.GetPlatforms(0xc002dc6000, 0xc000155440, 0x0, 0xc0003b3b30, 0x400e125, 0x4b74380)
	/home/build/commands/core/list.go:48 +0x1ec
github.com/arduino/arduino-cli/commands/daemon.(*ArduinoCoreServerImpl).PlatformList(0xc00035e540, 0x4d14a70, 0xc002dc4000, 0xc002dc6000, 0xc00035e540, 0xc002dc4000, 0xc000068ba0)
	/home/build/commands/daemon/daemon.go:314 +0x2f
github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1._ArduinoCoreService_PlatformList_Handler(0x4b974e0, 0xc00035e540, 0x4d14a70, 0xc002dc4000, 0xc002dc2000, 0x0, 0x4d14a70, 0xc002dc4000, 0xc002dc0000, 0x6)
	/home/build/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go:1683 +0x217
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000018a80, 0x4d1f658, 0xc0000b4180, 0xc000155440, 0xc000352f00, 0x52d04c0, 0x0, 0x0, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1217 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc000018a80, 0x4d1f658, 0xc0000b4180, 0xc000155440, 0x0)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:1540 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc0000d8030, 0xc000018a80, 0x4d1f658, 0xc0000b4180, 0xc000155440)
	/go/pkg/mod/google.golang.org/[email protected]/server.go:878 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
	/go/pkg/mod/google.golang.org/[email protected]/server.go:876 +0x1fd

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 9, 2021

I can confirm it does not crash with your code, but crashes with initializing only the first Create response. However i believe it should not crash anyway.. Feel free to close if you think it's an expected behaviour

@cmaglie
Copy link
Member

cmaglie commented Sep 10, 2021

From the stacktrace, the null pointer exception is here

if len(platformRelease.Boards) > 0 {
it could be that platformRelease.Boards is nil or even platformRelease itself is nil (that would be really strange).

@4ntoine could you send a zip of your ~/.arduino15 and sketchbook folder to examine it? (c.maglie at arduino.cc)

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 10, 2021

@cmaglie here you are https://dropmefiles.com/tm10S available for 14 days (it's 0.5Gb large)

@silvanocerza
Copy link
Contributor

BTW i'm having this:

> ./arduino-cli core list
Error initializing instance: loading platform release esp8266:[email protected]: loading boards: skipping loading of boards esp8266:esp8266:espduino: malformed custom board options
ID              Installed Latest Name                  
arduino:avr     1.8.3     1.8.3  Arduino AVR Boards    
esp32:esp32     1.0.4     1.0.4  ESP32 Arduino         
esp8266:esp8266 2.7.1     2.7.1  ESP8266 Boards (2.7.1)

Can it be a reason?

Nah, that's just a warning that certain boards are not loaded because their properties are not correct.

From the stacktrace, the null pointer exception is here

if len(platformRelease.Boards) > 0 {

it could be that platformRelease.Boards is nil or even platformRelease itself is nil (that would be really strange).

len() of a nil slice is 0 so platformRelease must be nil and not platformRelease.Boards, we're in really strange territory. :D

@cmaglie here you are https://dropmefiles.com/tm10S available for 14 days (it's 0.5Gb large)

@4ntoine I've tested with your Arduino15 folder but it keeps working for me, all tests are passing.

I need a reliable way to reproduce the issue before fixing it. 😕

$ flutter test                   
Building flutter tool...
Downloading package sky_engine...                                  306ms
Downloading flutter_patched_sdk tools...                           378ms
Downloading flutter_patched_sdk_product tools...                   333ms
Downloading linux-x64 tools...                                   2,442ms
Downloading linux-x64/font-subset tools...                         376ms
Running "flutter pub get" in arduino_cli_dart...                 1,624ms
00:10 +0:  version request                                                                      
Arduino cli version is: git-snapshot
00:11 +2: get platforms                                                                         
arduino:avr
arduino:mbed_edge
arduino:mbed_nano
arduino:mbed_portenta
arduino:mbed_rp2040
arduino:megaavr
arduino:nrf52
arduino:sam
arduino:samd
Arrow:samd
atmel-avr-xminis:avr
emoro:avr
industruino:samd
Intel:arc32
Intel:i586
Intel:i686
littleBits:avr
Microsoft:win10
arduino:mbed
00:11 +3: All tests passed!

Could you maybe upload the Arduino folder too? It should contain a libraries folder and other Sketch folders.

@4ntoine
Copy link
Contributor Author

4ntoine commented Sep 13, 2021

Unfortunately i've uninstalled "esp32" and "esp8266" toolchains so the state is different to previous.. We can close it and i will reopen if it happens again

@silvanocerza
Copy link
Contributor

Let's leave it open, I want to find the cause of this issue.

Could you try with the attached version of the CLI? I added more logging on certain places, it should give us more information on what's happening or which direction to go to best understand the issue.

arduino-cli_0.19.0_macOS_64bit.tar.gz

@fstasi fstasi removed the type: bug label Sep 16, 2021
@rsora rsora added type: imperfection Perceived defect in any part of project topic: gRPC Related to the gRPC interface labels Sep 22, 2021
@per1234
Copy link
Contributor

per1234 commented Oct 14, 2021

Hi all. I think I might have ran into the same bug.

Necessary conditions

  • An empty architecture folder under a 3rd party vendor folder is present
    • This is a common condition because the architecture folder is not cleaned up by arduino-cli core uninstall
  • arduino-cli core list uses the --all flag

Steps to reproduce

per@HAL MINGW64 /c/program-files/arduino/cli/arduino-cli_nightly
$ ./arduino-cli core install attiny:avr --additional-urls https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
Downloading packages...
attiny:[email protected] already downloaded
Installing platform attiny:[email protected]...
Configuring platform....
Platform attiny:[email protected] installed

per@HAL MINGW64 /c/program-files/arduino/cli/arduino-cli_nightly
$ ./arduino-cli core uninstall attiny:avr
Uninstalling attiny:[email protected]...
Platform attiny:[email protected] uninstalled

per@HAL MINGW64 /c/program-files/arduino/cli/arduino-cli_nightly
$ ./arduino-cli core list --all
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x90 pc=0xde8109]

goroutine 1 [running]:
github.com/arduino/arduino-cli/commands.PlatformReleaseToRPC(0x0, 0x0)
        /home/build/commands/core.go:31 +0x49
github.com/arduino/arduino-cli/commands/core.GetPlatforms(0xc0000d9d58, 0xc000000004, 0xc0000d9d48, 0x1, 0x1, 0xa)
        /home/build/commands/core/list.go:48 +0x1ec
github.com/arduino/arduino-cli/cli/core.runListCommand(0xc000a56f00, 0xc0008f3430, 0x0, 0x1)
        /home/build/cli/core/list.go:55 +0xfc
github.com/spf13/cobra.(*Command).execute(0xc000a56f00, 0xc0008f3420, 0x1, 0x1, 0xc000a56f00, 0xc0008f3420)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:860 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc0008db680, 0x1, 0x1, 0x0)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:902
main.main()
        /home/build/main.go:31 +0xea

Additional information

per@HAL MINGW64 /c/program-files/arduino/cli/arduino-cli_nightly
$ ./arduino-cli version
arduino-cli.exe alpha Version: nightly-20211014 Commit: ba8c9b7 Date: 2021-10-14T01:27:50Z
per@HAL MINGW64 /c/program-files/arduino/cli/arduino-cli_nightly
$ tree ~/AppData/Local/Arduino15/packages
C:/Users/per/AppData/Local/Arduino15/packages
|-- attiny
|   `-- hardware
|       `-- avr
`-- builtin
    `-- tools
        |-- ctags
        |   `-- 5.8-arduino11
        |       `-- ctags.exe
        |-- mdns-discovery
        |   `-- 0.9.2
        |       |-- LICENSE.txt
        |       `-- mdns-discovery.exe
        |-- serial-discovery
        |   `-- 1.3.0-rc1
        |       |-- LICENSE.txt
        |       `-- serial-discovery.exe
        `-- serial-monitor
            `-- 0.9.1
                |-- LICENSE.txt
                `-- serial-monitor.exe

13 directories, 7 files

@umbynos
Copy link
Contributor

umbynos commented Oct 19, 2021

hi @4ntoine, @per1234
could you please try the build here
This problem should be fixed in #1519

@per1234
Copy link
Contributor

per1234 commented Oct 19, 2021

@umbynos it's working correctly now for me when I run the command line process I described in my previous reply. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: gRPC Related to the gRPC interface type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants