kkdevs / Patchwork

mod
13 stars 1 forks source link

Unable to access ServicePointManager class under Patchwork #29

Closed ghost closed 5 years ago

ghost commented 5 years ago

Reporting XUnity.AutoTranslator (2.9.1) and Patchwork (17v7) are not compatible.

The plugin fails during initialization with the following exception:

[XUnity.AutoTranslator][ERROR]: An unexpected error occurred during initialization of endpoint.
System.TypeInitializationException: An exception was thrown by the type initializer for System.Net.ServicePointManager ---> System.TypeLoadException: Could not load type 'System.Net.Configuration.ConnectionManagementSection' from assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
  --- End of inner exception stack trace ---
  at XUnity.AutoTranslator.Plugin.Core.Web.GoogleTranslateEndpoint..ctor () [0x00000] in <filename unknown>:0 
  at XUnity.AutoTranslator.Plugin.Core.KnownEndpoints.FindEndpoint (System.String identifier) [0x00000] in <filename unknown>:0 
  at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.Initialize () [0x00000] in <filename unknown>:0 
ezdiy commented 5 years ago

Copy System.Configuration.dll from mono into managed folder (plugin folder may work too, but that brings certain gotchas) to fix the missing dependency.

enkephalin07 commented 5 years ago

I don't see any change. Autotranslator 2.9.1 still isn't fetching remote translations.

ghost commented 5 years ago

It is correct that it still does not work. It just complains about this now instead.

System.Net.WebException: Error: ConnectFailure (Cannot find the requested method.) ---> System.MissingMethodException: Cannot find the requested method.
  at (wrapper managed-to-native) System.Net.Sockets.Socket:Connect_internal (intptr,System.Net.SocketAddress,int&)
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0 
  at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
  at System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename unknown>:0 
  at System.Net.WebClient.GetWebResponse (System.Net.WebRequest request) [0x00000] in <filename unknown>:0 
  at XUnity.AutoTranslator.Plugin.Core.Web.UnityWebClient.GetWebResponse (System.Net.WebRequest request) [0x00000] in <filename unknown>:0 
  at System.Net.WebClient.ReadAll (System.Net.WebRequest request, System.Object userToken) [0x00000] in <filename unknown>:0 
  at System.Net.WebClient.DownloadDataCore (System.Uri address, System.Object userToken) [0x00000] in <filename unknown>:0 
ezdiy commented 5 years ago

Edit: ugly fix in v9 - it now bundles version of the mono deps atl needs fixed up for unity