googlesamples / unity-jar-resolver

Unity plugin which resolves Android & iOS dependencies and performs version management
Other
1.28k stars 346 forks source link

[Bug] System.Configuration.ConfigurationErrorsException #427

Closed JimmyDeemo closed 3 years ago

JimmyDeemo commented 3 years ago

[READ] For Firebase Unity SDK issues, please report to Firebase Unity Sample

Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.

[REQUIRED] Please fill in the following fields:

[REQUIRED] Please describe the issue here:

We recently updated out project to Unity 2019 LTS and on opening the project we get the following error in the console.

Please answer the following, if applicable:

What's the issue repro rate? 100% on laucnh of the project.

What happened? How can we make the problem occur?

This error is shown;

Job failed with exception: System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.EntryPointNotFoundException: GetModuleFileName
  at (wrapper managed-to-native) Microsoft.Win32.UnsafeNativeMethods.GetModuleFileName(System.Runtime.InteropServices.HandleRef,System.Text.StringBuilder,int)
  at System.Configuration.ClientConfigPaths..ctor (System.String exePath, System.Boolean includeUserConfig) [0x00114] in <a1ce1c69645646719db9dfa57cf6b99c>:0 
  at System.Configuration.ClientConfigPaths.GetPaths (System.String exePath, System.Boolean includeUserConfig) [0x0001a] in <a1ce1c69645646719db9dfa57cf6b99c>:0 
  at System.Configuration.ClientConfigurationHost.get_ConfigPaths () [0x00008] in <a1ce1c69645646719db9dfa57cf6b99c>:0 
  at System.Configuration.ClientConfigurationHost.GetStreamName (System.String configPath) [0x000ad] in <a1ce1c69645646719db9dfa57cf6b99c>:0 
  at System.Configuration.ClientConfigurationHost.get_IsAppConfigHttp () [0x00000] in <a1ce1c69645646719db9dfa57cf6b99c>:0 
  at System.Configuration.ClientConfigurationSystem..ctor () [0x0006a] in <a1ce1c69645646719db9dfa57cf6b99c>:0 
  at System.Configuration.ConfigurationManager.EnsureConfigurationSystem () [0x00022] in <a1ce1c69645646719db9dfa57cf6b99c>:0 
   --- End of inner exception stack trace ---
  at System.Configuration.ConfigurationManager.EnsureConfigurationSystem () [0x00063] in <a1ce1c69645646719db9dfa57cf6b99c>:0 
  at System.Configuration.ConfigurationManager.PrepareConfigSystem () [0x0000a] in <a1ce1c69645646719db9dfa57cf6b99c>:0 
  at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x0000a] in <a1ce1c69645646719db9dfa57cf6b99c>:0 
  at System.Configuration.PrivilegedConfigurationManager.GetSection (System.String sectionName) [0x00000] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection () [0x00000] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at System.Diagnostics.DiagnosticsConfiguration.Initialize () [0x0002a] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at System.Diagnostics.DiagnosticsConfiguration.get_IndentSize () [0x00000] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at System.Diagnostics.TraceInternal.InitializeSettings () [0x0004e] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at System.Diagnostics.TraceInternal.get_UseGlobalLock () [0x00000] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at System.Diagnostics.TraceInternal.Fail (System.String message) [0x00000] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at System.Diagnostics.TraceInternal.Assert (System.Boolean condition) [0x00004] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at System.Diagnostics.Debug.Assert (System.Boolean condition) [0x00000] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
  at Google.VersionHandlerImpl+FileMetadataByVersion.Add (Google.VersionHandlerImpl+FileMetadata metadata) [0x00000] in Z:\tmp\tmp.zHMt0MAu9G\third_party\unity\unity_jar_resolver\source\VersionHandlerImpl\src\VersionHandlerImpl.cs:994 
  at Google.VersionHandlerImpl+FileMetadataSet.Add (System.String filenameCanonical, Google.VersionHandlerImpl+FileMetadataByVersion metadataByVersion) [0x00022] in Z:\tmp\tmp.zHMt0MAu9G\third_party\unity\unity_jar_resolver\source\VersionHandlerImpl\src\VersionHandlerImpl.cs:1317 
  at Google.VersionHandlerImpl+FileMetadataSet.ConsolidateManifests () [0x00119] in Z:\tmp\tmp.zHMt0MAu9G\third_party\unity\unity_jar_resolver\source\VersionHandlerImpl\src\VersionHandlerImpl.cs:1508 
  at Google.VersionHandlerImpl+ManifestReferences.FindAndReadManifestsByPackageName (Google.VersionHandlerImpl+FileMetadataSet metadataSet) [0x00000] in Z:\tmp\tmp.zHMt0MAu9G\third_party\unity\unity_jar_resolver\source\VersionHandlerImpl\src\VersionHandlerImpl.cs:1906 
  at Google.VersionHandlerImpl+ManifestReferences.FindAndReadManifests (Google.VersionHandlerImpl+FileMetadataSet metadataSet) [0x00000] in Z:\tmp\tmp.zHMt0MAu9G\third_party\unity\unity_jar_resolver\source\VersionHandlerImpl\src\VersionHandlerImpl.cs:1896 
  at Google.VersionHandlerImpl.UpdateVersionedAssetsOnMainThread (System.Boolean forceUpdate, System.Action complete, System.Boolean setCleanupFilesPending) [0x0005f] in Z:\tmp\tmp.zHMt0MAu9G\third_party\unity\unity_jar_resolver\source\VersionHandlerImpl\src\VersionHandlerImpl.cs:2830 
  at Google.VersionHandlerImpl+<UpdateVersionedAssets>c__AnonStorey1.<>m__0 () [0x00000] in Z:\tmp\tmp.zHMt0MAu9G\third_party\unity\unity_jar_resolver\source\VersionHandlerImpl\src\VersionHandlerImpl.cs:2796 
  at Google.RunOnMainThread.ExecuteNext () [0x0003d] in Z:\tmp\tmp.zHMt0MAu9G\third_party\unity\unity_jar_resolver\source\VersionHandlerImpl\src\RunOnMainThread.cs:486 

Other functionality seems unaffected. We do have Perforce integrated with the project (logged in via settings), this has been problematic for SDKs in the past.

If you have a downloadable sample project that reproduces the bug you're reporting, you will

likely receive a faster response on your issue.

Unable to share the source code, hopoing that the error would be enough to point out the problem.

paulinon commented 3 years ago

Hi @JimmyDeemo,

It seems that you're using an old version of the editor. Could you try updating the editor to version 2020.3.0f1 and see if your issue persists?

Thanks.

JimmyDeemo commented 3 years ago

I can try it in the latest version of Unity yes but, I am using the Long Term Support version of 2019, which is something that i'm sure a lot of other developers will rely on. Does that mean the LTS versions are not supported by the resolver?

paulinon commented 3 years ago

Hi @JimmyDeemo

Version 2020.3.0f1 is actually an LTS version. Typically, the resolver should be supported regardless of the version of your editor.

The updated version includes the latest fixes, so let's see if updating the editor would resolve the issue.

google-oss-bot commented 3 years ago

Hey @JimmyDeemo. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

JimmyDeemo commented 3 years ago

I am unable to update my project to use 2020. I am currently working on bringing our project from 2018 to 2019. Is the suggestion that this error is at Unity's end rather than the resolver?

paulinon commented 3 years ago

Hi @JimmyDeemo,

It's possible that the issue you're facing could be fixed when an updated version of the editor is resolved, so I recommend that you try updating Unity so that we can narrow down the cause of this behavior.

google-oss-bot commented 3 years ago

Hey @JimmyDeemo. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 3 years ago

Since there haven't been any recent updates here, I am going to close this issue.

@JimmyDeemo if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.