[GH-ISSUE #76] Object reference not set to an instance of an object. #70

Closed
opened 2026-02-26 17:44:16 +03:00 by kerem · 2 comments
Owner

Originally created by @chaz393 on GitHub (Apr 17, 2023).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-autosnap/issues/76

What happened?

When I try to use the --script parameter I get the following error. I updated to the latest version and it still happens. I tried using the example hook script in the repository and it also happens with that script. This was on a debian 10 installation. If more logs will help I can provide more logs they just didn't seem to be very helpful when I looked through them.

Expected behavior

It runs the script

Relevant log output

Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Corsinvest.ProxmoxVE.AutoSnap.Api.PhaseEventArgs.get_Environments()
   at Corsinvest.ProxmoxVE.AutoSnap.Commands.App_PhaseEvent(Object sender, PhaseEventArgs e)
   at Corsinvest.ProxmoxVE.AutoSnap.Api.Application.CallPhaseEvent(HookPhase phase, IClusterResourceVm vm, String label, Int32 keep, String snapName, Boolean vmState, Double duration, Boolean status)
   at Corsinvest.ProxmoxVE.AutoSnap.Api.Application.Snap(String vmIdsOrNames, String label, Int32 keep, Boolean state, Int64 timeout, String timestampFormat, Int32 maxPercentageStorage, Boolean onlyRuns)
   at Corsinvest.ProxmoxVE.AutoSnap.Commands.<>c__DisplayClass12_0.<<Snap>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()

Proxmox VE Version

7.4-3

Version (bug)

1.14.8

Version (working)

No response

On what operating system are you experiencing the issue?

Linux

Pull Request

  • I would like to do a Pull Request
Originally created by @chaz393 on GitHub (Apr 17, 2023). Original GitHub issue: https://github.com/Corsinvest/cv4pve-autosnap/issues/76 ### What happened? When I try to use the --script parameter I get the following error. I updated to the latest version and it still happens. I tried using the example hook script in the repository and it also happens with that script. This was on a debian 10 installation. If more logs will help I can provide more logs they just didn't seem to be very helpful when I looked through them. ### Expected behavior It runs the script ### Relevant log output ```shell Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object. at Corsinvest.ProxmoxVE.AutoSnap.Api.PhaseEventArgs.get_Environments() at Corsinvest.ProxmoxVE.AutoSnap.Commands.App_PhaseEvent(Object sender, PhaseEventArgs e) at Corsinvest.ProxmoxVE.AutoSnap.Api.Application.CallPhaseEvent(HookPhase phase, IClusterResourceVm vm, String label, Int32 keep, String snapName, Boolean vmState, Double duration, Boolean status) at Corsinvest.ProxmoxVE.AutoSnap.Api.Application.Snap(String vmIdsOrNames, String label, Int32 keep, Boolean state, Int64 timeout, String timestampFormat, Int32 maxPercentageStorage, Boolean onlyRuns) at Corsinvest.ProxmoxVE.AutoSnap.Commands.<>c__DisplayClass12_0.<<Snap>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context) at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext() --- End of stack trace from previous location --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext() ``` ### Proxmox VE Version 7.4-3 ### Version (bug) 1.14.8 ### Version (working) _No response_ ### On what operating system are you experiencing the issue? Linux ### Pull Request - [ ] I would like to do a Pull Request
kerem 2026-02-26 17:44:16 +03:00
Author
Owner

@franklupo commented on GitHub (Apr 20, 2023):

Hi,
can execute with option --debug and attach logs? remember in the log are present the password

Best regards

<!-- gh-comment-id:1515859166 --> @franklupo commented on GitHub (Apr 20, 2023): Hi, can execute with option --debug and attach logs? remember in the log are present the password Best regards
Author
Owner

@franklupo commented on GitHub (Jul 6, 2023):

news?

<!-- gh-comment-id:1624005971 --> @franklupo commented on GitHub (Jul 6, 2023): news?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-autosnap#70
No description provided.