Closed IndieKevin closed 9 years ago
We've also reported this issue to Google Analytics here: https://code.google.com/p/analytics-issues/issues/detail?id=716&thanks=716&ts=1440021580
I would like to chime in here that I also have this issue, but I do not have Google Analytics in my project. So I do not think this is the tied to GA specifically.
I notice that when this crashes, different classes come up randomly. Here are some of the classes that seem to cause this issue:
From the stack traces, I notice that they all error when + (void)initialize
is called.
Also, while trying to run through this to show its not a GA issue, I also randomly seem to get a EXC_BAD_INSTRUCTION error as well. This always happens when running the first spec.
Some additional details that may help. We just recently added Kiwi to our test project. Previously we were writing strictly XCTestCase classes. I notice that the XCTestCases run first. Then the Kiwi specs. If I run JUST the spec I've created alone, the spec works fine. If I attempt to run all other tests as well is when it fails.
@coridn @IndieKevin I think #649 fixes it. Could you please give it a try?
Confirmed #649 fixes the issue, and is a more general solution to the problem. Nice work @yas375
Awesome @yas375! Great clean solution, thanks for the great help and for your investigation. :100:
I'm glad I can help :)
Tests unexpectedly crash when the Google Analytics CocoaPod is also included alongside Kiwi in the test target.
The error triggers a EXC_BAD_ACCESS in registerMatcherClassesWithNamespacePrefix at this line https://github.com/kiwi-bdd/Kiwi/blob/master/Classes/Core/KWMatcherFactory.m#L76. At the time of error candidateClass is GAITrackedModel.
An example project demonstrating this issue is available here: https://github.com/indiegogo/GoogleAnalyticsKiwiCrash
A discussion of the error is also found here: https://groups.google.com/forum/#!topic/kiwi-bdd/ZfLol8_Oz8k