mixpanel / mixpanel-unity

Official Unity Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
43 stars 40 forks source link

Mixpanel doesn't work with IL2CPP build on windows. #117

Closed nryzhkouski closed 2 years ago

nryzhkouski commented 3 years ago

Mixpanel doesn't work with IL2CPP build on windows (steam application).

Events aren't visible in Live view for IL2CPP mode.

Mono build works fine, all events are visible.

Build options:

Engine: Unity 2019.4.17f Scipting Backend: IL2CPP Api Level: .Net 4.x C++ Compiler Conf.: Release

Have found the reason in debug build:

​​​​​​​WindowsPlayer(DESKTOP-B08KLI4) [Mixpanel] System.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    at mixpanel.queue.PersistentQueue.ReadAhead () [0x00000] in <00000000000000000000000000000000>:0    at mixpanel.queue.PersistentQueue.Dequeue () [0x00000] in <00000000000000000000000000000000>:0    at mixpanel.queue.PersistentQueueSession.Dequeue () [0x00000] in <00000000000000000000000000000000>:0    at mixpanel.Worker+d__19.MoveNext () [0x00000] in <00000000000000000000000000000000>:0    at mixpanel.Worker.DispatchOperations () [0x00000] in <00000000000000000000000000000000>:0    at mixpanel.Worker.RunBackgroundThread () [0x00000] in <00000000000000000000000000000000>:0    at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00000] in <00000000000000000000000000000000>:0    at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0    at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0    at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00000] in <00000000000000000000000000000000>:0    at System.Threading.ThreadHelper.ThreadStart () [0x00000] in <00000000000000000000000000000000>:0 

zihejia commented 2 years ago

We are right now working on a solution to solve all the issues related to IL2CPP, let's use #108 to track. Sorry for the inconvenience.