Titanium WebView crash on load URL Scheme - titanium

I made a iPhone app using Titanium Studio.
and I used WebView component.
When javascript code execute like this, iPhone app crashes.
window.location = "urlscheme://page_loaded";
How should I avoid it?
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: source)'
[INFO] : *** First throw call stack:
[INFO] : (
[INFO] : 0 CoreFoundation 0x0488f1e4 __exceptionPreprocess + 180
[INFO] : 1 libobjc.A.dylib 0x043428e5 objc_exception_throw + 44
[INFO] : 2 CoreFoundation 0x04918eb8 -[__NSDictionaryM setObject:forKey:] + 888
[INFO] : 3 Appname 0x001fd8de -[TiApp application:openURL:sourceApplication:annotation:] + 318
[INFO] : 4 UIKit 0x018662f6 -[UIApplication _applicationOpenURL:payload:] + 318
[INFO] : 5 UIKit 0x0186634b -[UIApplication _applicationOpenURL:event:] + 51
[INFO] : 6 UIKit 0x01872095 -[UIApplication handleEvent:withNewEvent:] + 3776
[INFO] : 7 UIKit 0x01872555 -[UIApplication sendEvent:] + 85
[INFO] : 8 UIKit 0x0185f250 _UIApplicationHandleEvent + 683
[INFO] : 9 GraphicsServices 0x04aedf02 _PurpleEventCallback + 776
[INFO] : 10 GraphicsServices 0x04aeda0d PurpleEventCallback + 46
[INFO] : 11 CoreFoundation 0x0480aca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
[INFO] : 12 CoreFoundation 0x0480a9db __CFRunLoopDoSource1 + 523
[INFO] : 13 CoreFoundation 0x0483568c __CFRunLoopRun + 2156
[INFO] : 14 CoreFoundation 0x048349d3 CFRunLoopRunSpecific + 467
[INFO] : 15 CoreFoundation 0x048347eb CFRunLoopRunInMode + 123
[INFO] : 16 GraphicsServices 0x04aec5ee GSEventRunModal + 192
[INFO] : 17 GraphicsServices 0x04aec42b GSEventRun + 104
[INFO] : 18 UIKit 0x0185ef9b UIApplicationMain + 1225
[INFO] : 19 Appname 0x00003348 main + 456
[INFO] : 20 libdyld.dylib 0x0512e725 start + 0
[INFO] : )
[INFO] : libc++abi.dylib: terminating with uncaught exception of type NSException
Environment:
iOS Simulator Version 7.1 (463.9.41)
Xcode Version 5.1 (5B130a)
Titanium Studio, build: 3.2.1.201402041146 sdk-version : 3.2.2.GA
Build: jenkins-titanium-rcp-master-95 (origin/master)

Related

Getting error message when run react-native application on Xcode 10.0

I am new for IOS application development I am trying to run react native application on MAC (Virtual box) but stuck after launch screen.
Getting error at this line of code.
showing below message on report navigator.
2018-09-26 05:03:23.637243+0530 Leaderboard[56620:700325] - [I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2018-09-26 05:03:24.334073+0530 Leaderboard[56620:699937] +[CATransaction synchronize] called within transaction
2018-09-26 05:03:25.352 [info][tid:main][RCTCxxBridge.mm:216] Initializing (parent: , executor: (null))
2018-09-26 05:03:25.385767+0530 Leaderboard[56620:699937] Initializing (parent: , executor: (null))
2018-09-26 05:03:25.749 [info][tid:main][RCTRootView.m:293] Running application Leaderboard ({
initialProps = {
};
rootTag = 1;
})
2018-09-26 05:03:25.831679+0530 Leaderboard[56620:699937] Running application Leaderboard ({
initialProps = {
};
rootTag = 1;
})
2018-09-26 05:03:26.353502+0530 Leaderboard[56620:699937] * Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure]; (FirebaseApp.configure() in Swift) could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.'
* First throw call stack:
(
0 CoreFoundation 0x00000001052a91e6 exceptionPreprocess + 294
1 libobjc.A.dylib 0x000000010371e031 objc_exception_throw + 48
2 CoreFoundation 0x000000010531e975 +[NSException raise:format:] + 197
3 Leaderboard 0x0000000101e80451 +[FIRApp configure] + 481
4 Leaderboard 0x0000000101e7fb07 -[AppDelegate application:didFinishLaunchingWithOptions:] + 871
5 UIKit 0x0000000107ee96fb -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 278
6 UIKit 0x0000000107eeb172 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4123
7 UIKit 0x0000000107ef05cb -[UIApplication _runWithMainScene:transitionContext:completion:] + 1677
8 UIKit 0x00000001082b2f7e __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
9 UIKit 0x0000000108685a39 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
10 UIKit 0x00000001082b2bba -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 236
11 UIKit 0x00000001082b33db -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 675
12 UIKit 0x0000000108c24614 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 299
13 UIKit 0x0000000108c244ae -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 433
14 UIKit 0x000000010890875d __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 221
15 UIKit 0x0000000108b034b7 _performActionsWithDelayForTransitionContext + 100
16 UIKit 0x0000000108908627 -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 223
17 UIKit 0x00000001086850e0 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
18 UIKit 0x0000000107eeeeac -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
19 UIKit 0x00000001084c1bcb -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
20 FrontBoardServices 0x000000010e05a2f3 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 331
21 FrontBoardServices 0x000000010e062cfa __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 225
22 libdispatch.dylib 0x000000010695a7ec _dispatch_client_callout + 8
23 libdispatch.dylib 0x000000010695fdb8 _dispatch_block_invoke_direct + 592
24 FrontBoardServices 0x000000010e08e470 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24
25 FrontBoardServices 0x000000010e08e12e -[FBSSerialQueue _performNext] + 439
26 FrontBoardServices 0x000000010e08e68e -[FBSSerialQueue _performNextFromRunLoopSource] + 45
27 CoreFoundation 0x000000010524bbb1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
28 CoreFoundation 0x00000001052304af __CFRunLoopDoSources0 + 271
29 CoreFoundation 0x000000010522fa6f __CFRunLoopRun + 1263
30 CoreFoundation 0x000000010522f30b CFRunLoopRunSpecific + 635
31 GraphicsServices 0x000000010d42ea73 GSEventRunModal + 62
32 UIKit 0x0000000107ef2057 UIApplicationMain + 159
33 Leaderboard 0x0000000101e7fc90 main + 112
34 libdyld.dylib 0x000000010a98c955 start + 1
35 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
If you want to use Firebase in your project, you should create an app from Firebase console and configure it. Then you should download GoogleService-Info.plist and copy to your project. You can clearly see this on your error logs.
Please follow this tutorial: https://firebase.google.com/docs/ios/setup

App crashing from ipa file but run from xcode

My app is crashing from ipa file. This is my console log. I am using firebase in this project? I can not figure out the problem. Is it arising for firebase or other causes?
Version: 3.5 (3.5)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Date/Time: 2018-05-07 14:00:50.9291 +0600
Launch Time: 2018-05-07 14:00:50.7374 +0600
OS Version: iPhone OS 11.2.1 (15C153)
Baseband Version: 4.30.02
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Application Specific Information:
abort() called
Filtered syslog:
None found
Last Exception Backtrace:
0 CoreFoundation 0x1823be364 __exceptionPreprocess + 124
1 libobjc.A.dylib 0x181604528 objc_exception_throw + 55
2 CoreFoundation 0x1823be2ac +[NSException raise:format:] + 115
3 Photo 0x1049f62e0 _h`enter code here`idden#57437_ + 171
4 Photo 0x1049f60a4 _hidden#57435_ + 383
5 Photo 0x1049f5e44 _hidden#57433_ + 359
6 CoreFoundation 0x18235033c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 19
7 CoreFoundation 0x18234f8dc _CFXRegistrationPost + 419
8 CoreFoundation 0x18234f640 ___CFXNotificationPost_block_invoke + 59
9 CoreFoundation 0x1823cd024 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1407
10 CoreFoundation 0x182285f60 _CFXNotificationPost + 379
11 Foundation 0x182cb3348 -[NSNotificationCenter postNotificationName:object:userInfo:] + 67
12 Photo 0x104973d30 _hidden#53366_ + 387
13 Photo 0x104972bdc _hidden#53351_ + 287
14 Photo 0x104972a10 _hidden#53349_ + 391
15 Photo 0x1047056e8 _hidden#31344_ + 3348200 (__hidden#31777_:205)
16 UIKit 0x18b90e37c -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 383
17 UIKit 0x18baffc58 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3435
18 UIKit 0x18bb04aa8 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1711
19 UIKit 0x18bda02d4 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 799
20 UIKit 0x18c07812c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 159
21 UIKit 0x18bd9ff38 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 251
22 UIKit 0x18bda0798 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 731
23 UIKit 0x18c5257d0 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 259
How to solve this problem. Please help.

#try/#catch doesn't catch exception

After upgrading Xcode from 6.0 to 6.3, I noticed my automated tests started failing.
2015-04-14 18:56:50.625 xctest[48304:517820] *** Terminating app due to uncaught exception 'foo', reason: 'bar'
*** First throw call stack:
(
0 CoreFoundation 0x0084a746 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x004d3a97 objc_exception_throw + 44
2 CoreFoundation 0x0084a66d +[NSException raise:format:] + 141
3 TestTests 0x03e6dbdc -[TestTest test] + 810
4 CoreFoundation 0x0072b84d __invoking___ + 29
5 CoreFoundation 0x0072b6f8 -[NSInvocation invoke] + 360
6 XCTest 0x20108975 -[XCTestCase invokeTest] + 320
7 XCTest 0x20108baa -[XCTestCase performTest:] + 175
8 XCTest 0x20114122 -[XCTest run] + 314
9 XCTest 0x20107598 -[XCTestSuite performTest:] + 406
10 XCTest 0x20114122 -[XCTest run] + 314
11 XCTest 0x20107598 -[XCTestSuite performTest:] + 406
12 XCTest 0x20114122 -[XCTest run] + 314
13 XCTest 0x20107598 -[XCTestSuite performTest:] + 406
14 XCTest 0x20114122 -[XCTest run] + 314
15 XCTest 0x20103df2 __25-[XCTestDriver _runSuite]_block_invoke + 61
16 XCTest 0x20110c42 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 184
17 XCTest 0x20103d16 -[XCTestDriver _runSuite] + 285
18 XCTest 0x20104961 -[XCTestDriver _checkForTestManager] + 272
19 XCTest 0x20104c79 -[XCTestDriver runTestSuite:completionHandler:] + 376
20 XCTest 0x2011772c +[XCTestProbe runTests:] + 216
21 libobjc.A.dylib 0x004e967e +[NSObject performSelector:withObject:] + 70
22 xctest 0x0000823a xctest + 4666
23 xctest 0x000084b0 xctest + 5296
24 xctest 0x00008591 xctest + 5521
25 xctest 0x00007e3d xctest + 3645
26 libdyld.dylib 0x019d4ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
After further investigation it appears exceptions are now uncatchable. Both these snippets would cause this error.
XCTAssertThrows([NSException raise:#"foo" format:#"bar"]);
and
#try {
[NSException raise:#"foo" format:#"bar"];
}
#catch (NSException *ex) {
NSLog(#"caught");
}
After a VCS force clean sync and rebuild everything looked fine, but then the same failure started in a couple of builds time. Does anyone have any ideas?
Following the developer forums, this appears to be a bug or oversight in the developer tools that introduced an incompatibility with binaries built with older versions of the tools.
Should be fixed in Xcode 6.4

Worklight Native iOS App terminating with NSRangeException a few minutes after successful connect

I'm using Worklight 6.0.0.1 + 9-26 iFix.
A few minutes after a successful call to do a Worklight Connect, our app crashes with this error which looks like it may involve a JSON parsing problem from Worklight:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '-[__NSCFConstantString substringWithRange:]: Range {2147483647, 1} out of bounds; string length 0'
*** First throw call stack:
(
0 CoreFoundation 0x021615e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01ee48b6 objc_exception_throw + 44
2 CoreFoundation 0x021613bb +[NSException raise:format:] + 139
3 CoreFoundation 0x0213a5e8 -[__NSCFString substringWithRange:] + 136
4 MyApp 0x00036546 +[WLUtils parseJSONString:] + 230
5 MyApp 0x00032447 -[WLRequest requestFinished:] + 167
6 libobjc.A.dylib 0x01ef681f -[NSObject performSelector:withObject:] + 70
7 MyApp 0x00058a1b -[ASIHTTPRequest reportFinished] + 171
8 libobjc.A.dylib 0x01ef681f -[NSObject performSelector:withObject:] + 70
9 Foundation 0x01b39c18 __NSThreadPerformPerform + 285
10 CoreFoundation 0x020ea8af __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
11 CoreFoundation 0x020ea23b __CFRunLoopDoSources0 + 235
12 CoreFoundation 0x0210730e __CFRunLoopRun + 910
13 CoreFoundation 0x02106b33 CFRunLoopRunSpecific + 467
14 CoreFoundation 0x0210694b CFRunLoopRunInMode + 123
15 GraphicsServices 0x0337f9d7 GSEventRunModal + 192
16 GraphicsServices 0x0337f7fe GSEventRun + 104
17 UIKit 0x00c5794b UIApplicationMain + 1225
18 MyApp 0x0000b9ad main + 141
19 libdyld.dylib 0x02abd725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
We're doing the connect like this and getting a success response:
MyConnectListener *connectListener = [[MyConnectListener alloc] init];
[[WLClient sharedInstance] wlConnectWithDelegate:connectListener];
MyConnectListener implements WLDelegate
MyConnectListener.m:
-(void)onSuccess:(WLResponse *)response
{
NSLog(#"Connection Success: %#", response);
}
-(void)onFailure:(WLFailResponse *)response
{
NSLog(#"Connection failure: %#", response);
}
Any idea how to solve this?
This has been logged as a defect and will be fixed in a future release. The current workaround is to disable the heartbeat functionality using the following syntax:
[[WLClient sharedInstance] setHeartBeatInterval:-1];

App works on iPhone Simulator, but crashes on real iPhone Device

Today i tried running my app on my iPhone device, and it crashed! It worked perfectly fine on the simulator, I don't know what the problem is.
These are the crash logs:
Identifier: Evader
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-09-13 16:41:54.656 -0700
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x377d888f __exceptionPreprocess + 163
1 libobjc.A.dylib 0x354dd259 objc_exception_throw + 33
2 CoreFoundation 0x377d8789 +[NSException raise:format:] + 1
3 Foundation 0x380173a3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 91
4 Evader 0x0012ca41 -[CCSprite initWithTexture:] (CCSprite.m:192)
5 Evader 0x0012c1b1 +[CCSprite spriteWithTexture:] (CCSprite.m:83)
6 Evader 0x0011eb3d -[CCProgressTimer initWithTexture:] (CCProgressTimer.m:69)
7 Evader 0x0011ea55 -[CCProgressTimer initWithFile:] (CCProgressTimer.m:59)
8 Evader 0x0011e9e1 +[CCProgressTimer progressWithFile:] (CCProgressTimer.m:55)
9 Evader 0x00173579 -[HelloWorldLayer lives] (HelloWorldLayer.m:256)
10 Evader 0x001723ed -[HelloWorldLayer init] (HelloWorldLayer.m:101)
11 Evader 0x0010f073 +[CCNode node] (CCNode.m:258)
12 Evader 0x0017bd11 -[StartMenu doThis:] (StartMenu.m:75)
13 CoreFoundation 0x377db7e4 __invoking___ + 68
14 CoreFoundation 0x377367b1 -[NSInvocation invoke] + 161
15 Evader 0x0010aa03 -[CCMenuItem activate] (CCMenuItem.m:129)
16 Evader 0x001085ff -[CCMenu ccTouchEnded:withEvent:] (CCMenu.m:198)
17 CoreFoundation 0x377323fd -[NSObject performSelector:withObject:withObject:] + 53
18 Evader 0x0014f4ff -[CCTouchDispatcher touches:withEvent:withTouchType:] (CCTouchDispatcher.m:268)
19 Evader 0x0014fc43 -[CCTouchDispatcher touchesEnded:withEvent:] (CCTouchDispatcher.m:338)
20 Evader 0x001515c3 -[EAGLView touchesEnded:withEvent:] (EAGLView.m:332)
21 UIKit 0x314c692b -[UIWindow _sendTouchesForEvent:] + 319
22 UIKit 0x314c6319 -[UIWindow sendEvent:] + 381
23 UIKit 0x314ac695 -[UIApplication sendEvent:] + 357
24 UIKit 0x314abf3b _UIApplicationHandleEvent + 5827
25 GraphicsServices 0x33eee22b PurpleEventCallback + 883
26 CoreFoundation 0x377ac523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 39
27 CoreFoundation 0x377ac4c5 __CFRunLoopDoSource1 + 141
28 CoreFoundation 0x377ab313 __CFRunLoopRun + 1371
29 CoreFoundation 0x3772e4a5 CFRunLoopRunSpecific + 301
30 CoreFoundation 0x3772e36d CFRunLoopRunInMode + 105
31 GraphicsServices 0x33eed439 GSEventRunModal + 137
32 UIKit 0x314dacd5 UIApplicationMain + 1081
33 Evader 0x00171029 main (main.m:14)
34 Evader 0x000dec68 start + 40
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3198f32c __pthread_kill + 8
1 libsystem_c.dylib 0x3408c208 pthread_kill + 48
2 libsystem_c.dylib 0x34085298 abort + 88
3 libc++abi.dylib 0x36f12f64 abort_message + 40
4 libc++abi.dylib 0x36f10346 _ZL17default_terminatev + 18
5 libobjc.A.dylib 0x354dd350 _objc_terminate + 140
6 libc++abi.dylib 0x36f103be _ZL19safe_handler_callerPFvvE + 70
7 libc++abi.dylib 0x36f1044a std::terminate() + 14
8 libc++abi.dylib 0x36f1181e __cxa_rethrow + 82
9 libobjc.A.dylib 0x354dd2a2 objc_exception_rethrow + 6
10 CoreFoundation 0x3772e506 CFRunLoopRunSpecific + 398
11 CoreFoundation 0x3772e366 CFRunLoopRunInMode + 98
12 GraphicsServices 0x33eed432 GSEventRunModal + 130
13 UIKit 0x314dacce UIApplicationMain + 1074
14 Evader 0x00171022 main (main.m:14)
15 Evader 0x000dec60 start + 32
I have tried to look for the error, but I do not know what to look for. Can someone help solve this problem?
CCSprite initWithTexture: raises the exception that causes your app to exit. I'm not entirely up on Cocos2d but a quick check in the documentation suggests it raises exceptions on failure to find named files.
That being the case, I'd guess the problem is simply one of filename case. Macs are by default case insensitive. So if you have FunnyImage.png then the simulator will succeed if you attempt to load funnyimage.png.
iOS devices are case sensitive. So it will fail if you attempt to load funnyimage.png.
So probably what you want to do is check that all the filenames you've used in code exactly match the case of the actual files.