我正在使用 bugsense 3.2.2 jar。我有一个简单的测试代码来生成 NullPointerException。我还添加了一个示例事件,可以在仪表板中看到它,但看不到生成的崩溃。
内部活动
//in onCreate()
BugSenseHandler.I_WANT_TO_DEBUG = true;
BugSenseHandler.initAndStartSession(this, "XXXXXXXX");
//on button click
try{
BugSenseHandler.sendEvent("Test button clicked!!!");
String a = null;
a.toString();
}catch(Exception e){
BugSenseHandler.sendException(e);
}
//in onStop()
BugSenseHandler.closeSession(this);
在 AndroidManifest.xml 中
<uses-permission android:name="android.permission.INTERNET" />
日志输出:
04-12 17:54:34.293: W/System.err(18319): Catch exception while startHandshake: javax.net.ssl.SSLException: SSL handshake aborted: ssl=0x285240: I/O error during system call, Connection reset by peer
04-12 17:54:34.293: W/System.err(18319): return an invalid session with invalid cipher suite of SSL_NULL_WITH_NULL_NULL
04-12 17:54:34.373: W/BugSenseHandler(18319): Transmitting ping Exception No peer certificate
04-12 17:54:34.373: W/System.err(18319): javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
04-12 17:54:34.373: W/System.err(18319): at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:258)
04-12 17:54:34.373: W/System.err(18319): at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
04-12 17:54:34.373: W/System.err(18319): at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
04-12 17:54:34.373: W/System.err(18319): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:164)
04-12 17:54:34.373: W/System.err(18319): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
04-12 17:54:34.373: W/System.err(18319): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
04-12 17:54:34.373: W/System.err(18319): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359)
04-12 17:54:34.373: W/System.err(18319): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
04-12 17:54:34.373: W/System.err(18319): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
04-12 17:54:34.373: W/System.err(18319): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
04-12 17:54:34.373: W/System.err(18319): at com.bugsense.trace.models.PingsMechanism.transmitPingSync(Unknown Source)
04-12 17:54:34.373: W/System.err(18319): at com.bugsense.trace.models.PingsMechanism$2.run(Unknown Source)
上面报告的错误是在活动启动后立即生成的(问题似乎在初始化代码中)。单击按钮后没有错误,但在 bugsense 仪表板中看不到崩溃。我也尝试过使用 3.2 jar,但问题仍然相同。
如果我遗漏了什么,请告诉我。