Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetBytes() failing #255

Closed
NullNRG opened this issue Oct 26, 2022 · 10 comments
Closed

GetBytes() failing #255

NullNRG opened this issue Oct 26, 2022 · 10 comments
Assignees

Comments

@NullNRG
Copy link

NullNRG commented Oct 26, 2022

GetBytes failing with error.
with any video i try.
here is an example video
URI: Mu1vgxuWfC8

at Jurassic.Library.ArrayInstance.__STUB__ToString(Jurassic.ScriptEngine, System.Object, System.Object[]) at Jurassic.Library.ClrStubFunction.CallLateBound(System.Object, System.Object[]) at Jurassic.Library.ObjectInstance.TryCallMemberFunction(System.Object ByRef, System.Object, System.Object[]) at Jurassic.Library.ObjectInstance.GetPrimitiveValuePreES6(Jurassic.PrimitiveTypeHint) at Jurassic.Library.ObjectInstance.GetPrimitiveValue(Jurassic.PrimitiveTypeHint) at Jurassic.TypeConverter.ToPrimitive(System.Object, Jurassic.PrimitiveTypeHint) at Jurassic.TypeConverter.ToString(System.Object, System.String) at Jurassic.Library.ArrayAdapter1[[System.__Canon, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Join(System.String)
at Jurassic.Library.ArrayInstance.Join(Jurassic.Library.ObjectInstance, System.String)
at Jurassic.Library.ArrayInstance.__STUB__Join(Jurassic.ScriptEngine, System.Object, System.Object[])
at Jurassic.Library.ClrStubFunction.CallLateBound(System.Object, System.Object[])
at Jurassic.Library.ObjectInstance.TryCallMemberFunction(System.Object ByRef, System.Object, System.Object[])
at Jurassic.Library.ArrayAdapter1[[System.__Canon, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToString() at Jurassic.Library.ArrayInstance.ToString(Jurassic.Library.ObjectInstance) at Jurassic.Library.ArrayInstance.__STUB__ToString(Jurassic.ScriptEngine, System.Object, System.Object[]) at Jurassic.Library.ClrStubFunction.CallLateBound(System.Object, System.Object[]) at Jurassic.Library.ObjectInstance.TryCallMemberFunction(System.Object ByRef, System.Object, System.Object[]) at Jurassic.Library.ObjectInstance.GetPrimitiveValuePreES6(Jurassic.PrimitiveTypeHint) at Jurassic.Library.ObjectInstance.GetPrimitiveValue(Jurassic.PrimitiveTypeHint) at Jurassic.TypeConverter.ToPrimitive(System.Object, Jurassic.PrimitiveTypeHint) at Jurassic.TypeConverter.ToString(System.Object, System.String) at Jurassic.Library.ArrayAdapter1[[System.__Canon, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral,
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=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Security.SslStream+d__1811[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]], System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext(System.Threading.Thread) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Int32, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Security.SslStream+<ReadAsyncInternal>d__1811[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]], System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
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=5.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=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetExistingTaskResult(System.Threading.Tasks.Task1<System.Threading.Tasks.VoidTaskResult>, System.Threading.Tasks.VoidTaskResult) at System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder.SetResult() at System.Net.Security.SslStream+<FillBufferAsync>d__1831[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Security.SslStream+d__1831[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]], System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].ExecutionContextCallback(System.Object) 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=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Security.SslStream+<FillBufferAsync>d__1831[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]], System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext(System.Threading.Thread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Net.Security.SslStream+d__1831[[System.Net.Security.AsyncReadWriteAdapter, System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]], System.Net.Security, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext() at System.Threading.ThreadPool+<>c.<.cctor>b__60_0(System.Object) at System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.InvokeContinuation(System.Action1<System.Object>, 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*)
`

@NullNRG
Copy link
Author

NullNRG commented Oct 26, 2022

i should mention the exact same code was working the day prior. now is failing

@hondek
Copy link
Contributor

hondek commented Oct 26, 2022

Yep, its my fault, just merge my last pull request and will be fine everything.

@omansak
Copy link
Owner

omansak commented Oct 26, 2022

i merged can you test now ?

@hondek
Copy link
Contributor

hondek commented Oct 26, 2022

Hi,

Tested but it wasnt problem...

But i know what is problem this time:

Sometime in descramble function youtube developers put Dates instead of Numbers and then JavaScript Engine (Jurassic) cant correct fire javascript descramble function.

In my desktop app i using WebView, and executing descramble function in webview and it working correct.

But i dont know it is possible to use WebView in this project.

Problem is at: YoutubeVideo.Descramble.cs
Line: 29
var sign = engine.CallGlobalFunction<string>(descrambleFunction.Item1, signature);

This line crash script, coz of this Dates instead of Numbers in javascript like this:

c[new Date("01 January 1970 00:00:57 GMT")/1E3],c[14],c[9]),c[40])((0,c[40])((0,c[4])(c[4830+Math.pow(1,new Date("01 January 1970 07:45:03 +0745")/1E3)

@hondek
Copy link
Contributor

hondek commented Oct 27, 2022

Problem is Jurassic Engine throw StackOverflowException so we cant catch it :(

@hondek
Copy link
Contributor

hondek commented Oct 28, 2022

Hi guys,

today descramble function for this video was changed and parsing by Jurassic normally.

But i think youtube randomly testing this option.

If you will get this errror again please save somewhere string with javascript code - we will be able to test it from a file.

@NullNRG
Copy link
Author

NullNRG commented Oct 28, 2022

Hi guys,

today descramble function for this video was changed and parsing by Jurassic normally.

But i think youtube randomly testing this option.

If you will get this errror again please save somewhere string with javascript code - we will be able to test it from a file.

Hi, thank you for all the work looking into this issue. I haven't yet been able to test anything here as I have been away. But glad to see it is working as normal again for now.

@gliderman
Copy link

Howdy, I'm encountering this issue on every video URL I try to pass. Doesn't seem to matter if it's new or old, different channels, etc. Any URI I try to access is tripping that stack overflow error. I saw you need the Javascript code that's returned from YouTube, how would I go about obtaining this for debugging?

@hondek hondek mentioned this issue Nov 5, 2022
@Hummingbirdy
Copy link

I'm also still having this issue. Using code and a YouTube link that worked fine two weeks ago. Is their a workaround?

@omansak
Copy link
Owner

omansak commented Dec 28, 2022

#270

@omansak omansak closed this as completed Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants