Post Custom Crashes from ASP.net mvc for hockey app doesn't work

感情迁移 提交于 2019-12-11 14:16:22

问题


We are working on a web service built with ASP .net MVC and now we want to send the crashes to Hockey app as mentioned in their website we should use their public API. I have followed all the instructions but when I try to send the log file from curl for example I use the following code and send the log file

curl -F "log=@log.log" https://rink.hockeyapp.net/api/2/apps/MY_APPLICATION_ID/crashes/upload 

the response is

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>id</key>
    <string>0</string>
    <key>delay</key>
    <integer>0</integer>
    <key>status</key>
    <integer>0</integer>
  </dict>
</plist>

with status code 201 created but when I open the portal of the application on my account at HockeyApp I found no crash

My log file has the following format

Package: APPLICATION_PACKAGE_NAME
Version: MY_APPLICATION_VERSION
OS: 2.2
Manufacturer: HTC
Model: HTC Desire
Date: Sun Nov 27 17:35:08 GMT+01:00 2011
CrashReporter Key: 353391450fd2bd05c2753d23848042f3

java.lang.RuntimeException: Unable to start activity ComponentInfo{de.codenauts.hockeyapp/de.codenauts.hockeyapp.MainActivity}: java.lang.NullPointerException
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2787)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
  at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4066)
  at android.app.ActivityThread.access$2400(ActivityThread.java:135)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2140)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:144)
  at android.app.ActivityThread.main(ActivityThread.java:4937)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
  at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
  at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:112)
  at org.json.JSONTokener.nextValue(JSONTokener.java:90)
  at org.json.JSONArray.<init>(JSONArray.java:87)
  at org.json.JSONArray.<init>(JSONArray.java:103)
  at de.codenauts.hockeyapp.MainActivity.loadApps(MainActivity.java:137)
  at de.codenauts.hockeyapp.MainActivity.onCreate(MainActivity.java:66)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)

is there any mistake in my configuration? does anybody integrate Hockey app with ASP .net MVC?


回答1:


I have contacted the Hockey support team and they told me that the problem was with this line in the log file

Date: Sun Nov 27 17:35:08 GMT+01:00 2011

Hockey app will reject the crash if it is created in the same time stamp so just when I change the date field the problem has been solved



来源:https://stackoverflow.com/questions/48319120/post-custom-crashes-from-asp-net-mvc-for-hockey-app-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!