vrchat-community / creator-companion

The Entry Point for Making Things in VRChat
https://vrchat.com/home/download
57 stars 409 forks source link

[BUG] 'A task was canceled' during project creation #242

Open Faxmashine opened 1 year ago

Faxmashine commented 1 year ago

Some users are unable to create projects due to the following error.

Starting project creation...
Looking for Legacy Packages to Upgrade by Scanning Folders within com.vrchat.udonsharp
Failed creating project from template because: One or more errors occurred. (A task was canceled.)
Project creation failed, check the logs for more information

I am unable to reproduce the bug. We'd appreciate additional information from users experiencing the same issue.

Chanoler commented 1 year ago

I have been having this issue in the Creator Companion as well as the Package Resolver. I believe this issue is caused by the package download timing out. I am able to reproduce the issue by applying a bandwidth limit of 1 Mbps to the Creator Companion.

Other observations with the Creator Companion: -Issue persists through reinstalls -The error "A task was canceled." is logged 120 seconds after the previous entry -Bandwidth is being consumed (very slowly) the entire time between creating a project or clicking the add package button and the error occurring. -Asking a friend for a copy of their %appdata%\..\Local\VRChatCreatorCompanion\Repos\ folder and replacing mine with theirs resolves the issue.

Log with timestamps.

2023-08-13 01:35:44.804 -04:00 [INF] Starting project creation...
2023-08-13 01:35:47.097 -04:00 [INF] Looking for Legacy Packages to Upgrade by Scanning Folders within com.vrchat.udonsharp
2023-08-13 01:37:46.597 -04:00 [ERR] Failed creating Project from template because: One or more errors occurred. (A task was canceled.)
2023-08-13 01:37:46.782 -04:00 [INF] Project creation failed, check the logs for more information

In troubleshooting the Package Resolver: -The error occurs roughly 120 seconds after clicking "Resolve" -When resolving com.vrchat.worlds my client downloaded 34.01 MB of data, however com.vrchat.worlds-3.2.2.zip is 34.52 MB -The following error appears in the console:

TaskCanceledException: A task was canceled.
Rethrow as AggregateException: One or more errors occurred.
System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Threading.Tasks.Task.Wait () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
VRC.PackageManagement.Core.Types.UnityProject.AddVPMPackage (VRC.PackageManagement.Core.Types.Packages.IVRCPackage iPackage, System.Collections.Generic.IEnumerable`1[T] providers) (at <4cd9e36db63e4b189a494fb706c6d488>:0)
VRC.PackageManagement.Core.Types.UnityProject.UpdateVPMPackage (VRC.PackageManagement.Core.Types.Packages.IVRCPackage package) (at <4cd9e36db63e4b189a494fb706c6d488>:0)
VRC.PackageManagement.Resolver.ResolverWindow+<>c__DisplayClass16_0.<OnUpdatePackageClicked>b__0 () (at Packages/com.vrchat.core.vpm-resolver/Editor/Resolver/ResolverWindow.cs:286)
System.Threading.Tasks.Task.InnerInvoke () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Threading.Tasks.Task.Execute () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Runtime.CompilerServices.TaskAwaiter.GetResult () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
VRC.PackageManagement.Resolver.ResolverWindow+<OnUpdatePackageClicked>d__16.MoveNext () (at Packages/com.vrchat.core.vpm-resolver/Editor/Resolver/ResolverWindow.cs:286)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <7d87237cea3743d093e22c5b98f74fba>:0)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()

My internet is unfortunately poor enough that a throttle is not required to regularly produce the issue on my machine and as the packages have slowly gotten larger this issue has unfortunately caught up to me.

If there is any further information I can gather to assist feel free to ask.

Akeem29 commented 10 months ago

Was having this error during project creation from world template, but I'm unsure if it's the same error:

2023-11-16 22:26:44.653 +06:00 [INF] Starting project creation...
2023-11-16 22:26:44.694 +06:00 [INF] Looking for Legacy Packages to Upgrade by Scanning Folders within com.vrchat.base
2023-11-16 22:26:46.303 +06:00 [INF] Looking for Legacy Packages to Upgrade by Scanning Folders within com.vrchat.base
2023-11-16 22:26:46.318 +06:00 [INF] Resolved package com.vrchat.base ^3.3.x
2023-11-16 22:26:46.323 +06:00 [INF] Looking for Legacy Packages to Upgrade by Scanning Folders within com.vrchat.worlds
2023-11-16 22:28:26.336 +06:00 [ERR] Failed creating Project from template because: One or more errors occurred. (A task was canceled.)
2023-11-16 22:28:27.137 +06:00 [INF] Project creation failed, check the logs for more information

Creation of avatar project worked without issues. Version of creator companion is 2.1.6, OS is Windows 10 22H2