Page 1 of 1

Problems with Sync on android

Posted: Fri Jan 26, 2018 9:56 am
by elmstrom
I get this error on sync() on android client, i do not get the error when the same code runs in editor.

Code: Select all

01-26 09:44:14.325 3919-3939/com.test.test E/Unity: FormatException: Expected ',' separating properties or '"' before property name, found '�'.
                                                                      at ES3Internal.ES3JSONReader.ReadPropertyName () [0x00000] in <filename unknown>:0 
                                                                      at ES3Reader+ES3ReaderRawEnumerator+<GetEnumerator>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0 
                                                                      at ES3Writer.Merge (.ES3Reader reader) [0x00000] in <filename unknown>:0 
                                                                      at ES3Writer.Merge () [0x00000] in <filename unknown>:0 
                                                                      at ES3Writer.Save () [0x00000] in <filename unknown>:0 
                                                                      at ES3.Save[Dictionary`2] (System.String key, System.Object value, .ES3Settings settings) [0x00000] in <filename unknown>:0 
                                                                      at ES3.Save[Dictionary`2] (System.String key, System.Object value, System.String filePath) [0x00000] in <filename unknown>:0 
                                                                      at ES3script+<syncBooks>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0 
                                                                      at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0 
                                                                    UnityEngine.MonoBehaviour:StartCoroutine_Auto_Internal(IEnumer

Re: Problems with Sync on android

Posted: Fri Jan 26, 2018 10:04 am
by Joel
Hi there,

Please could you try deleting the app from your device (to remove any existing save data) and then reinstalling it?

This error usually occurs when a previous error has corrupted the data in development.

All the best,
Joel

Re: Problems with Sync on android

Posted: Fri Jan 26, 2018 10:22 am
by elmstrom
Now the error is gone.

Is there a way to make a fail safe for when this happens? it would be better if the app could overwrite the corrupt data with the valid data from the server (even if its older).

Re: Problems with Sync on android

Posted: Fri Jan 26, 2018 10:52 am
by Joel
Hi there,

In the release version it won't write to file if an error occurs. However, we're not doing this in the beta build as it provides us with important information we need for debugging.

All the best,
Joel