wevote / WeVoteCordova

Cordova wrapper for the We Vote WebApp. Twitter: @WeVote
2 stars 6 forks source link

App crash in ios simulator when keyboard appears for AddressBox if ENABLE_FACEBOOK is true #89

Closed SailingSteve closed 5 years ago

SailingSteve commented 5 years ago

The crash is in the stack trace with last bit in our app in FacebookConnectPlugin

2018-11-05 12:42:44.254004-0800 WeVoteCordova[15006:5604446] STEVE ddddsdddd weakSelf.keyboardIsVisible = YES 2018-11-05 12:42:44.263568-0800 WeVoteCordova[15006:5604446] -[NSTaggedPointerString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0xad40cce38ff927af 2018-11-05 12:42:44.266612-0800 WeVoteCordova[15006:5604446] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0xad40cce38ff927af' First throw call stack: ( 0 CoreFoundation 0x000000010ef6c29b exceptionPreprocess + 331 1 libobjc.A.dylib 0x000000010e4da735 objc_exception_throw + 48 2 CoreFoundation 0x000000010ef8afa4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132 3 CoreFoundation 0x000000010ef70fb6 __forwarding + 1446 4 CoreFoundation 0x000000010ef72e88 _CF_forwarding_prep_0 + 120 5 WeVoteCordova 0x000000010d6b1eab -[FacebookConnectPlugin graphApi:] + 715 6 WeVoteCordova 0x000000010d6ca57c -[CDVCommandQueue execute:] + 892 7 WeVoteCordova 0x000000010d6c9dc2 -[CDVCommandQueue executePending] + 834 8 WeVoteCordova 0x000000010d6c02c1 40-[CDVCommandDelegateImpl evalJsHelper2:]_block_invoke + 321 9 WeVoteCordova 0x000000010d6ccebd -[CDVUIWebViewEngine evaluateJavaScript:completionHandler:] + 157 10 WeVoteCordova 0x000000010d6c0137 -[CDVCommandDelegateImpl evalJsHelper2:] + 215 11 Foundation 0x000000010df74e7b NSThreadPerformPerform + 330 12 CoreFoundation 0x000000010eecfb31 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 13 CoreFoundation 0x000000010eecf464 CFRunLoopDoSources0 + 436 14 CoreFoundation 0x000000010eec9a4f CFRunLoopRun + 1263 15 CoreFoundation 0x000000010eec9221 CFRunLoopRunSpecific + 625 16 GraphicsServices 0x0000000117aef1dd GSEventRunModal + 62 17 UIKitCore 0x000000011eab5115 UIApplicationMain + 140 18 WeVoteCordova 0x000000010d693811 main + 65 19 libdyld.dylib 0x00000001100ab551 start + 1 20 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

SailingSteve commented 5 years ago

I found the problem in FacebookActions.getFacebookPicture() by debugging into iOS, the api needs to receive an array of strings, and was throwing an uncaught exception. For some reason it is called when you click into the AddressBox.