1 year ago

#250630

test-img

AwaisMajeed

App crashes with `java.lang.VerifyError: Verifier rejected class org.igniterealtime.jbosh.ApacheHTTPResponse` after I set minifyEnabled to true

I'm using JBOSH with Smack, and when I try to call BoshClient.send(ComposableBody body) after setting minifyEnabled to true, it throws java.lang.VerifyError and my app crashes. I can add a try catch block to handle the exception but then the connection doesn't set up. I have also added Bosh, Smack and Apache libraries in my proguard-rules.pro file it doesn't seem to make any difference. Here's my proguard-rules.pro file:

-keep class org.igniterealtime.jbosh.ApacheHTTPResponse**
-keepclassmembernames class org.igniterealtime.jbosh.ApacheHTTPResponse** { *; }
-keep class org.igniterealtime.*,* { *; }
-keep class org.jivesoftware.*,* { *; }
-keep class org.xmlpull.*,* { *; }
-keep class org.apachecordovacamera.*,* { *; }
-keep class org.apache.*,* { *; }

and here's the full stack trace of the crash:

java.lang.VerifyError: Verifier rejected class org.igniterealtime.jbosh.ApacheHTTPResponse: void org.igniterealtime.jbosh.ApacheHTTPResponse.abort() failed to verify: void org.igniterealtime.jbosh.ApacheHTTPResponse.abort(): [0x4] 'this' argument 'Reference: org.apache.http.client.methods.HttpPost' not instance of 'Reference: org.apache.http.client.methods.AbstractExecutionAwareRequest' (declaration of 'org.igniterealtime.jbosh.ApacheHTTPResponse' appears in /data/app/~~C_a3PwWdaJDDDNDj2yDAfA==/com.myapp.stage-R1BpaF5cY9V7Xus_oIqsbQ==/base.apk!classes4.dex)
        at org.igniterealtime.jbosh.ApacheHTTPSender.send(SourceFile:122)
        at org.igniterealtime.jbosh.BOSHClient.send(SourceFile:539)
        at org.jivesoftware.smack.bosh.MyXMPPBOSHConnection.send(SourceFile:397)
        at org.jivesoftware.smack.bosh.MyXMPPBOSHConnection.sendElement(SourceFile:327)
        at org.jivesoftware.smack.bosh.MyXMPPBOSHConnection.send(SourceFile:317)
        at org.jivesoftware.smack.bosh.MyXMPPBOSHConnection.loginNonAnonymously(SourceFile:245)
        at org.jivesoftware.smack.AbstractXMPPConnection.login(SourceFile:456)
        at com.myapp.xmpp.XMPPConnectionManager.loginInternal(SourceFile:359)
        at com.myapp.xmpp.XMPPConnectionManager.connectAndAuthenticate(SourceFile:316)
        at com.myapp.xmpp.XMPPConnectionManager.xmppRequestStateChange(SourceFile:617)
        at com.myapp.xmpp.XMPPConnectionManager$1.run(SourceFile:103)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:246)
        at android.os.HandlerThread.run(HandlerThread.java:67)

android

xmpp

proguard

0 Answers

Your Answer

Accepted video resources