Lachee / discord-rpc-csharp

C# custom implementation for Discord Rich Presence. Not deprecated and still available!
MIT License
560 stars 94 forks source link

Newtonsoft JSON fails to initalize: #93

Closed ghost closed 1 year ago

ghost commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

ERR : Unhandled Exception: System.TypeInitializationException
ERR : The type initializer for 'Newtonsoft.Json.JsonWriter' threw an exception.
ERR :   at Newtonsoft.Json.JsonTextWriter..ctor (System.IO.TextWriter textWriter) [0x00000] in <2676a2da6edc420e890ed28aa4572ee5>:0 
  at Newtonsoft.Json.JsonConvert.SerializeObjectInternal (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializer jsonSerializer) [0x00015] in <2676a2da6edc420e890ed28aa4572ee5>:0 
  at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x00007] in <2676a2da6edc420e890ed28aa4572ee5>:0 
  at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value) [0x00000] in <2676a2da6edc420e890ed28aa4572ee5>:0 
  at DiscordRPC.IO.PipeFrame.SetObject (System.Object obj) [0x00000] in <be27f5d1995a470d9db1a68b5833f77c>:0 
  at DiscordRPC.IO.PipeFrame..ctor (DiscordRPC.IO.Opcode opcode, System.Object data) [0x0000e] in <be27f5d1995a470d9db1a68b5833f77c>:0 
  at DiscordRPC.RPC.RpcConnection.EstablishHandshake () [0x0006e] in <be27f5d1995a470d9db1a68b5833f77c>:0 
  at DiscordRPC.RPC.RpcConnection.MainLoop () [0x00236] in <be27f5d1995a470d9db1a68b5833f77c>:0 

Using Unity WITHOUT NativeNamedPipes because DLLImport isn't finding it.

Lachee commented 3 years ago

Possibly related to Lachee/discord-rpc-unity#6 ?

gemdude46 commented 1 month ago

I am still encountering this issue. Not IL2CPP related, as I'm not using that.