Ombi: Mattermost notification fails

Created on 20 Apr 2018  路  11Comments  路  Source: tidusjar/Ombi

Ombi build Version:

Version 3.0.3185
Using latest docker image from https://hub.docker.com/r/linuxserver/ombi/

Branch

master

Media Sever:

Emby

Mattermost version:

4.9.0

Operating System:

GNU/Linux

Ombi Applicable Logs (from /logs/ directory or the Admin page):


2018-04-19 23:58:18.558 +02:00 [Error] Failed to send Mattermost Notification
System.ArgumentNullException: Value cannot be null.
Parameter name: uriString
   at System.Uri..ctor(String uriString)
   at Ombi.Notifications.Agents.MattermostNotification.<Send>d__19.MoveNext() in C:\projects\requestplex\src\Ombi.Notifications\Agents\MattermostNotification.cs:line 201

Problem Description:

Trying to setup mattermost notifications.
WebUI says its OK, but message never arrives, and logs says it failed.

Reproduction Steps:

Go to Settings / Notifications / Mattermost.
Set the Incoming Webhook Url.

Click the Test button.
It will send a query to https://ombi.fqdn/api/v1/tester/mattermost with following data :

channel | 聽
enabled | true
iconUrl | null
username | Ombi
webhookUrl | https://mattermost.fqdn/hooks/kz456r77xigx8y1ero8gsdfjsc

This http call returns a 200 code, and "true".
Logs says theres an error.

Inside the SQLite DB, the GlobalSettings contains what seems to be a valid entry :

6|{"WebhookUrl":"https://mattermost.fqdn/hooks/kz456r77xigx8y1ero8gsdfjsc","Channel":"","Username":"Ombi","Enabled":true,"Id":6}|MattermostNotificationSettings

Triggering events also doesnt end up sending notifications to mattermost.

bug / issue

All 11 comments

I can see there has been fixes for mattermost a month ago.
I hope it's not just the docker image i have that is missing them.
Waiting for informations.

You can find the version of the settings about page.

Hu, i am very tired those days... It was in front of me !
I update my first comment.

Do you have an IconURL? Does it work if you add it?

Ok i have set a channel and an icon to make sure there is nothing empty.
The Web UI still says everything is OK.

Inside the Ombi logs, i get :

2018-04-20 12:13:50.687 +02:00 [Error] Failed to send Mattermost Notification
System.NullReferenceException: Object reference not set to an instance of an object.
   at Ombi.Api.Mattermost.Models.MatterhookClient.<PostAsync>d__5.MoveNext() in C:\projects\requestplex\src\Ombi.Api.Mattermost\Models\MattermostClient.cs:line 164
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Ombi.Api.Mattermost.MattermostApi.<PushAsync>d__2.MoveNext() in C:\projects\requestplex\src\Ombi.Api.Mattermost\MattermostApi.cs:line 20
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Ombi.Notifications.Agents.MattermostNotification.<Send>d__19.MoveNext() in C:\projects\requestplex\src\Ombi.Notifications\Agents\MattermostNotification.cs:line 216

inside Ombi's SQLite DB, i have :

6|{"WebhookUrl":"https://mattermost.fqdn/hooks/kz456r77xigx8y1ero8gsdfjsc","Channel":"Demandes","Username":"Ombi","IconUrl":"https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/ombi.png","Enabled":true,"Id":6}|MattermostNotificationSettings

EDIT: Deleted the mattermost logs part, as they were originated from the Emby container.

I also have this issue:

fail: Ombi.Notifications.Agents.MattermostNotification[4004]
      Failed to send Mattermost Notification
System.ArgumentNullException: Value cannot be null.
Parameter name: uriString
   at System.Uri..ctor(String uriString)
   at Ombi.Notifications.Agents.MattermostNotification.<Send>d__19.MoveNext() in C:\projects\requestplex\src\Ombi.Notifications\Agents\MattermostNotification.cs:line 201

On top of that, the message that is displayed in the UI when testing the connection is as follows: "Successfully sent a Mattermost message, please check the discord channel". It should not say "discord channel".

In this case, it should not even say "Successfully sent" =)

I pushed a fix for this in develop, can someone update to V3.0.3351 and try again?

I use a docker image for Ombi (https://hub.docker.com/r/linuxserver/ombi/), and not going to break my infra for this.

But, if you need to make tests, i can probably send you (privately, by mail) a webhook URL to my own mattermost instance so you can try.

@gfriloux Thank you that would be really helpful for debugging this. My email address is athayapa (at) sfu (dot) ca

Also there is a ombi development container that you can use for testing if you don't want to affect your production infrastructure, ombi-preview, it updates to latest version when you restart the container.

This has been fixed in develop. Thanks to @gfriloux for helping us resolve this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tidusjar picture tidusjar  路  5Comments

douglasparker picture douglasparker  路  5Comments

PotatoQuality picture PotatoQuality  路  3Comments

diedrichg picture diedrichg  路  4Comments

weirdcrap picture weirdcrap  路  5Comments