Exception caught: Object reference not set to an instance of an object. #78

Open
opened 2025-11-14 07:41:50 +00:00 by Bookfront · 8 comments

Hi, whenever I try to download the video I paid for in Messages, I get this error:

Exception caught: Object reference not set to an instance of an object.

                     StackTrace:    at OF_DL.Helpers.DownloadHelper.OnError(Object sender, ConversionErrorEventArgs e)

at FFmpeg.NET.Engine.OnError(ConversionErrorEventArgs e)
at FFmpeg.NET.FFmpegProcess.OnConversionError(ConversionErrorEventArgs eventArgs)
at FFmpeg.NET.FFmpegProcess.OnException(List`1 messages, FFmpegParameters parameters, Int32 exitCode, Exception caughtException)
at FFmpeg.NET.FFmpegProcess.ExecuteAsync(ProcessStartInfo startInfo, FFmpegParameters parameters, CancellationToken cancellationToken)
at FFmpeg.NET.FFmpegProcess.ExecuteAsync(CancellationToken cancellationToken)
at FFmpeg.NET.Engine.ExecuteAsync(FFmpegParameters parameters, CancellationToken cancellationToken)
at FFmpeg.NET.Engine.ExecuteAsync(String arguments, CancellationToken cancellationToken)
at OF_DL.Helpers.DownloadHelper.DownloadDrmMedia(String user_agent, String policy, String signature, String kvp, Stri ified, Int64 media_id, String api_type, Progre

Hi, whenever I try to download the video I paid for in Messages, I get this error: Exception caught: Object reference not set to an instance of an object. StackTrace: at OF_DL.Helpers.DownloadHelper.OnError(Object sender, ConversionErrorEventArgs e) at FFmpeg.NET.Engine.OnError(ConversionErrorEventArgs e) at FFmpeg.NET.FFmpegProcess.OnConversionError(ConversionErrorEventArgs eventArgs) at FFmpeg.NET.FFmpegProcess.OnException(List`1 messages, FFmpegParameters parameters, Int32 exitCode, Exception caughtException) at FFmpeg.NET.FFmpegProcess.ExecuteAsync(ProcessStartInfo startInfo, FFmpegParameters parameters, CancellationToken cancellationToken) at FFmpeg.NET.FFmpegProcess.ExecuteAsync(CancellationToken cancellationToken) at FFmpeg.NET.Engine.ExecuteAsync(FFmpegParameters parameters, CancellationToken cancellationToken) at FFmpeg.NET.Engine.ExecuteAsync(String arguments, CancellationToken cancellationToken) at OF_DL.Helpers.DownloadHelper.DownloadDrmMedia(String user_agent, String policy, String signature, String kvp, Stri ified, Int64 media_id, String api_type, Progre

Me too. with this error message I don't think it can download protected DRM videos. Can anyone clarify?

Me too. with this error message I don't think it can download protected DRM videos. Can anyone clarify?
Contributor

this PR should fix your problem: #82

this PR should fix your problem: https://git.ofdl.tools/sim0n00ps/OF-DL/pulls/82
Collaborator

Me too. with this error message I don't think it can download protected DRM videos. Can anyone clarify?

To my knowledge, this error may sometimes result in it failing to download some content, but that doesn't mean all DRM content will fail. However, it also only happens if you are not using your own CDM keys as far as I understand things, and we have always recommended using keys. Our web service that is used when keys are not present is a fallback only and you will experience more problems when not using keys. The above PR looks to help mitigate this with better retry logic, and we will look at implementing that PR, but our recommendation is still going to remain using keys. They are easily obtainable in our Discord, there is a bot that delivers unique keys.

> Me too. with this error message I don't think it can download protected DRM videos. Can anyone clarify? To my knowledge, this error may sometimes result in it failing to download some content, but that doesn't mean all DRM content will fail. However, it also only happens if you are not using your own CDM keys as far as I understand things, and we have always recommended using keys. Our web service that is used when keys are not present is a fallback only and you will experience more problems when not using keys. The above PR looks to help mitigate this with better retry logic, and we will look at implementing that PR, but our recommendation is still going to remain using keys. They are easily obtainable in our Discord, there is a bot that delivers unique keys.
melithine added the
bug
label 2025-11-29 20:08:02 +00:00
melithine added the
code-submitted
label 2025-11-29 20:21:26 +00:00
sim0n00ps removed the
code-submitted
label 2025-12-01 23:29:00 +00:00
Owner

PR to potentially fix this has been released in V1.9.15, if you could try and report back

PR to potentially fix this has been released in V1.9.15, if you could try and report back

I just thought I'd mention that I was getting this same error message regardless of whether I used my own CDM keys generated from Discord or cdrm-project. In my case, VPN (nordvpn) seems to be the culprit. When I disconnected, everything worked fine again and for whatever reason, it only affected downloading DRM protected videos.

I just thought I'd mention that I was getting this same error message regardless of whether I used my own CDM keys generated from Discord or cdrm-project. In my case, VPN (nordvpn) seems to be the culprit. When I disconnected, everything worked fine again and for whatever reason, it only affected downloading DRM protected videos.

I just thought I'd mention that I was getting this same error message regardless of whether I used my own CDM keys generated from Discord or cdrm-project. In my case, VPN (nordvpn) seems to be the culprit. When I disconnected, everything worked fine again and for whatever reason, it only affected downloading DRM protected videos.

I had the same issue, which was resolved by switching VPN providers. However, I then ran into a new problem: the downloaded DRM videos are incomplete, I downloaded 8 videos, and 2 of them are incomplete.

> I just thought I'd mention that I was getting this same error message regardless of whether I used my own CDM keys generated from Discord or cdrm-project. In my case, VPN (nordvpn) seems to be the culprit. When I disconnected, everything worked fine again and for whatever reason, it only affected downloading DRM protected videos. I had the same issue, which was resolved by switching VPN providers. However, I then ran into a new problem: the downloaded DRM videos are incomplete, I downloaded 8 videos, and 2 of them are incomplete.
Collaborator

I just thought I'd mention that I was getting this same error message regardless of whether I used my own CDM keys generated from Discord or cdrm-project. In my case, VPN (nordvpn) seems to be the culprit. When I disconnected, everything worked fine again and for whatever reason, it only affected downloading DRM protected videos.

I had the same issue, which was resolved by switching VPN providers. However, I then ran into a new problem: the downloaded DRM videos are incomplete, I downloaded 8 videos, and 2 of them are incomplete.

There's a separate issue for incomplete downloads, please see #77

> > I just thought I'd mention that I was getting this same error message regardless of whether I used my own CDM keys generated from Discord or cdrm-project. In my case, VPN (nordvpn) seems to be the culprit. When I disconnected, everything worked fine again and for whatever reason, it only affected downloading DRM protected videos. > > I had the same issue, which was resolved by switching VPN providers. However, I then ran into a new problem: the downloaded DRM videos are incomplete, I downloaded 8 videos, and 2 of them are incomplete. There's a separate issue for incomplete downloads, please see #77
Collaborator

The new 1.9.17 release has a partial fix attempt for this. It won't solve an error being thrown, but the error that had been displayed in prior releases was actually because there was a bug in how we were trying to output the actual error from ffmpeg. Please update and see what happens.

If you encounter the new ffmpeg error frequently after updating, switching to verbose logging will tell ffmpeg to write its own report log in the logs directory, and we need both of those files to analyze. Between the verbose OFDL log and the ffmpeg report log, we should hopefully be able to get a much clearer picture as to what exactly is going on here.

The new 1.9.17 release has a partial fix attempt for this. It won't solve an error being thrown, but the error that had been displayed in prior releases was actually because there was a bug in how we were trying to output the actual error from ffmpeg. Please update and see what happens. If you encounter the new ffmpeg error frequently after updating, switching to verbose logging will tell ffmpeg to write its own report log in the logs directory, and we need both of those files to analyze. Between the verbose OFDL log and the ffmpeg report log, we should hopefully be able to get a much clearer picture as to what exactly is going on here.
Sign in to join this conversation.
7 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sim0n00ps/OF-DL#78
No description provided.