Closed RubenFreireAndrade closed 1 year ago
Any idea what could be the problem?
I tried 1 or 2 releases ago and seemed fine. Now running into this with the latest version.
The issue originated from Newtonsoft with IL2CPP, it works fine with the Mono scripting backend. Meanwhile, a new version of NewtonsoftJSON is available I will see if the issue is fixed there.
If you are referring to Project settings > Player. Its currently running Mono scripting backend.
Maybe I'm missing something? Like a Json package in my project?
With the new Newtonsoft Json release this issue is now fixed for me on android for IL2CPP builds, can you check with v0.1.12 if it works as expected?
Still the same issue. I tried on a clean project just in case something was interfering and tried on both Mono & IL2CPP settings.
ok my fault. Dont do any more changes.
There was an issue on my json file, using quotation marks wrongly. Sorry in advance for taking time off your weekend.
No worries, closing the issue.
This is what's been thrown at me:
JsonReaderException: Invalid property identifier character: “. Path '', line 2, position 1. Newtonsoft.Json.JsonTextReader.ParseProperty () (at /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:1600) Newtonsoft.Json.JsonTextReader.ParseObject () (at /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:1571) Newtonsoft.Json.JsonTextReader.Read () (at /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:432) Newtonsoft.Json.JsonReader.ReadAndAssert () (at /root/repo/Src/Newtonsoft.Json/JsonReader.cs:1169) Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:464) Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:309) Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:202) Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) (at /root/repo/Src/Newtonsoft.Json/JsonSerializer.cs:904) Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) (at /root/repo/Src/Newtonsoft.Json/JsonSerializer.cs:883) Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) (at /root/repo/Src/Newtonsoft.Json/JsonConvert.cs:831) Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) (at /root/repo/Src/Newtonsoft.Json/JsonConvert.cs:787) OpenAI.Configuration..ctor (System.String apiKey, System.String organization) (at Library/PackageCache/com.srcnalt.openai-unity@5924018f2c/Runtime/Configuration.cs:33) OpenAI.OpenAIApi.get_Configuration () (at Library/PackageCache/com.srcnalt.openai-unity@5924018f2c/Runtime/OpenAIApi.cs:28) OpenAI.OpenAIApi.DispatchRequest[T] (System.String path, System.String method, System.Byte[] payload) (at Library/PackageCache/com.srcnalt.openai-unity@5924018f2c/Runtime/OpenAIApi.cs:73) OpenAI.OpenAIApi.CreateChatCompletion (OpenAI.CreateChatCompletionRequest request) (at Library/PackageCache/com.srcnalt.openai-unity@5924018f2c/Runtime/OpenAIApi.cs:179) OpenAI.ChatGPT.SendReply () (at Assets/Samples/OpenAI Unity/0.1.11/ChatGPT/ChatGPT.cs:59) System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) (at :0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <4a31731933e0419ca5a995305014ad37>:0)
UnityEngine.UnitySynchronizationContext.Exec () (at <4a31731933e0419ca5a995305014ad37>:0)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <4a31731933e0419ca5a995305014ad37>:0)