Question

Unity SDK - Events not send - WebGL MAC

  • 22 January 2021
  • 1 reply
  • 81 views

Hello,

We have Unity Web GL application and we are using MixPanel Unity SDK.

Sending events works fine if user enters our WebGL application using Windows OS. However it doesn’t work if user enters it from MAC OS. In Web browser console window following error message appears:
 

InvalidOperationException: End of file reached while trying to read queue item  at mixpanel.queue.PersistentQueue.ReadEntriesFromFile (mixpanel.queue.PersistentQueueEntry firstEntry, System.Int64 currentBufferSize) [0x00000] in <00000000000000000000000000000000>:0 (Filename: currently not available on il2cpp Line: -1)

 

We have also tested it on empty project which had only MixPanel imported. The same error appeared for MAC OS.
Please let me know how can we solve this issue?


1 reply

Userlevel 2
Badge +2

Hi there,

Our Unity SDK does not currently support WebGL/Standalone builds. The error you get is precisely the root cause, and you can see the issue posted in our repo here: https://github.com/mixpanel/mixpanel-unity/issues/108

As the engineering team reviewed this, the problem seems to come from the inability to write into disk somewhere here (https://github.com/mixpanel/mixpanel-unity/blob/master/Mixpanel/PersistentQueue/PersistentQueue.cs ). It's not quite sure why it fails so far, but likely it's an issue with an API not being able to create a pointer to a file.

We have an open bug report and we are adding reports to the bug to help prioritize as more customers would need the support.

In the meantime, while the library can not directly be used, you could implement via our HTTP API directly, or perhaps using a third party C# library (like this one as an example but you can find a few more doing a search). I definitely realize this is not ideal as you would need to build the logic to send events and keep identity, but since it is a standalone build, likely the batching and offline queue is not as important as on mobile (of course, depending on your project). 

Ian

Reply


Mixpanel