Search Unity

InvalidOperationException: StandardIn has not been redirected.

Discussion in 'Editor & General Support' started by travispettry, Jul 1, 2019.

  1. travispettry

    travispettry

    Joined:
    Jul 21, 2017
    Posts:
    25
    Hi All,

    I am getting the following exception in my unity project as soon as the editor opens.

    InvalidOperationException: StandardIn has not been redirected.
    System.Diagnostics.Process.get_StandardInput () (at <3845a180c26b4889bc2d47593a665814>:0)
    (wrapper remoting-invoke-with-check) System.Diagnostics.Process.get_StandardInput()
    GooglePlayServices.CommandLine.RunViaShell (System.String toolPath, System.String arguments, System.String workingDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] envVars, GooglePlayServices.CommandLine+IOHandler ioHandler, System.Boolean useShellExecution, System.Boolean stdoutRedirectionInShellMode) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLine.cs:604)
    GooglePlayServices.CommandLine.Run (System.String toolPath, System.String arguments, System.String workingDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] envVars, GooglePlayServices.CommandLine+IOHandler ioHandler) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLine.cs:510)
    GooglePlayServices.CommandLine+<RunAsync>c__AnonStorey1.<>m__0 () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLine.cs:134)
    System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    System.Threading.ThreadHelper.ThreadStart () (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    UnityEngine.UnhandledExceptionHandler:<RegisterUECatcher>m__0(Object, UnhandledExceptionEventArgs)

    This exception first started to occur after a series of events. The original goal that I was trying to achieve was enabling push notifications with Firebase Cloud Messaging (FCM). After I installed the FirebaseMessaging unity package I could not resolve cretin jar files for my Android build. After doing some research I found a unity GitHub page that led me to installing play-services-resolver-1.2.121.0 unity package. That fixed the resolving of the jars, but then I was getting a dex issue on build. Long story short I ended up backing out all of my changes and I started to get the above exception.

    I have tried getting a new version of my project from Unity Cloud Code, that didn't help. I upgraded to Unity 2018.4.X from 2018.3.X also didn't help.

    I cannot build or run my game in the Unity editor. On start up unity tries to resolve Android dependencies but never makes any progress. A console window pops up but doesn't seem to do anything. I have put over 2000 hours into my game in the last year and I would hate to lose it now. If anyone has any clues to what might help I would be grateful.

    Thank you,
    Travis
     
  2. travispettry

    travispettry

    Joined:
    Jul 21, 2017
    Posts:
    25
    I have found the solution. After digging some more on the internet I was led to a page completely in Russian, after I used google translate someone suggested remove all punctuation from the unity folder name. Low and behold this was the solution. I had an apostrophe in the names of one of the folders. After it was removed the project worked again.
     
  3. EMPD

    EMPD

    Joined:
    Sep 5, 2019
    Posts:
    2
    Thanks...
     
    fz097098 likes this.
  4. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    323
    You saved me! Thanks!
     
    fz097098 likes this.
  5. TitanBornStudios

    TitanBornStudios

    Joined:
    Nov 4, 2019
    Posts:
    4
    Very helpful Thanks.
     
  6. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    Legend
     
    maxhtuan likes this.
  7. Shahid0090

    Shahid0090

    Joined:
    Feb 11, 2018
    Posts:
    1
    hi man
    please can you you explain it how you actually do it. i am not able to solve it . thanks in advance
     
  8. ThatoMogale

    ThatoMogale

    Joined:
    Feb 5, 2018
    Posts:
    4
    By Unity folder, do you mean the assets folder?
     
  9. ElALeKs

    ElALeKs

    Joined:
    Jul 11, 2020
    Posts:
    2
    OMG, Thanks Man!
     
  10. KillitsGaming

    KillitsGaming

    Joined:
    Aug 24, 2014
    Posts:
    28
    Hi by Unity folder, do you mean the Unity project folder or in the Unity install folder? thanks
     
  11. KillitsGaming

    KillitsGaming

    Joined:
    Aug 24, 2014
    Posts:
    28
    Hi, I had my Unity project folder in my All-Repository's folder. so I change it to All-Repositorys and now it's working just fine for me.