Jump to content

No user activity notification email since updating to latest emby prod version.


Recommended Posts

Posted

Chiming back in as I am the original poster - but my error is back again in the log - As each received email is files and arechived in gmail, I can see when this stopped working.  Last one I got was 21st October......  NOTE MY LOG IS NOT A SERVER RESPONSE ERROR AS ABOVE - BUT A PROTOCOL ERROR

2025-11-04 07:41:25.897 Info UserActivityReportNotification - TaskNotifictionReport: Activity Query : SELECT UserId, ItemType, ItemName, SUM(PlayDuration - PauseDuration) AS PlayTime FROM PlaybackActivity WHERE DateCreated > '2025-11-03 09:00:00.152206' AND UserId not IN (select UserId from UserList) AND (PlayDuration - PauseDuration) > 180 GROUP BY UserId, ItemType, ItemName
2025-11-04 07:41:26.000 Info UserActivityReportNotification - TaskNotifictionReport: Cutoff DateTime for new items - date: 2025-11-03 09:00:00.152206 ago: 22:41:25.8482933
2025-11-04 07:41:26.000 Info UserActivityReportNotification - TaskNotifictionReport: User activity Message : ItemCount : 46
2025-11-04 07:41:26.005 Info TaskManager: User Activity Notification Completed after 0 minute(s) and 0 seconds
2025-11-04 07:41:26.214 Error Notifications: Error sending notification
    *** Error Report ***
    Version: 4.9.1.80
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Linux version 6.12.24-Unraid (root@Develop) (gcc (GCC) 14.2.0, GNU ld version 2.44-slack151) #1 SMP PREEMPT_DYNAMIC Sat May  3 00:12:52 PDT 2025
    OS/Process: x64/x64
    Framework: .NET 8.0.11
    Runtime: system/System.Private.CoreLib.dll
    Processor count: 12
    Data path: /config
    Application path: /system
    System.Net.Mail.SmtpException: System.Net.Mail.SmtpException: The server committed a protocol violation. The server response was: 
       at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
       at System.Net.Mail.MailCommand.EndSend(IAsyncResult result)
       at System.Net.Mail.SendMailAsyncResult.SendMailFromCompleted(IAsyncResult result)
    --- End of stack trace from previous location ---
       at System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result)
       at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result)
    --- End of stack trace from previous location ---
       at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(InternalNotificationRequest request, CancellationToken cancellationToken)
       at Emby.Notifications.NotificationQueueManager.StartProcessingQueue()
    Source: System.Net.Mail
    TargetSite: Void CheckResponse(System.Net.Mail.SmtpStatusCode, System.String)

 

Posted

@vaisethis looks like the email settings not being configured correctly. Could be wrong port number, could be that ssl is not checked when it should be or vice versa, etc.

Posted

I have moved this over the discord webhooks now.

Posted

I saw similar when I re setup the notfication - it worked for a few days, then did not - and I never noticed as I moved it to discord webhooks anf the email get auto archived so I was never looking.  got quite a few gaps now in my history going back many years.

Posted
On 11/3/2025 at 8:13 PM, Luke said:

@vaisethis looks like the email settings not being configured correctly. Could be wrong port number, could be that ssl is not checked when it should be or vice versa, etc.

@vaise

Posted
5 hours ago, Luke said:

Inonly resvaed, and it worked.

its just the sxheduled  that does not.

and other thongs are being emailed.

Posted

Got some time to reports back on this.

I have two scheduled jobs :

New Media Report - scheduled at 06:00 every day - That is working and I can see an email every day.

Use Activity Report - scheduled at 06:15 every day - That stopped Oct 21st - when I upgraded to the newest prod server.

In emby, admin preferences, notifications I have ONLY one thing setup for both user reporting solutions - i.e if you scroll to the end of the email setup,  I have ONLY Playback Reporting ticked, and below that, the two things it provides - User Activity Report and New Media Report.  SO THEY BOTH SHARE THE SAME EMAIL CONFIG AND AS ONE WORKS, IF CANT BE EMAIL GMAIN SETTINGS AT FAULT HERE.

In scheduled Jobs, I have two scheduled jobs - as described above i.e :

 

New Media Report - scheduled at 06:00 every day - That is working and I can see an email every day.

Use Activity Report - scheduled at 06:15 every day - That stopped Oct 21st - when I upgraded to the newest prod server.

So I dont quite get how one can work and one NOT work, when they are both part of the same notification setup. 

I can test email setup - it works, and I can manually kick the jobs off from scheduled jobs, and they both work.

I have a theory that since the upgrade, these may need to be split into two separate notification setups, rather than be shared ?

For further testing :

I have changed these scheduled jobs tomorrow to test this theory out - i.e I have swapped them around, and also changed time to when I am awake :

Use Activity Report - now scheduled at 08:00 every day - 

New Media Report - now scheduled at 08:15 every day - 

For even further testing after tomorrow, I may have to setup two email notification - but that would prove there is a bug here introduced i the new prod system.

 

 

 

 

Posted

Following the overnight testing- today I only got the New Media Report Notification at 08:15.

The User Activity Report Notification that should have fired at 08:00 did not come in.

As posted yesterday - they both use the SAME email notification setup in emby.

The emby server job error for 08:00 shows this failure :

2025-11-09 08:00:00.000 Info UserActivityReportNotification - TaskNotifictionReport: Activity Query : SELECT UserId, ItemType, ItemName, SUM(PlayDuration - PauseDuration) AS PlayTime FROM PlaybackActivity WHERE DateCreated > '2025-11-08 15:56:58.2668796' AND UserId not IN (select UserId from UserList) AND (PlayDuration - PauseDuration) > 180 GROUP BY UserId, ItemType, ItemName
2025-11-09 08:00:00.136 Info UserActivityReportNotification - TaskNotifictionReport: Cutoff DateTime for new items - date: 2025-11-08 15:56:58.2668796 ago: 16:03:01.8694400
2025-11-09 08:00:00.136 Info UserActivityReportNotification - TaskNotifictionReport: User activity Message : ItemCount : 72
2025-11-09 08:00:00.277 Error Notifications: Error sending notification
    *** Error Report ***
    Version: 4.9.1.80
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Linux version 6.12.24-Unraid (root@Develop) (gcc (GCC) 14.2.0, GNU ld version 2.44-slack151) #1 SMP PREEMPT_DYNAMIC Sat May  3 00:12:52 PDT 2025
    OS/Process: x64/x64
    Framework: .NET 8.0.11
    Runtime: system/System.Private.CoreLib.dll
    Processor count: 12
    Data path: /config
    Application path: /system
    System.Net.Mail.SmtpException: System.Net.Mail.SmtpException: Error in processing. The server response was: 4.4.2 Timeout - closing connection.
       at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
       at System.Net.Mail.MailCommand.EndSend(IAsyncResult result)
       at System.Net.Mail.SendMailAsyncResult.SendMailFrom()
       at System.Net.Mail.SmtpTransport.BeginSendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, AsyncCallback callback, Object state)
       at System.Net.Mail.SmtpClient.SendMailAsync(Object state)
       at System.Net.Mail.SmtpClient.SendAsync(MailMessage message, Object userToken)
    --- End of stack trace from previous location ---
       at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(InternalNotificationRequest request, CancellationToken cancellationToken)
       at Emby.Notifications.NotificationQueueManager.StartProcessingQueue()
    Source: System.Net.Mail
    TargetSite: Void CheckResponse(System.Net.Mail.SmtpStatusCode, System.String)
    
2025-11-09 08:00:00.327 Info HttpClient: POST https://discord.com/api/webhooks/1078235696604663808/RJYFGxYt2BSiB7I6CGNUEu4sNMpkSpaLvEg8Hbp5ABQWkECd0f0DbC1v3bmGmycoaRFK
2025-11-09 08:00:00.795 Info HttpClient: Http response 400 from https://discord.com/api/webhooks/1078235696604663808/RJYFGxYt2BSiB7I6CGNUEu4sNMpkSpaLvEg8Hbp5ABQWkECd0f0DbC1v3bmGmycoaRFK after 467ms
2025-11-09 08:00:00.796 Error Notifications: Error sending notification
    *** Error Report ***
    Version: 4.9.1.80
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Linux version 6.12.24-Unraid (root@Develop) (gcc (GCC) 14.2.0, GNU ld version 2.44-slack151) #1 SMP PREEMPT_DYNAMIC Sat May  3 00:12:52 PDT 2025
    OS/Process: x64/x64
    Framework: .NET 8.0.11
    Runtime: system/System.Private.CoreLib.dll
    Processor count: 12
    Data path: /config
    Application path: /system
    MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: BadRequest
       at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
       at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
       at Emby.Notifications.Discord.DiscordWebhookHelper.ExecuteWebhook(DiscordMessage message, String webhookUrl, IJsonSerializer _jsonSerializer, IHttpClient httpClient, CancellationToken cancellationToken)
       at Emby.Notifications.NotificationQueueManager.StartProcessingQueue()
    Source: Emby.Server.Implementations
    TargetSite: Void MoveNext()
    

 

 

 

 

Posted

For todays Test - I am separating the working notification setup from the not working setup.

I created a new gmail app password just for emby-user-activity.

I edited the existing notification so it is ONLY for new media added.

image.png.485bcf3379a245a25f4eabe87573592b.png

I created a new notification with the new app password, and set this to ONLY have emby user activity.  This email test fine

image.png.e8611f06da32b9262e44fd8e499b79e4.png

I ran both manually from scheduled jobs - they work.

Tomorrow, lets see what 08:00 and 08:15 produce.

If they both work, I suggest you have a bug introduced with the new prod release in that these Playback Reporting need to be SEPARATED into their own notification configs.

 

 

Posted

Only the New Media Report came through.  Seems all my testing proved the user activity when run via scheduler does not work since latest prod update.

Posted

Can you please give it another try? Thanks.

Posted

In 2.5 hours it’s due to run.

  • Thanks 1
Posted

It’s working now.

Posted

But strangely, now the other one - new media reports - is not sending instead........  so the issue is reversed now.  This one was working every day.

2025-11-19 08:15:02.706 Error Notifications: Error sending notification
    *** Error Report ***
    Version: 4.9.1.90
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Linux version 6.12.24-Unraid (root@Develop) (gcc (GCC) 14.2.0, GNU ld version 2.44-slack151) #1 SMP PREEMPT_DYNAMIC Sat May  3 00:12:52 PDT 2025
    OS/Process: x64/x64
    Framework: .NET 8.0.11
    Runtime: system/System.Private.CoreLib.dll
    Processor count: 12
    Data path: /config
    Application path: /system
    System.Net.Mail.SmtpException: System.Net.Mail.SmtpException: Error in processing. The server response was: 4.4.2 Timeout - closing connection.
       at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
       at System.Net.Mail.MailCommand.EndSend(IAsyncResult result)
       at System.Net.Mail.SendMailAsyncResult.SendMailFrom()
       at System.Net.Mail.SmtpTransport.BeginSendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, AsyncCallback callback, Object state)
       at System.Net.Mail.SmtpClient.SendMailAsync(Object state)
       at System.Net.Mail.SmtpClient.SendAsync(MailMessage message, Object userToken)
    --- End of stack trace from previous location ---
       at MediaBrowser.Plugins.SmtpNotifications.Notifier.SendNotification(InternalNotificationRequest request, CancellationToken cancellationToken)
       at Emby.Notifications.NotificationQueueManager.StartProcessingQueue()
    Source: System.Net.Mail
    TargetSite: Void CheckResponse(System.Net.Mail.SmtpStatusCode, System.String)

 

Posted

In summary, it seems that since the prod major update, you can have one or the other, but not both of these notifications.

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...