bitstadium / HockeySDK-iOS

HockeyApp was retired and the SDKs are deprecated. Please use App Center instead.
https://github.com/microsoft/appcenter-sdk-apple
Other
597 stars 268 forks source link

BITUpdateManager crashes on startup #373

Closed cgmello closed 7 years ago

cgmello commented 7 years ago

BITUpdateManager crashes on startup. I need to disable the feature to use HockeyApp.

Error on BITUpdateManager.m:1226:

[__NSCFString finishTasksAndInvalidate]: unrecognized selector sent to instance 0x170037b80

Function:

[BITUpdateManager URLSession:task:didCompleteWithError:]_block_invoke:

Code: [[BITHockeyManager sharedHockeyManager] configureWithIdentifier:@"XXX"]; [[BITHockeyManager sharedHockeyManager].authenticator setAuthenticationSecret:@"XXX"]; [[BITHockeyManager sharedHockeyManager].authenticator setIdentificationType:BITAuthenticatorIdentificationTypeHockeyAppEmail]; [[BITHockeyManager sharedHockeyManager] startManager]; [[BITHockeyManager sharedHockeyManager].authenticator authenticateInstallation];

Workaround: [[BITHockeyManager sharedHockeyManager] setDisableUpdateManager:YES];//disable

XCode debug screen: (https://cloud.githubusercontent.com/assets/24326482/20855564/8bb4fa70-b8e5-11e6-9dea-57154f82c597.png)

cgmello commented 7 years ago

SDK version 4.1.2

cgmello commented 7 years ago

Hockey app crash report:

Incident Identifier: D900A861-1362-4B87-8602-FC3AE319182E CrashReporter Key: A00096B6-997D-4D9A-A9BB-A3313F88942C Hardware Model: iPhone8,1 Process: xtremeu [6037] Path: /var/containers/Bundle/Application/763556E7-B65B-4DA7-B164-C6D8C9F666BD/xtremeu.app/xtremeu Identifier: com.xtremeu.XtremeU Version: 1.0 (3) Code Type: ARM-64 Parent Process: ??? [1] Date/Time: 2016-12-02T22:05:15Z Launch Time: 2016-12-02T22:05:12Z OS Version: iPhone OS 10.1.1 (14B150) Report Version: 104 Exception Type: SIGABRT Exception Codes: #0 at 0x19136a014 Crashed Thread: 0 Application Specific Information:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString finishTasksAndInvalidate]: unrecognized selector sent to instance 0x170026700'

Thread 0 Crashed: 0 libsystem_kernel.dylib 0x000000019136a014 pthread_kill + 8 1 libsystem_pthread.dylib 0x0000000191432450 pthread_kill + 108 2 libsystem_c.dylib 0x00000001912de3e0 abort + 136 3 xtremeu 0x000000010045d48c 0x100044000 + 4297868 4 CoreFoundation 0x000000019239a540 handleUncaughtException + 640 5 libobjc.A.dylib 0x0000000190dd4838 _objc_terminate() + 108 6 xtremeu 0x000000010050d7c8 0x100044000 + 5019592 7 libc++abi.dylib 0x0000000190dc366c std::terminate(void (*)()) + 12 8 libc++abi.dylib 0x0000000190dc2f84 cxa_throw + 132 9 libobjc.A.dylib 0x0000000190dd4690 objc_exception_throw + 360 10 CoreFoundation 0x00000001923a1278 -[NSObject(NSObject) doesNotRecognizeSelector:] + 136 11 CoreFoundation 0x000000019239e278 forwarding + 912 12 CoreFoundation 0x000000019229859c _CF_forwarding_prep_0 + 88 13 xtremeu 0x00000001004e12cc 0x100044000 + 4838092 14 libdispatch.dylib 0x0000000191225200 _dispatch_call_block_and_release + 20 15 libdispatch.dylib 0x00000001912251c0 _dispatch_client_callout + 12 16 libdispatch.dylib 0x0000000191229d6c _dispatch_main_queue_callback_4CF + 996 17 CoreFoundation 0x0000000192347f2c CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 8 18 CoreFoundation 0x0000000192345b18 __CFRunLoopRun + 1656 19 CoreFoundation 0x0000000192274048 CFRunLoopRunSpecific + 440 20 GraphicsServices 0x0000000193cfa198 GSEventRunModal + 176 21 UIKit 0x00000001982602fc -[UIApplication _run] + 680 22 UIKit 0x000000019825b034 UIApplicationMain + 204 23 xtremeu 0x00000001001c0e18 0x100044000 + 1560088 24 libdyld.dylib 0x00000001912585b8 start + 0

ElektrojungeAtWork commented 7 years ago

Hey Claudio,

thanks for getting in touch and apologies for the problem you are seeing. We haven't heard of any issue like this by anyone and I have received and distributed app updates in the last weeks myself. That said, it could very well be a bug. I will look into this as soon as I get back to work on Monday.

Are you seeing a similar issue with 4.1.1 or does it just happen since you use 4.1.2? How do you integrate the SDK (Cocoapods, binary integration, Carthage)?

Best, Benjamin

cgmello commented 7 years ago

Hi Benjamin,

First, congratulations for Hockey, very useful !!

Well, it is weird that nobody else had this error, I could only run Hockey after disabling the update manager.

I made this integration this week, I use 4.1.2, have not use any earlier version.

I integrated the SDK using the HockeyApp for Mac.

Thx.

cgmello commented 7 years ago

It seems a memory issue, a URLSession that was not assigned anymore.

BITUpdateManager.m in master branch:

Function

(void)URLSession:(NSURLSession )session task:(NSURLSessionTask )task didCompleteWithError:(NSError *)error {

Line

1221: [session finishTasksAndInvalidate];

Error:

[__NSCFString finishTasksAndInvalidate]: unrecognized selector sent to instance 0x170037b80

I thought that it could be an exception domain error, and so included your domain in my Info.plist, but it doesn't resolved the bug.

<key>hockeyapp.net</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/> <key>NSThirdPartyExceptionMinimumTLSVersion</key> <string>TLSv1.0</string> <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/> </dict>

ElektrojungeAtWork commented 7 years ago

Hey Claudio,

We've tried really hard to repro the issue and we didn't have any luck. What strikes me as odd is that we haven't heard from anyone with those problems. Could you either send us a demo project or your project? If you contact us through support so you can share code in a confidential manner?

Best, Benjamin

cgmello commented 7 years ago

Hi Benjamin,

Thanks a lot for your attention. I cannot share the code, sorry for that. But I will try to make a small demo and send it to you.

Thx.

ElektrojungeAtWork commented 7 years ago

I completely understand that. Thanks in advance for the effort you put into this. I hope we can find the cause for this.

🖖 Benny

ElektrojungeAtWork commented 7 years ago

Happy new year!

Are you still seeing this?

Best, Benjamin

cgmello commented 7 years ago

Hi Benjamin,

I'm using Hockey, but gave up of using this.

But, no problem.

Thnx!

2017-01-06 16:07 GMT-02:00 Benjamin Scholtysik (Reimold) < notifications@github.com>:

Happy new year!

Are you still seeing this?

Best, Benjamin

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bitstadium/HockeySDK-iOS/issues/373#issuecomment-270965179, or mute the thread https://github.com/notifications/unsubscribe-auth/AXMxUsRJT-JFCU6oIt1Ua8LhKlQUspd4ks5rPoL7gaJpZM4LDJkv .

ElektrojungeAtWork commented 7 years ago

I'm closing this issue as we haven't heard from them and we have tested in-app-updates extensively.