question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't start process on IL2CPP

See original GitHub issue

youtube player is does not working. giving me this error

Win32Exception: ApplicationName=‘/var/folders/df/xbvq1ggn2ts0v0g3_bgn8gd40000gn/T/…/…/youtube-dl.exe’, CommandLine=‘–dump-single-json -f “best” “https://www.youtube.com/watch?v=RcHJTZTrZGI​”’, CurrentDirectory=‘’, Native error= mono-io-layer-error (5) System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at <b5226d7672da4aeaa36d32bf1166a63b>:0) System.Diagnostics.Process.Start () (at <b5226d7672da4aeaa36d32bf1166a63b>:0) (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start() YoutubePlayer.LocalYoutubeDl.ReadProcessOutputAsync (System.String filename, System.String arguments, System.Threading.CancellationToken cancellationToken) (at Packages/com.ibicha.youtube-player/Runtime/YoutubeDl/LocalYoutubeDl.cs:104) — End of stack trace from previous location where exception was thrown — System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at <695d1cc93cca45069c528c15c9fdd749>:0) YoutubePlayer.LocalYoutubeDl+<GetVideoMetaDataAsync>d__11[T].MoveNext () (at Packages/com.ibicha.youtube-player/Runtime/YoutubeDl/LocalYoutubeDl.cs:34) — End of stack trace from previous location where exception was thrown — System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at <695d1cc93cca45069c528c15c9fdd749>:0) YoutubePlayer.YoutubeDl+<GetVideoMetaDataAsync>d__131[T].MoveNext () (at Packages/com.ibicha.youtube-player/Runtime/YoutubeDl/YoutubeDl.cs:51) — End of stack trace from previous location where exception was thrown — System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at <695d1cc93cca45069c528c15c9fdd749>:0) YoutubePlayer.YoutubePlayer+<GetRawVideoUrlAsync>d__14.MoveNext () (at Packages/com.ibicha.youtube-player/Runtime/YoutubePlayer.cs:64) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at <695d1cc93cca45069c528c15c9fdd749>:0) YoutubePlayer.YoutubePlayer+<PrepareVideoAsync>d__15.MoveNext () (at Packages/com.ibicha.youtube-player/Runtime/YoutubePlayer.cs:80) — End of stack trace from previous location where exception was thrown — System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.TaskAwaiter.GetResult () (at <695d1cc93cca45069c528c15c9fdd749>:0) YoutubePlayer.PrepareYoutubeVideo+<Prepare>d__2.MoveNext () (at Assets/YoutubePlayer/Scripts/PrepareYoutubeVideo.cs:17) — End of stack trace from previous location where exception was thrown — System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) (at <695d1cc93cca45069c528c15c9fdd749>:0) UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153) UnityEngine.UnitySynchronizationContext:ExecuteTasks() (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
iBichacommented, Nov 10, 2022

Unfortunately, it seems like an IL2CPP build cannot start a process. https://forum.unity.com/threads/win32-il2cpp-process-start-not-work.539258/ The options are to use a Mono backend, or to set YoutubeDl.UseLocalInstance to false on IL2CPP.

I will make YoutubeDl.UseLocalInstance be set to false by default on IL2CPP in a future release.

0reactions
Gama-Techcommented, Nov 11, 2022

Thanks for the follow up, setting YoutubeDl.UseLocalInstance to false is a viable work around for me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Solved] IL2CPP and Process.Start
Is Process.Start supposed to work with IL2CPP windows standalone 64bit? Using it right now crashes the application hard.
Read more >
[IL2CPP] System.Diagnostics.Process.Start() fails to launch ...
Build Standalone player on IL2CPP backend 3. Launch build player. Expected results: System.Diagnostics.Process.Start() launches process.
Read more >
Il2cpp Process alternative : r/Unity3D
Hi There, I am looking to try and find a way to check if a process is running on a build that is...
Read more >
android - Build - il2cpp did not run properly
I downloaded NDK r16b from Google but found it was very different from Unity Hub. Because many files and folders were missing. Also,...
Read more >
Troubleshooting and known issues (VS Tools for Unity)
Read about troubleshooting in Visual Studio Tools for Unity. See descriptions of known issues, and learn about solutions to those issues.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found