-
Notifications
You must be signed in to change notification settings - Fork 817
Open
Description
Bicep version
bicep --version: Bicep CLI version 0.41.2 (3e403ea)
az bicep version: Bicep CLI version 0.41.2 (3e403ea)
dotnet --version: 10.0.103
Describe the bug
Getting Unhandled exception. System.IO.InvalidDataException: The archive entry was compressed using an unsupported compression method. trying to restore extension.
To Reproduce
main.bicep
extension 'bicepconfig.json'
bicepconfig.json
{
"extensions": {
"microsoftGraphV1": "br:mcr.microsoft.com/bicep/extensions/microsoftgraph/v1.0:1.0.0"
}
}
Run:
bicep restore main.bicep
Getting:
Unhandled exception. System.IO.InvalidDataException: The archive entry was compressed using an unsupported compression method.
at System.IO.Compression.Inflater.Inflate(FlushCode flushCode)
at System.IO.Compression.Inflater.ReadInflateOutput(Byte* bufPtr, Int32 length, FlushCode flushCode, Int32& bytesRead)
at System.IO.Compression.Inflater.ReadOutput(Byte* bufPtr, Int32 length, Int32& bytesRead)
at System.IO.Compression.Inflater.InflateVerified(Byte* bufPtr, Int32 length)
at System.IO.Compression.Inflater.Inflate(Span`1 destination)
at System.IO.Compression.DeflateStream.ReadCore(Span`1 buffer)
at System.IO.Compression.GZipStream.Read(Span`1 buffer)
at System.IO.Stream.ReadAtLeastCore(Span`1 buffer, Int32 minimumBytes, Boolean throwOnEndOfStream)
at System.IO.Stream.ReadExactly(Span`1 buffer)
at System.Formats.Tar.TarHeader.TryGetNextHeader(Stream archiveStream, Boolean copyData, TarEntryFormat initialFormat, Boolean processDataBlock)
at System.Formats.Tar.TarReader.TryGetNextEntryHeader(Boolean copyData)
at System.Formats.Tar.TarReader.GetNextEntry(Boolean copyData)
at Bicep.Core.Registry.Extensions.ExtensionV1Archive.Read(BinaryData binaryData)
at Bicep.Core.Registry.LocalModuleRegistry.RestoreArtifacts(IEnumerable`1 references)
at Bicep.Core.Registry.ModuleDispatcher.RestoreArtifacts(IEnumerable`1 references, Boolean forceRestore)
at Bicep.Core.BicepCompiler.Restore(Compilation compilation, Boolean forceRestore)
at Bicep.Cli.Commands.RestoreCommand.Restore(IOUri inputUri, Boolean force)
at Bicep.Cli.Commands.RestoreCommand.RunAsync(RestoreArguments args)
at Bicep.Cli.Program.RunAsync(String[] args, CancellationToken cancellationToken)
at Bicep.Cli.Program.<>c__DisplayClass3_0.<<Main>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Bicep.Cli.Program.RunWithCancellationAsync(Func`2 runFunc)
at Bicep.Cli.Program.Main(String[] args)
at Bicep.Cli.Program.<Main>(String[] args)
Or run:
az bicep restore --file main.bicep --force --debug
Getting:
cli.knack.cli: Command arguments: ['bicep', 'restore', '--file', 'main.bicep', '--force', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x10945cae0>, <function OutputProducer.on_global_arguments at 0x10962eb60>, <function CLIQuery.on_global_arguments at 0x109674f40>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'bicep': ['azure.cli.command_modules.resource']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: resource 0.127 52 234
cli.azure.cli.core: Total (1) 0.127 52 234
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 52 groups, 234 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : bicep restore
cli.azure.cli.core: Command table: bicep restore
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x10a486de0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/<user>/.azure/commands/2026-03-09.16-24-22.bicep_restore.67397.log'.
az_command_data_logger: command args: bicep restore --file {} --force --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x10a4d0720>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x10a4d2a20>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x10a4d2c00>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x10a4d2ca0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x10962ec00>, <function CLIQuery.handle_query_parameter at 0x109674fe0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x10a4d2ac0>]
cli.azure.cli.command_modules.resource._bicep: Current value of "use_binary_from_path": false.
cli.azure.cli.command_modules.resource._bicep: Current value of "use_binary_from_path": false.
cli.azure.cli.command_modules.resource._bicep: Current value of "use_binary_from_path": false.
cli.azure.cli.command_modules.resource._bicep: Bicep CLI installation path: /Users/<user>/.azure/bin/bicep
cli.azure.cli.command_modules.resource._bicep: Bicep CLI installed: True.
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.78.0/libexec/lib/python3.13/site-packages/azure/cli/command_modules/resource/_bicep.py", line 370, in _run_command
process.check_returncode()
~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/opt/homebrew/Cellar/python@3.13/3.13.9_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 508, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
self.stderr)
subprocess.CalledProcessError: Command '['/Users/<user>/.azure/bin/bicep', 'restore', 'main.bicep', '--force']' died with <Signals.SIGABRT: 6>.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.78.0/libexec/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/homebrew/Cellar/azure-cli/2.78.0/libexec/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.78.0/libexec/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.78.0/libexec/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
result = cmd_copy(params)
File "/opt/homebrew/Cellar/azure-cli/2.78.0/libexec/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
return self.handler(*args, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.78.0/libexec/lib/python3.13/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
File "/opt/homebrew/Cellar/azure-cli/2.78.0/libexec/lib/python3.13/site-packages/azure/cli/command_modules/resource/custom.py", line 4189, in restore_bicep_file
run_bicep_command(cmd.cli_ctx, args)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/azure-cli/2.78.0/libexec/lib/python3.13/site-packages/azure/cli/command_modules/resource/_bicep.py", line 114, in run_bicep_command
return _run_command(installation_path, args, custom_env)
File "/opt/homebrew/Cellar/azure-cli/2.78.0/libexec/lib/python3.13/site-packages/azure/cli/command_modules/resource/_bicep.py", line 386, in _run_command
raise UnclassifiedUserFault(error_msg)
azure.cli.core.azclierror.UnclassifiedUserFault: Unhandled exception. System.IO.InvalidDataException: The archive entry was compressed using an unsupported compression method.
at System.IO.Compression.Inflater.Inflate(FlushCode flushCode)
at System.IO.Compression.Inflater.ReadInflateOutput(Byte* bufPtr, Int32 length, FlushCode flushCode, Int32& bytesRead)
at System.IO.Compression.Inflater.ReadOutput(Byte* bufPtr, Int32 length, Int32& bytesRead)
at System.IO.Compression.Inflater.InflateVerified(Byte* bufPtr, Int32 length)
at System.IO.Compression.Inflater.Inflate(Span`1 destination)
at System.IO.Compression.DeflateStream.ReadCore(Span`1 buffer)
at System.IO.Compression.GZipStream.Read(Span`1 buffer)
at System.IO.Stream.ReadAtLeastCore(Span`1 buffer, Int32 minimumBytes, Boolean throwOnEndOfStream)
at System.IO.Stream.ReadExactly(Span`1 buffer)
at System.Formats.Tar.TarHeader.TryGetNextHeader(Stream archiveStream, Boolean copyData, TarEntryFormat initialFormat, Boolean processDataBlock)
at System.Formats.Tar.TarReader.TryGetNextEntryHeader(Boolean copyData)
at System.Formats.Tar.TarReader.GetNextEntry(Boolean copyData)
at Bicep.Core.Registry.Extensions.ExtensionV1Archive.Read(BinaryData binaryData)
at Bicep.Core.Registry.LocalModuleRegistry.RestoreArtifacts(IEnumerable`1 references)
at Bicep.Core.Registry.ModuleDispatcher.RestoreArtifacts(IEnumerable`1 references, Boolean forceRestore)
at Bicep.Core.BicepCompiler.Restore(Compilation compilation, Boolean forceRestore)
at Bicep.Cli.Commands.RestoreCommand.Restore(IOUri inputUri, Boolean force)
at Bicep.Cli.Commands.RestoreCommand.RunAsync(RestoreArguments args)
at Bicep.Cli.Program.RunAsync(String[] args, CancellationToken cancellationToken)
at Bicep.Cli.Program.<>c__DisplayClass3_0.<<Main>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Bicep.Cli.Program.RunWithCancellationAsync(Func`2 runFunc)
at Bicep.Cli.Program.Main(String[] args)
at Bicep.Cli.Program.<Main>(String[] args)
cli.azure.cli.core.azclierror: Unhandled exception. System.IO.InvalidDataException: The archive entry was compressed using an unsupported compression method.
at System.IO.Compression.Inflater.Inflate(FlushCode flushCode)
at System.IO.Compression.Inflater.ReadInflateOutput(Byte* bufPtr, Int32 length, FlushCode flushCode, Int32& bytesRead)
at System.IO.Compression.Inflater.ReadOutput(Byte* bufPtr, Int32 length, Int32& bytesRead)
at System.IO.Compression.Inflater.InflateVerified(Byte* bufPtr, Int32 length)
at System.IO.Compression.Inflater.Inflate(Span`1 destination)
at System.IO.Compression.DeflateStream.ReadCore(Span`1 buffer)
at System.IO.Compression.GZipStream.Read(Span`1 buffer)
at System.IO.Stream.ReadAtLeastCore(Span`1 buffer, Int32 minimumBytes, Boolean throwOnEndOfStream)
at System.IO.Stream.ReadExactly(Span`1 buffer)
at System.Formats.Tar.TarHeader.TryGetNextHeader(Stream archiveStream, Boolean copyData, TarEntryFormat initialFormat, Boolean processDataBlock)
at System.Formats.Tar.TarReader.TryGetNextEntryHeader(Boolean copyData)
at System.Formats.Tar.TarReader.GetNextEntry(Boolean copyData)
at Bicep.Core.Registry.Extensions.ExtensionV1Archive.Read(BinaryData binaryData)
at Bicep.Core.Registry.LocalModuleRegistry.RestoreArtifacts(IEnumerable`1 references)
at Bicep.Core.Registry.ModuleDispatcher.RestoreArtifacts(IEnumerable`1 references, Boolean forceRestore)
at Bicep.Core.BicepCompiler.Restore(Compilation compilation, Boolean forceRestore)
at Bicep.Cli.Commands.RestoreCommand.Restore(IOUri inputUri, Boolean force)
at Bicep.Cli.Commands.RestoreCommand.RunAsync(RestoreArguments args)
at Bicep.Cli.Program.RunAsync(String[] args, CancellationToken cancellationToken)
at Bicep.Cli.Program.<>c__DisplayClass3_0.<<Main>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Bicep.Cli.Program.RunWithCancellationAsync(Func`2 runFunc)
at Bicep.Cli.Program.Main(String[] args)
at Bicep.Cli.Program.<Main>(String[] args)
az_command_data_logger: Unhandled exception. System.IO.InvalidDataException: The archive entry was compressed using an unsupported compression method.
at System.IO.Compression.Inflater.Inflate(FlushCode flushCode)
at System.IO.Compression.Inflater.ReadInflateOutput(Byte* bufPtr, Int32 length, FlushCode flushCode, Int32& bytesRead)
at System.IO.Compression.Inflater.ReadOutput(Byte* bufPtr, Int32 length, Int32& bytesRead)
at System.IO.Compression.Inflater.InflateVerified(Byte* bufPtr, Int32 length)
at System.IO.Compression.Inflater.Inflate(Span`1 destination)
at System.IO.Compression.DeflateStream.ReadCore(Span`1 buffer)
at System.IO.Compression.GZipStream.Read(Span`1 buffer)
at System.IO.Stream.ReadAtLeastCore(Span`1 buffer, Int32 minimumBytes, Boolean throwOnEndOfStream)
at System.IO.Stream.ReadExactly(Span`1 buffer)
at System.Formats.Tar.TarHeader.TryGetNextHeader(Stream archiveStream, Boolean copyData, TarEntryFormat initialFormat, Boolean processDataBlock)
at System.Formats.Tar.TarReader.TryGetNextEntryHeader(Boolean copyData)
at System.Formats.Tar.TarReader.GetNextEntry(Boolean copyData)
at Bicep.Core.Registry.Extensions.ExtensionV1Archive.Read(BinaryData binaryData)
at Bicep.Core.Registry.LocalModuleRegistry.RestoreArtifacts(IEnumerable`1 references)
at Bicep.Core.Registry.ModuleDispatcher.RestoreArtifacts(IEnumerable`1 references, Boolean forceRestore)
at Bicep.Core.BicepCompiler.Restore(Compilation compilation, Boolean forceRestore)
at Bicep.Cli.Commands.RestoreCommand.Restore(IOUri inputUri, Boolean force)
at Bicep.Cli.Commands.RestoreCommand.RunAsync(RestoreArguments args)
at Bicep.Cli.Program.RunAsync(String[] args, CancellationToken cancellationToken)
at Bicep.Cli.Program.<>c__DisplayClass3_0.<<Main>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Bicep.Cli.Program.RunWithCancellationAsync(Func`2 runFunc)
at Bicep.Cli.Program.Main(String[] args)
at Bicep.Cli.Program.<Main>(String[] args)
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x10a487060>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 1.333 seconds (init: 0.147, invoke: 1.186)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 5905 in cache file under /Users/<user>/.azure/telemetry/20260309162423896
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.78.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.78.0/libexec/lib/python3.13/site-packages/azure/cli/telemetry/__init__.py /Users/<user>/.azure /Users/<user>/.azure/telemetry/20260309162423896"
telemetry.process: Return from creating process 67422
telemetry.main: Finish creating telemetry upload process.
Additional context
OS: macOS Tahoe 26.2
(MacBook Pro M2)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo