bbepis / XUnity.AutoTranslator

MIT License
1.98k stars 292 forks source link

System.ArgumentNullException: Value cannot be null. (Parameter 'path') during plugin initialization on il2cpp game #578

Open takaqiao opened 2 months ago

takaqiao commented 2 months ago

[Error :XUnity.AutoTranslator] An unexpected error occurred during plugin initialization. System.ArgumentNullException: Value cannot be null. (Parameter 'path') at System.IO.Path.GetFullPath(String path) at System.IO.DirectoryInfo..ctor(String path) at XUnity.Common.Utilities.Paths.GetAndSetGameRoot() at XUnity.Common.Utilities.Paths.Initialize() at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Initialize() at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Awake()

Full Log:


[Message: Preloader] Built from commit 6b38cee1277f4e3da5f2f685aee8b503a14d4054
[Info   :   BepInEx] System platform: Windows 10 64-bit
[Info   :   BepInEx] Process bitness: 64-bit (x64)
[Info   :   BepInEx] Running under Unity 2023.2.6f1
[Info   :   BepInEx] Runtime version: 6.0.7
[Info   :   BepInEx] Runtime information: .NET 6.0.7
[Info   : Preloader] 0 patcher plugins loaded
[Info   : Preloader] 0 assemblies discovered
[Message:AssemblyPatcher] Executing 0 patch(es)
[Message:   BepInEx] Chainloader initialized
[Warning:Il2CppInterop] Class::Init signatures have been exhausted, using a substitute!
[Info   :Il2CppInterop] Registered mono type Il2CppInterop.Runtime.DelegateSupport+Il2CppToMonoDelegateReference in il2cpp domain
[Info   :   BepInEx] 2 plugins to load
[Info   :   BepInEx] Loading [XUnity Auto Translator 5.4.0]
[Info   :Il2CppInterop] Registered mono type XUnity.AutoTranslator.Plugin.Core.PluginLoader+AutoTranslatorProxyBehaviour in il2cpp domain
[Info   :   BepInEx] Loading [XUnity Resource Redirector 2.1.0]
[Message:   BepInEx] Chainloader startup complete
[Error  :XUnity.AutoTranslator] An unexpected error occurred during plugin initialization.
System.ArgumentNullException: Value cannot be null. (Parameter 'path')
   at System.IO.Path.GetFullPath(String path)
   at System.IO.DirectoryInfo..ctor(String path)
   at XUnity.Common.Utilities.Paths.GetAndSetGameRoot()
   at XUnity.Common.Utilities.Paths.Initialize()
   at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Initialize()
   at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Awake()
[Info   :Il2CppInterop] Registered mono type XUnity.AutoTranslator.Plugin.Core.Il2CppManagedEnumerator in il2cpp domain
[Error  :XUnity.AutoTranslator] An error occurred in Update callback. 
System.NullReferenceException: Object reference not set to an instance of an object.
   at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Update()
[Error  :XUnity.AutoTranslator] An error occurred while setting up UI.
System.NullReferenceException: Object reference not set to an instance of an object.
   at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.CreateXuaViewModel()
   at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.InitializeGUI()
[Error  :XUnity.AutoTranslator] An error occurred in Update callback. 
System.NullReferenceException: Object reference not set to an instance of an object.
   at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Update()
[Info   :XUnity.AutoTranslator] Skipping plugin scan because no plugin-specific translations has been registered.```

  the game switch to il2cpp from mono and the plugin stop working :(
ManlyMarco commented 1 month ago

Try updating bepinex to latest build.

takaqiao commented 1 month ago

Try updating bepinex to latest build.

no luck still same error

Atamg1994 commented 1 month ago

Try updating bepinex to latest build.

Last build

https://builds.bepinex.dev/projects/bepinex_be

https://github.com/BepInEx/BepInEx/commit/726b68e52b13981fd8a23011ec21df3ef9b8d530

takaqiao commented 1 month ago

Try updating bepinex to latest build.

Last build

https://builds.bepinex.dev/projects/bepinex_be

BepInEx/BepInEx@726b68e

I tried last build including the one u mentioned still got this error


System.ArgumentNullException: Value cannot be null. (Parameter 'path')
   at System.IO.Path.GetFullPath(String path)
   at System.IO.DirectoryInfo..ctor(String path)
   at XUnity.Common.Utilities.Paths.GetAndSetGameRoot()
   at XUnity.Common.Utilities.Paths.Initialize()
   at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Initialize()
   at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Awake()
[Info   :Il2CppInterop] Registered mono type XUnity.AutoTranslator.Plugin.Core.Il2CppManagedEnumerator in il2cpp domain
[Warning:     Unity] Switching transport to: Mirror.FizzySteam.FizzySteamworks
[Error  :     Unity] Failed to get avatar handle.```