[TIMOB-20283] Facebook iOS Module 5.0.0 crashes on resume on iOS 8.4
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-01-31T05:33:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.2.0 |
Components | iOS |
Labels | qe-5.2.0, regression |
Reporter | Ganna Kozynenko |
Assignee | Hans Knöchel |
Created | 2016-01-26T14:37:09.000+0000 |
Updated | 2016-02-02T22:20:30.000+0000 |
Description
The new version of FB module 5.0.0 crashes on iOS 8.4
When the module is connected as described (app id and everything), and there is only a require and no other fb-related javascript code, the app crashes on resume on iOS 8.4. On iOS 9, it does not happen.
From what I have figured out, the crash source is in this line:
NSString* annotation = [launchOptions objectForKey:UIApplicationOpenURLOptionsAnnotationKey];
Update: as it has been proven yesterday, mysterious crashes on startup on the device of my coworker were also due to this bug. After I wrapped it into "version more than 9.0" statement, the crashes were fixed
Hello, I have this issue ongoing as well (duplicate ticket - now closed). Crashes with Seg Fault 11 when this occurs (log is from iOS system level):
May I know which Ti SDK Version is being used?
I've made a pull request regarding this here: https://github.com/appcelerator-modules/ti.facebook/pull/41 It fixed it at least in my specific use case (using the module for login + share on iOS 8, 9). The webpage to sign the Appcelerator CLA doesn't work for me somehow. EDIT: Ti SDK 5.1.2
Yes, I used the latest SDK, 5.1.2 ------ My quick fix is dumb, this is why I did not make any pull request. I am not 100% sure what information comes in the "annotation" string, so I just skipped that statement for IOS less than 9.0, and it just works (so that my app does not crash right now in this release) We only use statistics from FB, and it does send install statistics even without annotation.
The CLA works in the incognito window, there is some bug with browser cache
Sorry about the CLA issue. We are looking into that. And thanks for the PR! will take a look!
About pull request. I am not Appc employee, but I kinda object to replacing a constant with a string of the same name. It was not crashing on 9.x, and unless the constant is equal to a string on 9.x (which I don't know, I did not find any such information in the docs), it is going to lose the information from annotation variable on 9.x Wrap it into statement that it's only for the systems lesser than 9.x please
That sounds like a good idea, I'll do that now.
Hey there! I cherry-picked the community PR of [~adipa] because of continuing problems with the CLA server. PR (appcelerator_modules/ti.facebook): https://github.com/appcelerator-modules/ti.facebook/pull/42 PR (titlanium_mobile/master): https://github.com/appcelerator/titanium_mobile/pull/7650 PR (titlanium_mobile/5_2_X): https://github.com/appcelerator/titanium_mobile/pull/7651
[~hansknoechel] cool. go ahead to merge and resolve.
Thanks for the taking the time out of your weekends to look into this. Appreciate it very much.
Verified as fixed, Facebook Module 5.0.1 with the latest SDK
5.2.0.v20160131224748
no longer crashes on iOS 8.4 Devices. iPhone 6s Plus Device (9.2) & iPhone 6 Plus Device (8.4) Mac OSX El Capitan 10.11 (15A284) Ti SDK: 5.2.0.v20160131224748 Appc Studio: 4.5.0.201601262138 Appc NPM: 4.2.3-1 App CLI: 5.2.0-238 Xcode 7.2 Node v4.2.3 *Closing Ticket.*