Problem running bicep publish-extension
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 79
Description
**Bicep version**
0.37.4
**Describe the bug**
When freshly booted the device and I continu with my bicep local extension building I encounter issues running 'bicep publish-extension' with the mentioned version. I receive the below exception.
Unhandled exception. System.InvalidOperationException: Failed to connect to extension D:\bicep-local-http\src\bin\release\net9.0\win-x64\publish\bicep-local-http.exe
---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Bicep.Local.Deploy.Helpers.GrpcChannelHelper.WaitForConnectionAsync(BicepExtensionClient client, CancellationToken cancellationToken) in C:\__w\1\s\bicep\src\Bicep.Local.Deploy\Helpers\GrpcChannelHelper.cs:line 102
at Bicep.Local.Deploy.Extensibility.GrpcLocalExtension.Start(IOUri binaryUri) in C:\__w\1\s\bicep\src\Bicep.Local.Deploy\Extensibility\GrpcLocalExtension.cs:line 102
--- End of inner exception stack trace ---
at Bicep.Local.Deploy.Extensibility.GrpcLocalExtension.Start(IOUri binaryUri) in C:\__w\1\s\bicep\src\Bicep.Local.Deploy\Extensibility\GrpcLocalExtension.cs:line 109
at Bicep.Cli.Commands.PublishExtensionCommand.GetTypesFromExtension(IOUri binaryUri, CancellationToken cancellationToken) in C:\__w\1\s\bicep\src\Bicep.Cli\Commands\PublishExtensionCommand.cs:line 179
at Bicep.Cli.Commands.PublishExtensionCommand.GetTypesTarPayload(PublishExtensionArguments args, ImmutableArray`1 binaries, CancellationToken cancellationToken) in C:\__w\1\s\bicep\src\Bicep.Cli\Commands\PublishExtensionCommand.cs:line 94
at Bicep.Cli.Commands.PublishExtensionCommand.RunAsync(PublishExtensionArguments args, CancellationToken cancellationToken) in C:\__w\1\s\bicep\src\Bicep.Cli\Commands\PublishExtensionCommand.cs:line 57
at Bicep.Cli.Program.RunAsync(String[] args, CancellationToken cancellationToken) in C:\__w\1\s\bicep\src\Bicep.Cli\Program.cs:line 96
at Bicep.Cli.Program.<>c__DisplayClass3_0.<b__0>d.MoveNext() in C:\__w\1\s\bicep\src\Bicep.Cli\Program.cs:line 59
--- End of stack trace from previous location ---
at Bicep.Cli.Program.RunWithCancellationAsync(Func`2 runFunc) in C:\__w\1\s\bicep\src\Bicep.Cli\Program.cs:line 154
at Bicep.Cli.Program.Main(String[] args) in C:\__w\1\s\bicep\src\Bicep.Cli\Program.cs:line 40
at Bicep.Cli.Program.(String[] args)
I tried running with the nightly build 0.37.84 it then succeed for some reason on the second run. Now version 0.37.4 also works.
**To Reproduce**
run bicep publish-extension on the currently released version on a Windows Device.
Contributor guide
Research direction
Start by reproducing `bicep publish-extension` on Windows after a fresh boot with version 0.37.4 and the local extension. Read `GrpcChannelHelper.cs` at line 102, `GrpcLocalExtension.cs` around lines 102-109, and `PublishExtensionCommand.cs` at line 179 to trace the failed connection. Done means the command reliably connects and publishes on its first run, or reports a confirmed cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, grpc
- Domain
- cli, devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100