404 Script could not be found

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.

HTTP/1.1 404 Not Found
Error
Script could not be found

0x00007ff7ba42ec7d (Unity) StackWalker::GetCurrentCallstack
0x00007ff7ba4359f9 (Unity) StackWalker::ShowCallstack
0x00007ff7bb3d6223 (Unity) GetStacktrace
0x00007ff7bba7c293 (Unity) DebugStringToFile
0x00007ff7b94843a6 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x0000027fcafd8653 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x0000027fcafd856b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x000002808c0caf60 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x000002808c0f9005 (Mono JIT Code) UnityEngine.Debug:LogError (object)
0x000002808c12db33 (Mono JIT Code) [CloudCode.cs:105] Unity.Services.CloudCode.CloudCode/<GetRunScriptResponse>d__7:MoveNext ()
0x0000027fcafd9cd2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
0x0000027ef98e4cae (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x0000027ef98e49bb (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x0000027fcafd9b8b (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
0x000002808c09272a (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction (object)
0x0000027fcafb45f5 (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&)
0x0000027fcafb3d63 (Mono JIT Code) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run (System.Threading.Tasks.Task,bool)
0x0000027ef99142c3 (Mono JIT Code) System.Threading.Tasks.Task:FinishContinuations ()
0x0000027ef9913b23 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageThree ()
0x0000027ef99132f3 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageTwo ()
0x0000027ef9911ddb (Mono JIT Code) System.Threading.Tasks.Task:Finish (bool)
0x000002808c0f714b (Mono JIT Code) System.Threading.Tasks.Task:TrySetException (object)
0x000002808c0f6fab (Mono JIT Code) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<TResult_REF>:SetException (System.Exception)
0x000002808c12e6d3 (Mono JIT Code) [CloudCode.cs:50] Unity.Services.CloudCode.CloudCode/<GetResponseAsync>d__4:MoveNext ()
0x0000027fcafd9cd2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
0x0000027ef98e4cae (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x0000027ef98e49bb (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x0000027fcafd9b8b (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
0x000002808c09272a (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction (object)
0x0000027fcafb45f5 (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&)
0x0000027fcafb3d63 (Mono JIT Code) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run (System.Threading.Tasks.Task,bool)
0x0000027ef99142c3 (Mono JIT Code) System.Threading.Tasks.Task:FinishContinuations ()
0x0000027ef9913b23 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageThree ()
0x0000027ef99132f3 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageTwo ()
0x0000027ef9911ddb (Mono JIT Code) System.Threading.Tasks.Task:Finish (bool)
0x000002808c0f714b (Mono JIT Code) System.Threading.Tasks.Task:TrySetException (object)
0x000002808c0f6fab (Mono JIT Code) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<TResult_REF>:SetException (System.Exception)
0x000002808c12f473 (Mono JIT Code) [CloudCodeApi.cs:73] Unity.GameBackend.CloudCode.Apis.CloudCode.CloudCodeApiClient/<RunScriptAsync>d__6:MoveNext ()
0x0000027fcafd9cd2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
0x0000027ef98e4cae (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x0000027ef98e49bb (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x0000027fcafd9b8b (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
0x000002808c09272a (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction (object)
0x0000027fcafb45f5 (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&)
0x0000027fcafb3d63 (Mono JIT Code) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run (System.Threading.Tasks.Task,bool)
0x0000027ef99142c3 (Mono JIT Code) System.Threading.Tasks.Task:FinishContinuations ()
0x0000027ef9913b23 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageThree ()
0x0000027fcafd9593 (Mono JIT Code) System.Threading.Tasks.Task`1<TResult_REF>:TrySetResult (TResult_REF)
0x0000027fcaf83853 (Mono JIT Code) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<TResult_REF>:SetResult (TResult_REF)
0x000002808c13379b (Mono JIT Code) [HttpClient.cs:33] Unity.GameBackend.CloudCode.Http.HttpClient/<MakeRequestAsync>d__3:MoveNext ()
0x0000027fcafd9cd2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
0x0000027ef98e4cae (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x0000027ef98e49bb (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x0000027fcafd9b8b (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
0x000002808c09272a (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction (object)
0x0000027fcafb45f5 (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&)
0x0000027fcafb3d63 (Mono JIT Code) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run (System.Threading.Tasks.Task,bool)
0x0000027ef99142c3 (Mono JIT Code) System.Threading.Tasks.Task:FinishContinuations ()
0x0000027ef9913b23 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageThree ()
0x0000027fcafd9593 (Mono JIT Code) System.Threading.Tasks.Task`1<TResult_REF>:TrySetResult (TResult_REF)
0x0000027fcaf83853 (Mono JIT Code) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<TResult_REF>:SetResult (TResult_REF)
0x000002808c134093 (Mono JIT Code) [HttpClient.cs:123] Unity.GameBackend.CloudCode.Http.HttpClient/<CreateWebRequestAsync>d__7:MoveNext ()
0x0000027fcafd9cd2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
0x0000027ef98e4cae (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x0000027ef98e49bb (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x0000027fcafd9b8b (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
0x000002808c09272a (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction (object)
0x0000027fcafb45f5 (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&)
0x0000027fcafb3d63 (Mono JIT Code) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run (System.Threading.Tasks.Task,bool)
0x0000027ef99142c3 (Mono JIT Code) System.Threading.Tasks.Task:FinishContinuations ()
0x0000027ef9913b23 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageThree ()
0x0000027fcafd9593 (Mono JIT Code) System.Threading.Tasks.Task`1<TResult_REF>:TrySetResult (TResult_REF)
0x0000027fcaf83853 (Mono JIT Code) System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<TResult_REF>:SetResult (TResult_REF)
0x000002808c136413 (Mono JIT Code) [HttpClient.cs:120] Unity.GameBackend.CloudCode.Http.HttpClient/<>c__DisplayClass7_0/<<CreateWebRequestAsync>b__0>d:MoveNext ()
0x0000027fcafd9cd2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:InvokeMoveNext (object)
0x0000027ef98e4cae (Mono JIT Code) System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x0000027ef98e49bb (Mono JIT Code) System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
0x0000027fcafd9b8b (Mono JIT Code) System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
0x000002808c09272a (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:InvokeAction (object)
0x0000027fcafb45f5 (Mono JIT Code) System.Threading.Tasks.AwaitTaskContinuation:RunCallback (System.Threading.ContextCallback,object,System.Threading.Tasks.Task&)
0x0000027fcafb3d63 (Mono JIT Code) System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run (System.Threading.Tasks.Task,bool)
0x0000027ef99142c3 (Mono JIT Code) System.Threading.Tasks.Task:FinishContinuations ()
0x0000027ef9913b23 (Mono JIT Code) System.Threading.Tasks.Task:FinishStageThree ()
0x0000027fcafd9593 (Mono JIT Code) System.Threading.Tasks.Task`1<TResult_REF>:TrySetResult (TResult_REF)
0x0000027fcafd9413 (Mono JIT Code) System.Threading.Tasks.TaskCompletionSource`1<TResult_REF>:TrySetResult (TResult_REF)
0x000002808c0b3043 (Mono JIT Code) System.Threading.Tasks.TaskCompletionSource`1<TResult_REF>:SetResult (TResult_REF)
0x000002808c136be3 (Mono JIT Code) [UnityWebRequestHelpers.cs:17] Unity.GameBackend.CloudCode.Http.UnityWebRequestHelpers/<>c__DisplayClass0_0:<GetAwaiter>b__0 (UnityEngine.AsyncOperation)
0x0000028025f0d45b (Mono JIT Code) UnityEngine.AsyncOperation:InvokeCompletionEvent ()
0x000002808c1dddf8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffc0984e574 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007ffc0978eb14 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
0x00007ffc0978ecac (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
0x00007ff7ba353944 (Unity) scripting_method_invoke
0x00007ff7ba34e444 (Unity) ScriptingInvocation::Invoke
0x00007ff7b9fed19b (Unity) AsyncOperation::InvokeCoroutine
0x00007ff7ba8c592c (Unity) UnityWebRequestAsyncOperation::InvokeCoroutine
0x00007ff7ba8c5b11 (Unity) UnityWebRequestProto<UnityWebRequestTransport,AtomicRefCounter,RedirectHelper,ResponseHelper,DownloadHandler,UploadHandler,CertificateHandler,HeaderHelper,AsyncOperation>::Job_InvokeCoroutine
0x00007ff7b9fa6cfa (Unity) BackgroundJobQueue::ExecuteMainThreadJobs
0x00007ff7ba0195fc (Unity) `InitPlayerLoopCallbacks'::`2'::EarlyUpdateExecuteMainThreadJobsRegistrator::Forward
0x00007ff7ba00159c (Unity) ExecutePlayerLoop
0x00007ff7ba001673 (Unity) ExecutePlayerLoop
0x00007ff7ba007400 (Unity) PlayerLoop
0x00007ff7baf7786a (Unity) PlayerLoopController::UpdateScene
0x00007ff7baf75ae2 (Unity) Application::TickTimer
0x00007ff7bb3dbe7a (Unity) MainMessageLoop
0x00007ff7bb3e0c64 (Unity) WinMain
0x00007ff7bc72c17e (Unity) __scrt_common_main_seh
0x00007ffc80a37034 (KERNEL32) BaseThreadInitThunk
0x00007ffc821a2651 (ntdll) RtlUserThreadStart

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.

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?

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/manual/ServiceEnvironments?_ga=2.178881708.966259947.1674243265-1104416396.1671736295#Accessing_environments_within_Unity_projects

var options = new InitializationOptions();

options.SetEnvironmentName("dev"); // Change "dev" to the environment name
await UnityServices.InitializeAsync(options);

And it worked perfectly.
Hope it's useful for somebody X)

3 Likes

It was useful for me. Thanks :)