vrchat-community / creator-companion

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

[BUG] Unhandled exception when attempting to migrate LegacySDK3World to Unity 2022 #463

Open owlboy opened 2 months ago

owlboy commented 2 months ago

Describe the bug

There is a possible unhandled exception when attempting to migrate LegacySDK3World to Unity 2022.

Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at VRC.PackageManagement.CLI.Program.Migrate2019ProjectTo2022(String projectPath, Boolean inPlace) in /home/runner/work/vrc-package-manager/vrc-package-manager/core/vpm-cli/Projects.cs:line 123
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()

To Reproduce

  1. Have an old pre-Creator Companion project from Unity 2019.
  2. run vpm migrate 2022 on it.

Expected behavior

It seems I was warned properly. But the exception is unexpected.

Screenshots

324208522-fb4b295e-426e-482a-9d0e-07c21f767960

Related Product

VPM CLI

Product Version

0.1.24

OS

macOS / Linux

Additional context

No response

orels1 commented 2 months ago

Thanks for the report. It is odd that it throws an exception after correctly logging an error, we'll take a look.

owlboy commented 2 months ago

Similar issue with a project that is already on Unity 2022:

image