Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question 404 Script could not be found

Discussion in 'Cloud Code' started by Verenvast, Apr 7, 2022.

  1. Verenvast

    Verenvast

    Joined:
    Apr 7, 2022
    Posts:
    2
    I want to run LootBoxSamples on my account and I don't know why I got error 404.
    I added currencies and the script to my dashboard.

    Code (Boo):
    1. HTTP/1.1 404 Not Found
    2. Error
    3. Script could not be found
    4.  
    5. 0x00007ff7ba42ec7d (Unity) StackWalker::GetCurrentCallstack
    6. 0x00007ff7ba4359f9 (Unity) StackWalker::ShowCallstack
    7. 0x00007ff7bb3d6223 (Unity) GetStacktrace
    8. 0x00007ff7bba7c293 (Unity) DebugStringToFile
    9. 0x00007ff7b94843a6 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    10. 0x0000027fcafd8653 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    11. 0x0000027fcafd856b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    12. 0x000002808c0caf60 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    13. 0x000002808c0f9005 (Mono JIT Code) UnityEngine.Debug:LogError (object)
    14. 0x000002808c12db33 (Mono JIT Code) [CloudCode.cs:105] Unity.Services.CloudCode.CloudCode/<GetRunScriptResponse>d__7:MoveNext ()
    15. 0x0000027fcafd9cd2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
    16. 0x0000027ef98e4cae (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    17. 0x0000027ef98e49bb (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    18. 0x0000027fcafd9b8b (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
    19. 0x000002808c09272a (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction (object)
    20. 0x0000027fcafb45f5 (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&)
    21. 0x0000027fcafb3d63 (Mono JIT Code) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run (System.Threading.Tasks.Task,bool)
    22. 0x0000027ef99142c3 (Mono JIT Code) System.Threading.Tasks.Task:FinishContinuations ()
    23. 0x0000027ef9913b23 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageThree ()
    24. 0x0000027ef99132f3 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageTwo ()
    25. 0x0000027ef9911ddb (Mono JIT Code) System.Threading.Tasks.Task:Finish (bool)
    26. 0x000002808c0f714b (Mono JIT Code) System.Threading.Tasks.Task:TrySetException (object)
    27. 0x000002808c0f6fab (Mono JIT Code) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<TResult_REF>:SetException (System.Exception)
    28. 0x000002808c12e6d3 (Mono JIT Code) [CloudCode.cs:50] Unity.Services.CloudCode.CloudCode/<GetResponseAsync>d__4:MoveNext ()
    29. 0x0000027fcafd9cd2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
    30. 0x0000027ef98e4cae (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    31. 0x0000027ef98e49bb (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    32. 0x0000027fcafd9b8b (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
    33. 0x000002808c09272a (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction (object)
    34. 0x0000027fcafb45f5 (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&)
    35. 0x0000027fcafb3d63 (Mono JIT Code) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run (System.Threading.Tasks.Task,bool)
    36. 0x0000027ef99142c3 (Mono JIT Code) System.Threading.Tasks.Task:FinishContinuations ()
    37. 0x0000027ef9913b23 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageThree ()
    38. 0x0000027ef99132f3 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageTwo ()
    39. 0x0000027ef9911ddb (Mono JIT Code) System.Threading.Tasks.Task:Finish (bool)
    40. 0x000002808c0f714b (Mono JIT Code) System.Threading.Tasks.Task:TrySetException (object)
    41. 0x000002808c0f6fab (Mono JIT Code) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<TResult_REF>:SetException (System.Exception)
    42. 0x000002808c12f473 (Mono JIT Code) [CloudCodeApi.cs:73] Unity.GameBackend.CloudCode.Apis.CloudCode.CloudCodeApiClient/<RunScriptAsync>d__6:MoveNext ()
    43. 0x0000027fcafd9cd2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
    44. 0x0000027ef98e4cae (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    45. 0x0000027ef98e49bb (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    46. 0x0000027fcafd9b8b (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
    47. 0x000002808c09272a (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction (object)
    48. 0x0000027fcafb45f5 (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&)
    49. 0x0000027fcafb3d63 (Mono JIT Code) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run (System.Threading.Tasks.Task,bool)
    50. 0x0000027ef99142c3 (Mono JIT Code) System.Threading.Tasks.Task:FinishContinuations ()
    51. 0x0000027ef9913b23 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageThree ()
    52. 0x0000027fcafd9593 (Mono JIT Code) System.Threading.Tasks.Task`1<TResult_REF>:TrySetResult (TResult_REF)
    53. 0x0000027fcaf83853 (Mono JIT Code) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<TResult_REF>:SetResult (TResult_REF)
    54. 0x000002808c13379b (Mono JIT Code) [HttpClient.cs:33] Unity.GameBackend.CloudCode.Http.HttpClient/<MakeRequestAsync>d__3:MoveNext ()
    55. 0x0000027fcafd9cd2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
    56. 0x0000027ef98e4cae (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    57. 0x0000027ef98e49bb (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    58. 0x0000027fcafd9b8b (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
    59. 0x000002808c09272a (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction (object)
    60. 0x0000027fcafb45f5 (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&)
    61. 0x0000027fcafb3d63 (Mono JIT Code) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run (System.Threading.Tasks.Task,bool)
    62. 0x0000027ef99142c3 (Mono JIT Code) System.Threading.Tasks.Task:FinishContinuations ()
    63. 0x0000027ef9913b23 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageThree ()
    64. 0x0000027fcafd9593 (Mono JIT Code) System.Threading.Tasks.Task`1<TResult_REF>:TrySetResult (TResult_REF)
    65. 0x0000027fcaf83853 (Mono JIT Code) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<TResult_REF>:SetResult (TResult_REF)
    66. 0x000002808c134093 (Mono JIT Code) [HttpClient.cs:123] Unity.GameBackend.CloudCode.Http.HttpClient/<CreateWebRequestAsync>d__7:MoveNext ()
    67. 0x0000027fcafd9cd2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
    68. 0x0000027ef98e4cae (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    69. 0x0000027ef98e49bb (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    70. 0x0000027fcafd9b8b (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
    71. 0x000002808c09272a (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction (object)
    72. 0x0000027fcafb45f5 (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&)
    73. 0x0000027fcafb3d63 (Mono JIT Code) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run (System.Threading.Tasks.Task,bool)
    74. 0x0000027ef99142c3 (Mono JIT Code) System.Threading.Tasks.Task:FinishContinuations ()
    75. 0x0000027ef9913b23 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageThree ()
    76. 0x0000027fcafd9593 (Mono JIT Code) System.Threading.Tasks.Task`1<TResult_REF>:TrySetResult (TResult_REF)
    77. 0x0000027fcaf83853 (Mono JIT Code) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<TResult_REF>:SetResult (TResult_REF)
    78. 0x000002808c136413 (Mono JIT Code) [HttpClient.cs:120] Unity.GameBackend.CloudCode.Http.HttpClient/<>c__DisplayClass7_0/<<CreateWebRequestAsync>b__0>d:MoveNext ()
    79. 0x0000027fcafd9cd2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
    80. 0x0000027ef98e4cae (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    81. 0x0000027ef98e49bb (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
    82. 0x0000027fcafd9b8b (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
    83. 0x000002808c09272a (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction (object)
    84. 0x0000027fcafb45f5 (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&)
    85. 0x0000027fcafb3d63 (Mono JIT Code) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run (System.Threading.Tasks.Task,bool)
    86. 0x0000027ef99142c3 (Mono JIT Code) System.Threading.Tasks.Task:FinishContinuations ()
    87. 0x0000027ef9913b23 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageThree ()
    88. 0x0000027fcafd9593 (Mono JIT Code) System.Threading.Tasks.Task`1<TResult_REF>:TrySetResult (TResult_REF)
    89. 0x0000027fcafd9413 (Mono JIT Code) System.Threading.Tasks.TaskCompletionSource`1<TResult_REF>:TrySetResult (TResult_REF)
    90. 0x000002808c0b3043 (Mono JIT Code) System.Threading.Tasks.TaskCompletionSource`1<TResult_REF>:SetResult (TResult_REF)
    91. 0x000002808c136be3 (Mono JIT Code) [UnityWebRequestHelpers.cs:17] Unity.GameBackend.CloudCode.Http.UnityWebRequestHelpers/<>c__DisplayClass0_0:<GetAwaiter>b__0 (UnityEngine.AsyncOperation)
    92. 0x0000028025f0d45b (Mono JIT Code) UnityEngine.AsyncOperation:InvokeCompletionEvent ()
    93. 0x000002808c1dddf8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    94. 0x00007ffc0984e574 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    95. 0x00007ffc0978eb14 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    96. 0x00007ffc0978ecac (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    97. 0x00007ff7ba353944 (Unity) scripting_method_invoke
    98. 0x00007ff7ba34e444 (Unity) ScriptingInvocation::Invoke
    99. 0x00007ff7b9fed19b (Unity) AsyncOperation::InvokeCoroutine
    100. 0x00007ff7ba8c592c (Unity) UnityWebRequestAsyncOperation::InvokeCoroutine
    101. 0x00007ff7ba8c5b11 (Unity) UnityWebRequestProto<UnityWebRequestTransport,AtomicRefCounter,RedirectHelper,ResponseHelper,DownloadHandler,UploadHandler,CertificateHandler,HeaderHelper,AsyncOperation>::Job_InvokeCoroutine
    102. 0x00007ff7b9fa6cfa (Unity) BackgroundJobQueue::ExecuteMainThreadJobs
    103. 0x00007ff7ba0195fc (Unity) `InitPlayerLoopCallbacks'::`2'::EarlyUpdateExecuteMainThreadJobsRegistrator::Forward
    104. 0x00007ff7ba00159c (Unity) ExecutePlayerLoop
    105. 0x00007ff7ba001673 (Unity) ExecutePlayerLoop
    106. 0x00007ff7ba007400 (Unity) PlayerLoop
    107. 0x00007ff7baf7786a (Unity) PlayerLoopController::UpdateScene
    108. 0x00007ff7baf75ae2 (Unity) Application::TickTimer
    109. 0x00007ff7bb3dbe7a (Unity) MainMessageLoop
    110. 0x00007ff7bb3e0c64 (Unity) WinMain
    111. 0x00007ff7bc72c17e (Unity) __scrt_common_main_seh
    112. 0x00007ffc80a37034 (KERNEL32) BaseThreadInitThunk
    113. 0x00007ffc821a2651 (ntdll) RtlUserThreadStart
    114.  
     
  2. Unity_AndyP

    Unity_AndyP

    Unity Technologies

    Joined:
    Jun 23, 2021
    Posts:
    65
    Hi Verenvast,

    Would you be able to make sure the script name in Cloud Code matches the one you have entered into your script? Typically, a 404 is the result of passing in a script name that doesn't exist in the cloud space.
     
  3. Deleted User

    Deleted User

    Guest

    Hello,
    I'm testing Cloud Code and I have the same error (404).
    I used the default cloud code script (RollDice) and in my unity editor I have this call:

    var response = await CloudCodeService.Instance.CallEndpointAsync<ResultType>("RollDice", null);


    I'm using anonymous authentication.
    Does anyone know what the problem is?
     
  4. Gabrieldrc25

    Gabrieldrc25

    Joined:
    Apr 20, 2022
    Posts:
    1
    I was looking for an answer here, because i had the same problem. I solved it. So if it's useful for someone, my problem was that the script didn't exist in the production environment, because I created it in "test" environment. So to make it work I found this:
    https://docs.unity.com/ugs-overview...#Accessing_environments_within_Unity_projects


    Code (CSharp):
    1. var options = new InitializationOptions();
    2.      
    3. options.SetEnvironmentName("dev"); // Change "dev" to the environment name
    4. await UnityServices.InitializeAsync(options);
    And it worked perfectly.
    Hope it's useful for somebody X)
     
    Evil-Otaku and Schiznitz3301 like this.
  5. Deleted User

    Deleted User

    Guest

    It was useful for me. Thanks :)