tigattack / VeeamNotify

Send Veeam B&R session summary notifications to Discord, Slack, and Teams.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with B&R 12

sicXnull opened this issue · comments

commented

What happened?

Upgraded to B&R 12 Community and now get this error. Seems "GetByOriginalSessionId" is now coming back as a null value

image

Steps To Reproduce

No response

VeeamNotify version

v1.0

PowerShell version

5.1

Veeam Backup & Replication build number

12

Relevant log output

**********************
Windows PowerShell transcript start
Start time: 20230425052532
Username: WORKGROUP\SYSTEM
RunAs User: WORKGROUP\SYSTEM
Configuration Name: 
Machine: WINSERVER (Microsoft Windows NT 10.0.20348.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File C:\VeeamScripts\VeeamNotify\Bootstrap.ps1
Process ID: 14840
PSVersion: 5.1.20348.1366
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.20348.1366
BuildVersion: 10.0.20348.1366
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
2023-04-25T09:25:32.884Z [INFO] Transcript is being logged to 'C:\VeeamScripts\VeeamNotify\log\2023-04-25_05.25.32_Bootstrap.log'.
2023-04-25T09:25:33.010Z [INFO] Version: v1.0
2023-04-25T09:25:33.355Z [INFO] Getting VBR job details
2023-04-25T09:25:53.891Z [INFO] Getting VBR session information
2023-04-25T09:25:54.143Z [INFO] Bootstrap script for Veeam job 'ubuntu' (job 18bf3c3b-c312-40ee-a0c1-2a3050d7bffa session f8037039-f6cd-400e-9016-8ae0b9ffd0a1) - Session & job detection complete.
2023-04-25T09:25:54.158Z [INFO] Launching AlertSender.ps1...
2023-04-25T09:25:54.252Z [INFO] AlertSender.ps1 launched successfully.
2023-04-25T09:25:54.268Z [INFO] Stopping transcript logging.

..................


}
 -Logfile C:\VeeamScripts\VeeamNotify\log\2023-04-25_05.25.32-ubuntu.log
Process ID: 2308
PSVersion: 5.1.20348.1366
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.20348.1366
BuildVersion: 10.0.20348.1366
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
2023-04-25T09:25:58.209Z [INFO] Transcript is being logged to 'C:\VeeamScripts\VeeamNotify\log\2023-04-25_05.25.32-ubuntu.log'.
PS>TerminatingError(Get-VBRSessionInfo): "Exception calling "GetByOriginalSessionId" with "1" argument(s): "Object reference not set to an instance of an object.""
2023-04-25T09:25:59.089Z [ERROR] A terminating error occured:
2023-04-25T09:25:59.105Z [INFO] Stopping transcript logging.
**********************
Windows PowerShell transcript end
End time: 20230425052559
**********************

I'll try to reproduce this, but I'm not confident on whether this will support the community edition as I'm not 100% sure what differences there are. From a quick look at the product comparison PDF it looks like it should be fine, so hopefully that holds true.

How does the job type present in the UI, what's the value of the 'Type' column in the jobs list?

commented

I believe this is what you are asking. Looks the same as 11

image

I've since rolled back to 11 and things are working flawlessly again. That said, I spun up a VM with 12 on it, so if you need any other info let me know.

Ideal, thanks, that's what I was after. I'll have a look into it let you know if I need anything, cheers.

Hey @sicXnull, sorry for the delay here, could you see if the change in 49a659c resolves this? Looks like it was likely caused by a bug that I missed, so this project may well be compatible with the Community edition!

You can download the fixed file from here and save to C:\VeeamScripts\VeeamNotify\resources\VBRSessionInfo.psm1.

If this does indeed resolve the issue for you, I'll create a new release with the fix included.

commented

@tigattack thanks! I'll spin up a VM and test this weekend.

FYI I've made a new release with the fix as it solved what appears to be the same problem in #61.

commented

@tigattack confirmed working. Thanks for the fix!