tigattack / VeeamNotify

Send Veeam B&R session summary notifications to Discord, Slack, and Teams.
GNU General Public License v3.0
42 stars 8 forks source link

[BUG] Error triggering notification in Veeam v12 #80

Open sistemmsn opened 3 months ago

sistemmsn commented 3 months ago

What happened?

Commands are not recognized at the time of execution

Steps To Reproduce

No response

VeeamNotify version

v1.0

PowerShell version

5.1

Veeam Backup & Replication build number

12.1.2.172

Relevant log output

**********************
Inicio de la transcripción de Windows PowerShell
Hora de inicio: 20240824222232
Nombre de usuario: VEEAM\holi
Usuario RunAs: VEEAM\holi
Nombre de la configuración: 
Máquina: VEEAM (Microsoft Windows NT 10.0.20348.0)
Aplicación host: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\VeeamScripts\VeeamNotify\Bootstrap.ps1
Id. de proceso: 20664
PSVersion: 5.1.20348.2652
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.20348.2652
BuildVersion: 10.0.20348.2652
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
2024-08-25T04:22:32.191Z [INFO] Transcript is being logged to 'C:\VeeamScripts\VeeamNotify\log\2024-08-24_22.22.32_Bootstrap.log'.
2024-08-25T04:22:32.426Z [INFO] Version: v1.0.1
No se puede indizar en una matriz nula.
En C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 52 Carácter: 1
+ $jobId = ([regex]::Matches($parentCmd, $idRegex)).Value[0]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray
No se puede indizar en una matriz nula.
En C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 52 Carácter: 1
+ $jobId = ([regex]::Matches($parentCmd, $idRegex)).Value[0]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

No se puede indizar en una matriz nula.
En C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 53 Carácter: 1
+ $sessionId = ([regex]::Matches($parentCmd, $idRegex)).Value[1]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray
No se puede indizar en una matriz nula.
En C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 53 Carácter: 1
+ $sessionId = ([regex]::Matches($parentCmd, $idRegex)).Value[1]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

2024-08-25T04:22:33.004Z [INFO] Getting VBR job details
2024-08-25T04:22:41.816Z [INFO] Getting VBR session information
PS>ErrorTerminación(Get-VBRSessionInfo): "No se puede enlazar el argumento al parámetro 'SessionId' porque es nulo."
Get-VBRSessionInfo : No se puede enlazar el argumento al parámetro 'SessionId' porque es nulo.
En C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 62 Carácter: 46
+ $sessionInfo = Get-VBRSessionInfo -SessionId $sessionId -JobType $job ...
+                                              ~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-VBRSessionInfo], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-VBRSessionInfo
Get-VBRSessionInfo : No se puede enlazar el argumento al parámetro 'SessionId' porque es nulo.
En C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 62 Carácter: 46
+ $sessionInfo = Get-VBRSessionInfo -SessionId $sessionId -JobType $job ...
+                                              ~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-VBRSessionInfo], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-VBRSessionInfo

No se puede llamar a un método en una expresión con valor NULL.
En C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 66 Carácter: 1
+ $vbrLogEntry = $vbrSessionLogger.AddLog('[VeeamNotify] Parsing job &  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
No se puede llamar a un método en una expresión con valor NULL.
En C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 66 Carácter: 1
+ $vbrLogEntry = $vbrSessionLogger.AddLog('[VeeamNotify] Parsing job &  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

2024-08-25T04:22:42.051Z [ERROR] Job type '' is not supported.
tigattack commented 3 months ago

Hi, please set the log level to debug (see here) and update the issue.

I'd also appreciate it if you'd translate the error messages as I'm afraid I don't know Spanish and this would make it a lot easier for me to figure out what's going wrong.

sistemmsn commented 3 months ago

But if the errors you need to know are in English, I already activated debugging and I see it the same, the commands you use to extract the results are different in version 12

**********************
Start of Windows PowerShell Transcript
Start Time: 20240825112228
User Name: VEEAM\hello
RunAs User: VEEAM\hello
Configuration Name:
Machine: VEEAM (Microsoft Windows NT 10.0.20348.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\VeeamScripts\VeeamNotify\Bootstrap.ps1
Process ID: 14956
PSVersion: 5.1.20348.2652
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.20348.2652 BuildVersion: 10.0.20348.2652 CLRVersion: 4.0.30319.42000 WSManStackVersion: 3.0 PSRemotingProtocolVersion: 2.3 SerializationVersion: 1.1.0.1 ********************** 2024-08-25T17:22: 28.562Z [INFO] Transcript is being logged to 'C:\VeeamScripts\VeeamNotify\log\2024-08-25_11.22.28_Bootstrap.log'.
2024-08-25T17:22:28.661Z [INFO] Version: v1.0.1
Cannot index on null array.
In C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 52 Character: 1
+ $jobId = ([regex]::Matches($parentCmd, $idRegex)).Value[0]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
Cannot index on null array.
In C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 52 Character: 1
+ $jobId = ([regex]::Matches($parentCmd, $idRegex)).Value[0]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray

Cannot index on a null array.
In C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 53 Character: 1 + $sessionId = ([regex]::Matches($parentCmd, $idRegex)).Value[1] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array.
In C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 53 Character: 1 + $sessionId = ([regex]::Matches($parentCmd, $idRegex)).Value[1] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray 2024-08-25T17:22:28.980Z [INFO] Getting VBR job details 2024-08-25T17:22:33.669Z [INFO] Getting VBR session information
PS>TerminationError(Get-VBRSessionInfo): "Cannot bind argument to parameter 'SessionId' because it is null."
Get-VBRSessionInfo : Cannot bind argument to parameter 'SessionId' because it is null.
In C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 62 Character: 46 + $sessionInfo = Get-VBRSessionInfo -SessionId $sessionId -JobType $job ... + ~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Get-VBRSessionInfo], ParameterBindingValidationException + FullyQualifiedError Id : ParameterArgumentValidationErrorNullNotAllowed,Get-VBRSessionInfo Get-VBRSessionInfo : Cannot bind argument to parameter 'SessionId' because it is null.
In C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 62 Character: 46
+ $sessionInfo = Get-VBRSessionInfo -SessionId $sessionId -JobType $job ...
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-VBRSessionInfo], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-VBRSessionInfo

A method cannot be called on an expression with a NULL value.
In C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 66 Character: 1
+ $vbrLogEntry = $vbrSessionLogger.AddLog('[VeeamNotify] Parsing job & ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
A method cannot be called on an expression with a NULL value.
In C:\VeeamScripts\VeeamNotify\Bootstrap.ps1: 66 Character: 1
+ $vbrLogEntry = $vbrSessionLogger.AddLog('[VeeamNotify] Parsing job & ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull 2024-08-25T17:22:33.822Z [ERROR] Job type '' is not supported.
tigattack commented 3 months ago

Thank you, and apologies for my oversight there.

I'll update my instance and try to find a fix for this ASAP. If you have any further details as to what's changed, that would be very helpful.

FYI I'm leaving to go on holiday for several weeks in the morning, so I won't be able to look at this for a bit. PRs welcome!