Clancey / vscode-comet

Other
31 stars 11 forks source link

Handle `AvdManager.ListAvds` crash #43

Closed Ghostbird closed 8 months ago

Ghostbird commented 2 years ago

Workaround for #22 in my case. For unknown reasons AvdManager.ListAvds() crashes with a NullReferenceException. It seems that the error is not in this repo.

If the error occurs, rethrow with a more specific error if there are no results. If there are some results (physical devices) then only write to stderr.

On the node side, the RunCommand has been updated to pop a vscode error window if the stderr of execa is non-falsy. (This might theoretically cause such pop-ups for other commands, too.)

The solution is far from perfect, as the current code base cannot model a non-fatal error. Thus I've decided to use stderr which provides a functioning and well understood mechanism.

Someone with a better idea of the code base should have a look at this. The application can probably be remodelled to support non-fatal error reporting.

Personally I'd love to have this merged first, as it solves a blocking issue for me, however, I can instead keep using my own build.

Ghostbird commented 1 year ago

@Clancey Any chance of getting this merged? I've been running my own fork for 9 months now, since the latest release simply doesn't work for my scenario.

Ghostbird commented 8 months ago

I'm no longer using this software any more.