[GH-ISSUE #136] HTTP Hook fails with "Object reference not set to an instance of an object" regardless of phase #55

Closed
opened 2026-02-26 17:37:03 +03:00 by kerem · 5 comments
Owner

Originally created by @th3cube on GitHub (Jun 3, 2025).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-admin/issues/136

Bug type

Component

Component name

Autosnap

What happened?

HTTP Hook fails with "Object reference not set to an instance of an object" regardless of phase

When configuring any HTTP hook in AutoSnap jobs, the hook execution fails with a null reference error with SnapJobStart and SnapJobEnd phases. However, SnapCreatePost phase works correctly.

Environment

  • PVE Version: 8.4.1
  • cv4pve-admin version: 1.3.1
  • Hook Configuration:
    • Phase: Tried multiple (SnapJobStart, SnapJobEnd, SnapCreatePost)
    • HTTP Method: POST
    • URL: External webhook endpoint
    • Data Format: Tried both with and without "Data Is Key Value (JSON Format)"

Error Message

Execute Hook HTTP 'SnapJobStart' Command 'SnapJobStart'
  Error 'Object reference not set to an instance of an object.'

Stack Trace from Logs

System.NullReferenceException: Object reference not set to an instance of an object.
   at Corsinvest.ProxmoxVE.AutoSnap.Api.PhaseEventArgs.get_Environments()
   at Corsinvest.ProxmoxVE.Admin.AutoSnap.Helper.<>c__DisplayClass9_0.b__1(Object sender, PhaseEventArgs e) in /src/src/Corsinvest.ProxmoxVE.Admin.AutoSnap/Helper.cs:line 145

Steps to Reproduce

  1. Configure an AutoSnap job
  2. Add an HTTP hook with any phase
  3. Configure webhook URL and payload
  4. Run the AutoSnap job
  5. Observe the error in logs

Additional Information

  • The snapshot operations themselves complete successfully
  • The error occurs with SnapJobStart and SnapJobEnd phases
  • SnapCreatePost phase works correctly
  • Tried with and without payload data
  • Tried with different webhook endpoints
  • Error persists across multiple AutoSnap job executions

Expected Behavior

The HTTP hook should execute successfully after the specified phase (job start/end or snapshot creation) and send the webhook request to the configured endpoint.

Relevant log output

## Error Message

Execute Hook HTTP 'SnapJobStart' Command 'SnapJobStart'
  Error 'Object reference not set to an instance of an object.'


## Stack Trace from Logs

System.NullReferenceException: Object reference not set to an instance of an object.
   at Corsinvest.ProxmoxVE.AutoSnap.Api.PhaseEventArgs.get_Environments()
   at Corsinvest.ProxmoxVE.Admin.AutoSnap.Helper.<>c__DisplayClass9_0.b__1(Object sender, PhaseEventArgs e) in /src/src/Corsinvest.ProxmoxVE.Admin.AutoSnap/Helper.cs:line 145

Proxmox VE Version

8.4.1

Version (bug)

1.3.1

Version (working)

No response

What browsers are you seeing the problem on?

No response

On what operating system are you experiencing the issue?

Linux / Docker

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @th3cube on GitHub (Jun 3, 2025). Original GitHub issue: https://github.com/Corsinvest/cv4pve-admin/issues/136 ### Bug type Component ### Component name Autosnap ### What happened? # HTTP Hook fails with "Object reference not set to an instance of an object" regardless of phase When configuring any HTTP hook in AutoSnap jobs, the hook execution fails with a null reference error with SnapJobStart and SnapJobEnd phases. However, SnapCreatePost phase works correctly. ## Environment - PVE Version: 8.4.1 - cv4pve-admin version: 1.3.1 - Hook Configuration: - Phase: Tried multiple (SnapJobStart, SnapJobEnd, SnapCreatePost) - HTTP Method: POST - URL: External webhook endpoint - Data Format: Tried both with and without "Data Is Key Value (JSON Format)" ## Error Message ``` Execute Hook HTTP 'SnapJobStart' Command 'SnapJobStart' Error 'Object reference not set to an instance of an object.' ``` ## Stack Trace from Logs ``` System.NullReferenceException: Object reference not set to an instance of an object. at Corsinvest.ProxmoxVE.AutoSnap.Api.PhaseEventArgs.get_Environments() at Corsinvest.ProxmoxVE.Admin.AutoSnap.Helper.<>c__DisplayClass9_0.b__1(Object sender, PhaseEventArgs e) in /src/src/Corsinvest.ProxmoxVE.Admin.AutoSnap/Helper.cs:line 145 ``` ## Steps to Reproduce 1. Configure an AutoSnap job 2. Add an HTTP hook with any phase 3. Configure webhook URL and payload 4. Run the AutoSnap job 5. Observe the error in logs ## Additional Information - The snapshot operations themselves complete successfully - The error occurs with SnapJobStart and SnapJobEnd phases - SnapCreatePost phase works correctly - Tried with and without payload data - Tried with different webhook endpoints - Error persists across multiple AutoSnap job executions ## Expected Behavior The HTTP hook should execute successfully after the specified phase (job start/end or snapshot creation) and send the webhook request to the configured endpoint. ### Relevant log output ```shell ## Error Message Execute Hook HTTP 'SnapJobStart' Command 'SnapJobStart' Error 'Object reference not set to an instance of an object.' ## Stack Trace from Logs System.NullReferenceException: Object reference not set to an instance of an object. at Corsinvest.ProxmoxVE.AutoSnap.Api.PhaseEventArgs.get_Environments() at Corsinvest.ProxmoxVE.Admin.AutoSnap.Helper.<>c__DisplayClass9_0.b__1(Object sender, PhaseEventArgs e) in /src/src/Corsinvest.ProxmoxVE.Admin.AutoSnap/Helper.cs:line 145 ``` ### Proxmox VE Version 8.4.1 ### Version (bug) 1.3.1 ### Version (working) _No response_ ### What browsers are you seeing the problem on? _No response_ ### On what operating system are you experiencing the issue? Linux / Docker ### Pull Request - [ ] I would like to do a Pull Request ### Code of Conduct - [x] I agree to follow this project's Code of Conduct
kerem closed this issue 2026-02-26 17:37:03 +03:00
Author
Owner

@franklupo commented on GitHub (Jun 4, 2025):

What settings have been set?

<!-- gh-comment-id:2939899562 --> @franklupo commented on GitHub (Jun 4, 2025): What settings have been set?
Author
Owner

@th3cube commented on GitHub (Jun 4, 2025):

Hi franklupo,

I tried many combinations of setting. One with and Without Json Payload. Here is an Example:

Image

The SnapCreatePost Phase for some reason works with the same Settings.

Do you want me to try any other Settings?

<!-- gh-comment-id:2940354369 --> @th3cube commented on GitHub (Jun 4, 2025): Hi franklupo, I tried many combinations of setting. One with and Without Json Payload. Here is an Example: <img width="1271" alt="Image" src="https://github.com/user-attachments/assets/6cec1a6e-189a-40f0-930a-58d8abaf2832" /> The SnapCreatePost Phase for some reason works with the same Settings. Do you want me to try any other Settings?
Author
Owner

@franklupo commented on GitHub (Jun 12, 2025):

H,
but the url is not set?

<!-- gh-comment-id:2965380563 --> @franklupo commented on GitHub (Jun 12, 2025): H, but the url is not set?
Author
Owner

@th3cube commented on GitHub (Jun 12, 2025):

The URL is set, it is just not visible in the Screenshot.

<!-- gh-comment-id:2965690766 --> @th3cube commented on GitHub (Jun 12, 2025): The URL is set, it is just not visible in the Screenshot.
Author
Owner

@franklupo commented on GitHub (Feb 18, 2026):

Thank you for reporting this!

Version 1.x is now end-of-life and will no longer receive bug fixes or updates.

Version 2.0 is a complete rewrite of the application with major improvements, a new architecture, and many enhancements — including a reworked AutoSnap module. We recommend upgrading to 2.0.0-rc2, which is available now.

Please give it a try and let us know if the issue persists on v2.

<!-- gh-comment-id:3920344777 --> @franklupo commented on GitHub (Feb 18, 2026): Thank you for reporting this! Version **1.x is now end-of-life** and will no longer receive bug fixes or updates. **Version 2.0** is a complete rewrite of the application with major improvements, a new architecture, and many enhancements — including a reworked AutoSnap module. We recommend upgrading to **2.0.0-rc2**, which is available now. Please give it a try and let us know if the issue persists on v2.
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-admin#55
No description provided.