0

This does not happen if I use any 3.5.x version, but it occurs on every 4.x version. Proguard changes have been made according to https://goo.gl/yMz3NL.

All unit tests fail with the following message -

java.lang.VerifyError: Expecting a stackmap frame at branch target 231 Exception Details:

 Location:   com/exacttarget/etpushsdk/ETPushReceiver.onReceive(Landroid/content/Context;Landroid/content/Intent;)V @28: new
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0000000: 1218 1202 04bd 0022 5903 2ab6 0034 b600
    0000010: 3253 b800 35b8 002f 57b8 002c bb00 1959
    ... [removed 14 lines]                
  Exception Handler Table:
    bci [28, 228] => handler: 231
3
  • Can you please post the error from LogCat? The only Proguard statement required can be found salesforcefuel.github.io/JB4A-SDK-Android/sdk-implementation/… All of the documentation for 4.x+ has been moved to salesforcefuel.github.io/JB4A-SDK-Android. Please ensure you have followed the implementation instructions as 4.x is a significant departure from 3.x. – Bill Mote Aug 25 '15 at 12:43
  • Thanks @Bill Mote. I've changed my Proguard file to include that statement only but that did not change anything. The app runs as expected, it's just that after I include SDK 4.0 or higher, it breaks all the robolectric unit tests in our app. – mscndle Aug 25 '15 at 15:27
  • every unit test throws the same error - "java.lang.VerifyError: Expecting a stackmap frame at branch target 231 Exception Details: Location: com/exacttarget/etpushsdk/ETPushReceiver.onReceive(Landroid/content/Context;Landroid/content/Intent;)V @28: new Reason: Expected stackmap frame at this location. Bytecode: " – mscndle Aug 25 '15 at 15:28
1

This has been resolved as of version 4.7.x of the SDK: Release Notes

Please update to the latest version and, as always, please let us know if you're experiencing any issues.

1

I get the same issue, you can fix the build by having

android {
    testOptions{
        unitTests.all {
            jvmArgs '-noverify'
        }
    }
}

in your build.gradle file, or if you're running from Android Studio/etc put '-noverify' in your VM Args for the run config

unfortunately after solving this issue I then get the following when Robolectric instantiates my custom Application class

java.lang.NullPointerException
    at com.exacttarget.etpushsdk.util.m.c(SourceFile:263)
    at com.exacttarget.etpushsdk.util.m.a(SourceFile:52)
    at com.exacttarget.etpushsdk.util.EventBus.register(SourceFile:94)
0

Not working when applying the solution to gradle. But you can edit the configuration for test cases or test suite and provide "-noverify" as vm argument. Refer to attached image.enter image description here

1
  • Can you add a little more detail? At first glance, this almost looks like it might not even be an answer, though I do believe it is after rereading it. – Adrian Larson Jun 15 '16 at 5:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.