doulu8446 2018-11-19 07:48
浏览 76
已采纳

如何在Crashlytics中获取golang的堆栈跟踪

Our's app is a Android app, which has a JNI writed by golang. And we use the Fabric Crashlytics to track carshes.

But, we can not get the Stack-trace information in the Crashlytics, after a crash happened in the JNI. In the Java, We can get it.

In the Object-C for iOS app, we can upload the dSYM file to map the functions. But where can I do it with Golang?

Does the Fabric support it?

Now, in the Crashlytics, we can see below only:

Crashed: Thread
0  libc.so                        0xf6f4c778 (Missing)
1  libc.so                        0xf6f26791 (Missing)
2  libc.so                        0xf6f23933 (Missing)
3  (Missing)                      0x15c791e6 (Missing)
4  libgojni.so                    0xdddd910e (Missing)
5  libc.so                        0xf6f214ee (Missing)
6  (Missing)                      0x15c791e6 (Missing)
7  libgojni.so                    0xde00a8de (Missing)
8  libgojni.so                    0xde00a93e (Missing)
9  libgojni.so                    0xdddd8ed6 (Missing)
  • 写回答

1条回答 默认 最新

  • douzong7283 2018-11-23 14:19
    关注

    We have been resolved this issue.

    The background:

    We build a Android app, it has a JNI writed by go, which is build by gomobile. We use the Fabric Crashlytics to monitor the crash information. But in the Crashlytics, we could not see the full stack trace information which occurred in the JNI.

    The Solution is:

    At the first, please check your NDK version, it must be r17c or more.

    Add a param --work in the gomobile command, like gomobile bind --work YOUR-SOURCE-CODE-PATH WORK=TEMP-PATH.

    After build successful, move the all of files in the jniLibs to YOUR-PROJECT-PATH/app/obj.

    At the last, do the steps list in Fabric docs.

    Hope our experiences can save your time :-)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 java在应用程序里获取不到扬声器设备
  • ¥15 echarts动画效果的问题,请帮我添加一个动画。不要机器人回答。
  • ¥60 许可证msc licensing软件报错显示已有相同版本软件,但是下一步显示无法读取日志目录。
  • ¥15 Attention is all you need 的代码运行
  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事:
  • ¥15 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系