【问题标题】:<FIRAnalytics/ERROR> Data loss. Cannot record event metadata using Unity Firebase SDK<FIRAnalytics/ERROR> 数据丢失。无法使用 Unity Firebase SDK 记录事件元数据
【发布时间】:2017-08-09 08:41:38
【问题描述】:

我们尝试将 firebase-analysis 集成到我们的统一项目中,但出现“数据丢失”错误。无法记录事件元数据',不知道如何解决这个问题,想寻求帮助。

尝试了来自https://github.com/firebase/quickstart-unity/tree/master/analytics/testapp 的示例 testapp,但仍然遇到同样的错误。

这是我们将 firebase-analysis 集成到 testapp 项目中的工具:

  • 下载最新的 unity-firebase SDK 4.0.3
  • 使用 Unity 5.5.4f1 打开 testapp 项目(从 5.4.1f1 升级 testapp 项目)
  • 从 FirebaseAnalytics.unitypackage 导入 unity-firebase-analytics SDK
  • 从 Firebase 控制台下载 GoogleService-Info.plist 并复制到项目中
  • 设置 testapp unity 项目并构建到 xcode 项目中
    • 切换到 iOS 平台
    • 在 Unity 的 iOS 构建设置中关闭引擎条带化
    • 将 TestApp/MainScene.unity3d 作为第一个构建场景
  • 在构建路径上执行命令pod install

    Analyzing 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.
    
  • 使用 xcode 8.3.3 打开 xcode 项目
    • 设置签名配置
  • 在装有 iOS 10.3.2 的 iPhone 上构建和运行

从输出中,我们看到了一个不错的开始:

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

然后firebase启动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

这里是full log 的要点。感谢任何帮助,谢谢。

【问题讨论】:

    标签: ios firebase unity3d firebase-analytics


    【解决方案1】:

    更新到较新的 Firebase 版本,并确保您链接的是 Firebase 随附的 nanopb 版本。更多详情https://github.com/firebase/quickstart-ios/issues/229

    【讨论】:

      猜你喜欢
      • 2022-08-20
      • 1970-01-01
      • 2020-02-04
      • 1970-01-01
      • 2015-01-05
      • 2023-03-08
      • 1970-01-01
      • 1970-01-01
      • 2010-12-21
      相关资源
      最近更新 更多