Exception when saving for UWP (Hololens)

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
Scano
Posts: 3
Joined: Tue Jul 17, 2018 8:14 am

Exception when saving for UWP (Hololens)

Post by Scano »

Hi Joel,

I'm building an app for the hololens and I ran into the following problem when trying to save a string:

This is the error I receive:

Code: Select all

AggregateException: One or more errors occurred. (The parameter is incorrect.
)
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at ES2FileUtility.CreateStorageFile(String path, StorageFolder folder)
   at ES2FileUtility.CreateStorageFile(String path)
   at ES2FileUtility.CreateFileStream(String path, ES2FileMode filemode, Int32 bufferSize)
   at ES2FileStream.CreateStorageStream()
   at ES2FileStream.Store()
   at ES2Writer.Save(Boolean checkForOverwrite)
   at ES2Writer.Save()
   at ES2.Save[T](T param, String identifier)
   at SaveLoad.Save2()
   at UnityEngine.Events.InvokableCall.Invoke()
   at UnityEngine.Events.UnityEvent.Invoke()
   at UnityEngine.UI.Button.Press()
   at UnityEngine.UI.Button.OnPointerClick(PointerEventData eventData)
   at UnityEngine.EventSystems.ExecuteEvents.Execute(IPointerClickHandler handler, BaseEventData eventData)
   at UnityEngine.EventSystems.ExecuteEvents.Execute[T](GameObject target, BaseEventData eventData, EventFunction`1 functor) 
The code I execute is basic:

Code: Select all

    public void Save()
    {
        ES2.Save(myInputField.text, "myText");
    }
A couple of notes:
- The above code worked fine until a couple of weeks ago. I really have no idea why it's not working
- I updated to the latest version of Easy save
- I can't build for the hololens if I have the easy save 3 folder in Plugins (I just delete it)
- I use the holotoolkit (it shouldn't be an issue)
- The scene is really simple: InputField + couple of buttons and a keyboard!

So the question is:
Do you have any idea on what could be causing it, and what I could try?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Exception when saving for UWP (Hololens)

Post by Joel »

Hi there,

I've not seen this error before. Please could you try something for me?

Please could you specify the filename in your ES2.Save call. i.e.
ES2.Save(myInputField.text, "myFile.txt?tag=myText");
The only thing I can think is happening is that UWP is recognising the tag as the filename for some reason.

Also with regards to Easy Save 3 not building, please could you send me any errors which are sent to console when you try to build for it?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Scano
Posts: 3
Joined: Tue Jul 17, 2018 8:14 am

Re: Exception when saving for UWP (Hololens)

Post by Scano »

Thanks for the quick reply:
Unfortunately I already tried your suggestion and it gives the exact same error :cry: At this point I believe it has more to do with my device than Easy save. I probably will do a reset and if the error still persists I will let you know.

Concerning ES3, here are the errors:

Code: Select all

Assets\Plugins\Easy Save 3\Scripts\Web\ES3Cloud.cs(696,40): error CS0117: 'TimeZoneInfo' does not contain a definition for 'ConvertTimeToUtc'

Assets\Plugins\Easy Save 3\Scripts\ES3Reflection.cs(395,57): error CS1061: 'IEnumerable<Attribute>' does not contain a definition for 'Length' and no extension method 'Length' accepting a first argument of type 'IEnumerable<Attribute>' could be found (are you missing a using directive or an assembly reference?)

Assets\Plugins\Easy Save 3\Scripts\ES3Reflection.cs(400,71): error CS1061: 'IEnumerable<Attribute>' does not contain a definition for 'Length' and no extension method 'Length' accepting a first argument of type 'IEnumerable<Attribute>' could be found (are you missing a using directive or an assembly reference?)

Assets\Plugins\Easy Save 3\Scripts\ES3Reflection.cs(405,30): error CS1061: 'TypeInfo' does not contain a definition for 'GetInterface' and no extension method 'GetInterface' accepting a first argument of type 'TypeInfo' could be found (are you missing a using directive or an assembly reference?)
BTW If you solve those errors, please let me know I would be glad to use ES3
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Exception when saving for UWP (Hololens)

Post by Joel »

Hi there,

It looks like some UWP errors from a previous version have crept in from a previous version. If you PM me your invoice number, I'll send you over an update which should get ES3 working for you.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Scano
Posts: 3
Joined: Tue Jul 17, 2018 8:14 am

Re: Exception when saving for UWP (Hololens)

Post by Scano »

Just a quick update:
I reset to factory settings the hololens and I still had the errors shown above, it's strange because ES2 always worked perfectly. Anyways thanks to the updated package for ES3 now I can use it and it works perfectly fine.

Thanks again for the assistance!
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Exception when saving for UWP (Hololens)

Post by Joel »

Thanks for the update.

I'll see if anyone else encounters this issue so I have a bit more data to work with. If this is indeed affecting other people, we might move Easy Save 2 away from IsolatedStorage and over to Easy Save 3's method of storage (persistentDataPath).

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Locked