we tried to integrate firebase-analysis into our unity project, but we got an error about 'Data loss. Cannot record event metadata', don't known how to solve this problem and wanna ask for help.
Tried example testapp from https://github.com/firebase/quickstart-unity/tree/master/analytics/testapp, but still got the same error.
Here was our instruments to integrate firebase-analysis into testapp project:
- Download newest unity-firebase SDK 4.0.3
- Open testapp project using Unity 5.5.4f1 (upgrade testapp project from 5.4.1f1)
- Import unity-firebase-analytics SDK from FirebaseAnalytics.unitypackage
- Download GoogleService-Info.plist from firebase console and copy into project
- Setup testapp unity project and build into xcode project
- Switch to iOS platform
- Turnoff engine-striped in iOS build settings in Unity
- Make TestApp/MainScene.unity3d as first build scene
Excute command
pod installon build pathAnalyzing dependencies Downloading dependencies Using Firebase (4.0.4) Using FirebaseAnalytics (4.0.2) Using FirebaseCore (4.0.4) Using FirebaseInstanceID (2.0.0) Using GoogleToolboxForMac (2.1.1) Using nanopb (0.3.8) Generating Pods project Skipping User Project Integration Sending stats Pod installation complete! There are 2 dependencies from the Podfile and 6 total pods installed.- Open xcode project using xcode 8.3.3
- Setup signing configs
- Build and run on iPhone with iOS 10.3.2
From the output, we saw a nice start:
2017-08-09 14:28:09.611 testapp[1086] <Notice> [Firebase/Analytics][I-ACS023007] Firebase Analytics v.40002000 started
2017-08-09 14:28:09.612 testapp[1086] <Debug> [Firebase/Analytics][I-ACS023009] Debug logging enabled
2017-08-09 14:28:09.667 testapp[1086] <Debug> [Firebase/Analytics][I-ACS023016] Firebase Analytics is ready to receive events
2017-08-09 14:28:09.884 testapp[1086] <Notice> [Firebase/Analytics][I-ACS003007] Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
Then some errors occurred when firebase started logevent:
2017-08-09 14:28:09.889 testapp[1086] <Warning> [Firebase/Analytics][I-ACS012011] Received empty measurement bundle metadata for getting dictionary representation
2017-08-09 14:28:09.890 testapp[1086] <Error> [Firebase/Analytics][I-ACS023068] Data loss. Cannot record event metadata. Error: Error Domain=com.google.gmp.measurement.ErrorDomain Code=2 "Failed to insert/update unknown data type" UserInfo={NSLocalizedDescription=Failed to insert/update unknown data type}
2017-08-09 14:28:09.890 testapp[1086] <Error> [Firebase/Analytics][I-ACS034010] Transaction failed
And here is full log on gist. Appreciate any help, thanks.