omansak / libvideo

A lightweight .NET library to download YouTube videos.
BSD 2-Clause "Simplified" License
538 stars 163 forks source link

YouTubeVideo throw error when use property Uri #260

Closed FedeC87p closed 1 year ago

FedeC87p commented 1 year ago

Hi,

From this morning, when i try to read the property Uri from class YouTubeVideo i have a lot of error (i think recorsive error):

Repeat 2389 times:

at Jurassic.Library.ObjectInstance.GetPrimitiveValue(Jurassic.PrimitiveTypeHint) at Jurassic.TypeConverter.ToString(System.Object, System.String) at Jurassic.Library.ArrayAdapter1[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Join(System.String) at Jurassic.Library.ClrStubFunction.CallLateBound(System.Object, System.Object[]) at Jurassic.Library.ArrayAdapter1[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToString() at Jurassic.Library.ClrStubFunction.CallLateBound(System.Object, System.Object[]) at Jurassic.Library.ObjectInstance.GetPrimitiveValuePreES6(Jurassic.PrimitiveTypeHint)

at Jurassic.Library.ObjectInstance.GetPrimitiveValue(Jurassic.PrimitiveTypeHint) at Jurassic.TypeConverter.ToString(System.Object, System.String) at Jurassic.JavaScriptException..ctor(System.Object, Int32, System.String, System.String) at DynamicClass.anonymous(Jurassic.Compiler.ExecutionContext, System.Object[]) at Jurassic.Library.UserDefinedFunction.CallLateBound(System.Object, System.Object[]) at Jurassic.Library.FunctionInstance.CallWithStackTrace(System.String, System.String, Int32, System.Object, System.Object[]) at DynamicClass.anonymous(Jurassic.Compiler.ExecutionContext, System.Object[]) at Jurassic.Library.UserDefinedFunction.CallLateBound(System.Object, System.Object[]) at Jurassic.ScriptEngine.CallGlobalFunction[[System.Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.String, System.Object[]) at VideoLibrary.YouTubeVideo.DescrambleNSignature(System.String, System.String) at VideoLibrary.YouTubeVideo+d36.MoveNext() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[VideoLibrary.YouTubeVideo+d36, libvideo, Version=3.2.2.0, Culture=neutral, PublicKeyToken=null]].MoveNext(System.Threading.Thread) at System.Runtime.CompilerServices.TaskAwaiter+<>c.b12_0(System.Action, System.Threading.Tasks.Task) at System.Runtime.CompilerServices.AsyncMethodBuilderCore+ContinuationWrapper.Invoke() at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean) at System.Threading.Tasks.Task.RunContinuations(System.Object) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task1[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TrySetResult(System.__Canon) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetExistingTaskResult(System.Threading.Tasks.Task`1<System.Canon>, System.Canon) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetResult(System.Canon) at System.Net.Http.HttpClient+d41.MoveNext() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Http.HttpClient+d41, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext(System.Threading.Thread) at System.Runtime.CompilerServices.TaskAwaiter+<>c.b__12_0(System.Action, System.Threading.Tasks.Task) at System.Runtime.CompilerServices.AsyncMethodBuilderCore+ContinuationWrapper.Invoke() at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean) at System.Threading.Tasks.Task.RunContinuations(System.Object) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TrySetResult(System.Threading.Tasks.VoidTaskResult) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetExistingTaskResult(System.Threading.Tasks.Task`1, System.Threading.Tasks.VoidTaskResult) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.SetResult() at System.Net.Http.HttpConnection+ContentLengthReadStream+d5.MoveNext() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Http.HttpConnection+ContentLengthReadStream+d5, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext(System.Threading.Thread) at System.Runtime.CompilerServices.TaskAwaiter+<>c.b12_0(System.Action, System.Threading.Tasks.Task) at System.Runtime.CompilerServices.AsyncMethodBuilderCore+ContinuationWrapper.Invoke() at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean) at System.Threading.Tasks.Task.RunContinuations(System.Object) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TrySetResult(System.Threading.Tasks.VoidTaskResult) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetExistingTaskResult(System.Threading.Tasks.Task1<System.Threading.Tasks.VoidTaskResult>, System.Threading.Tasks.VoidTaskResult) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.SetResult() at System.Net.Http.HttpConnection+<CopyToContentLengthAsync>d__112.MoveNext() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Http.HttpConnection+<CopyToContentLengthAsync>d__112, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext(System.Threading.Thread) at System.Runtime.CompilerServices.TaskAwaiter+<>c.<OutputWaitEtwEvents>b__12_0(System.Action, System.Threading.Tasks.Task) at System.Runtime.CompilerServices.AsyncMethodBuilderCore+ContinuationWrapper.Invoke() at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean) at System.Threading.Tasks.Task.RunContinuations(System.Object) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TrySetResult(System.Threading.Tasks.VoidTaskResult) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetExistingTaskResult(System.Threading.Tasks.Task1, System.Threading.Tasks.VoidTaskResult) at System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder.SetResult() at System.Net.Http.HttpConnection+d102.MoveNext() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Http.HttpConnection+d102, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext(System.Threading.Thread) at System.Runtime.CompilerServices.TaskAwaiter+<>c.b12_0(System.Action, System.Threading.Tasks.Task) at System.Runtime.CompilerServices.AsyncMethodBuilderCore+ContinuationWrapper.Invoke() at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean) at System.Threading.Tasks.Task.RunContinuations(System.Object) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TrySetResult(Int32) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetExistingTaskResult(System.Threading.Tasks.Task1<Int32>, Int32) at System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetResult(Int32) at System.Net.Security.SslStream+d1881[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Security.SslStream+d1881[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]], System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext(System.Threading.Thread) at System.Runtime.CompilerServices.TaskAwaiter+<>c.<OutputWaitEtwEvents>b__12_0(System.Action, System.Threading.Tasks.Task) at System.Runtime.CompilerServices.AsyncMethodBuilderCore+ContinuationWrapper.Invoke() at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action, Boolean) at System.Threading.Tasks.Task.RunContinuations(System.Object) at System.Threading.Tasks.Task.FinishContinuations() at System.Threading.Tasks.Task1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TrySetResult(Int32) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetExistingTaskResult(System.Threading.Tasks.Task1, Int32) at System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetResult(Int32) at System.Net.Security.SslStream+d1861[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Int32, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Security.SslStream+<EnsureFullTlsFrameAsync>d__1861[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]], System.Net.Security, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext(System.Threading.Thread) at System.Threading.ThreadPool+<>c.<.cctor>b__87_0(System.Object) at System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.InvokeContinuation(System.Action`1, System.Object, Boolean, Boolean) at System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.OnCompleted(System.Net.Sockets.SocketAsyncEventArgs) at System.Net.Sockets.SocketAsyncEventArgs.OnCompletedInternal() at System.Net.Sockets.SocketAsyncEventArgs+<>c.<.cctor>b__179_0(UInt32, UInt32, System.Threading.NativeOverlapped) at System.Threading.ThreadPoolBoundHandleOverlapped.CompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)

hondek commented 1 year ago

Same issue as #255

Please provide youtube id to reproduce

FedeC87p commented 1 year ago

https://youtu.be/805SMR0uEi0

Thanks

tmm360 commented 1 year ago

I've solved replacing Jurassic library with https://github.com/sebastienros/jint

citycom-software commented 1 year ago

I've solved replacing Jurassic library with https://github.com/sebastienros/jint

Can you provide your package to download? I have the same error since 2 days: "VideoDownloader.exe" (CoreCLR: clrhost): "D:\VS\WPF\VideoDownloader\VideoDownloader\bin\Debug\net6.0-windows\win-x64\Jurassic.dll" geladen. Ausnahme ausgelöst: "Jurassic.JavaScriptException" in Jurassic.dll Das Programm "[11400] VideoDownloader.exe" wurde mit Code 3221225477 (0xc0000005) 'Access violation' beendet.

tmm360 commented 1 year ago

@citycom-software sorry I didn't published. You can build by yourself with the PR

citycom-software commented 1 year ago

@citycom-software sorry I didn't published. You can build by yourself with the PR

Thanks for your reply! I'm a newbee and didn't create a nuget-package by myself and I don't know, what you mean with PR

omansak commented 1 year ago

270