I want to create a worksheet for adding/subtracting integers. When I run the script I would like the integers to randomly repopulate in two different columns along with the operation(addition/subtraction) in a middle column. Help please :)
24 Lines of Problems
function operatorsandintegers() {
const ss = SpreadsheetApp.getActive();
const sh = ss.getSheetByName("Sheet0");
const ops = ["-","+","*","/"];
sh.clearContents();
let vs = [...Array.from(new Array(24).keys(),x => [Math.floor(Math.random() * 100),ops[Math.floor(Math.random() * 4)],Math.floor(Math.random() * 100),''])];
vs.unshift(["Operand1","Operation","Operand2","result"]);
sh.getRange(1,1,vs.length, vs[0].length).setValues(vs);
}
Operand1
Operation
Operand2
result
1
-
74
17
/
66
14
+
89
76
+
2
72
/
27
42
+
85
34
*
62
50
+
80
33
-
40
61
*
34
30
/
66
98
/
69
27
-
26
74
-
15
44
*
14
66
-
42
43
/
64
96
-
83
52
-
29
17
+
77
30
+
34
31
/
31
26
+
67
53
+
68
Correct answers
function correctanswers() {
const ss = SpreadsheetApp.getActive();
const sh = ss.getSheetByName("Sheet0");
var vs = sh.getRange(2,1,sh.getLastRow() - 1,sh.getLastColumn()).getValues();
const ops = ["-","+","*","/"];
let r = vs.map(r => {
let idx = ops.indexOf(r[1]);
if(~idx) {
switch(idx) {
case 0:
return [r[0] - r[2]];
break;
case 1:
return [r[0] + r[2]];
break;
case 2:
return [r[0] * r[2]];
break;
case 3:
return [r[0]/r[2]];
break;
}
}
})
sh.getRange(2,4,r.length).setValues(r);
}
Operand1
Operation
Operand2
result
1
-
74
-73
17
/
66
0.2575757576
14
+
89
103
76
+
2
78
72
/
27
2.666666667
42
+
85
127
34
*
62
2108
50
+
80
130
33
-
40
-7
61
*
34
2074
30
/
66
0.4545454545
98
/
69
1.420289855
27
-
26
1
74
-
15
59
44
*
14
616
66
-
42
24
43
/
64
0.671875
96
-
83
13
52
-
29
23
17
+
77
94
30
+
34
64
31
/
31
1
26
+
67
93
53
+
68
121
I am integrating Google's IMA3 SDk on TVOS9. as per sample app, I have integrated the as per the sample code https://github.com/googleads/googleads-ima-ios/releases.
but I am getting following error :
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteNotification imaMessage]: unrecognized selector sent to instance 0x7f823a8886d0'
and the stack
*** First throw call stack:
(
0 CoreFoundation 0x000000010ce2aff5 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010c22cdeb objc_exception_throw + 48
2 CoreFoundation 0x000000010ce3361d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010cd80a9a ___forwarding___ + 970
4 CoreFoundation 0x000000010cd80648 _CF_forwarding_prep_0 + 120
5 App 0x000000010af420f1 -[IMAJavascriptBridge handleMessageInitialized:] + 157
6 CoreFoundation 0x000000010cdf782c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
7 CoreFoundation 0x000000010cdf756b _CFXRegistrationPost + 427
8 CoreFoundation 0x000000010cdf72d2 ___CFXNotificationPost_block_invoke + 50
9 CoreFoundation 0x000000010ce3cb02 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1986
10 CoreFoundation 0x000000010ccf2409 _CFXNotificationPost + 633
11 Foundation 0x000000010bdba259 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
12 App 0x000000010af43c72 -[IMAJavascriptSession didReceiveMessage:] + 304
13 App 0x000000010af43008 -[IMAJavascriptDispatcher processNewMessage:] + 310
14 App 0x000000010af42bcb -[IMAJavascriptDispatcher processNewMessageWithChannelName:data:] + 144
15 App 0x000000010af42633 -[IMAJavascriptBridge webView:didReceiveMessage:] + 165
16 App 0x000000010af5a8f9 -[IMAWKWebView userContentController:didReceiveScriptMessage:] + 164
17 WebKit 0x000000010f311ced _ZN28ScriptMessageHandlerDelegate14didPostMessageERN6WebKit12WebPageProxyERNS0_13WebFrameProxyERKNS0_18SecurityOriginDataERN7WebCore21SerializedScriptValueE + 217
18 WebKit 0x000000010f2c2b73 _ZN6WebKit29WebUserContentControllerProxy14didPostMessageERN3IPC10ConnectionEyyRKNS_18SecurityOriginDataEyRKNS1_13DataReferenceE + 221
19 WebKit 0x000000010f2c4868 _ZN3IPC13handleMessageIN8Messages29WebUserContentControllerProxy14DidPostMessageEN6WebKit29WebUserContentControllerProxyEMS5_FvRNS_10ConnectionEyyRKNS4_18SecurityOriginDataEyRKNS_13DataReferenceEEEEvS7_RNS_14MessageDecoderEPT0_T1_ + 142
20 WebKit 0x000000010f1239e5 _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_14MessageDecoderE + 113
21 WebKit 0x000000010f2a6210 _ZN6WebKit15WebProcessProxy17didReceiveMessageERN3IPC10ConnectionERNS1_14MessageDecoderE + 24
22 WebKit 0x000000010f0e191a _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_14MessageDecoderENS1_14default_deleteIS3_EEEE + 102
23 WebKit 0x000000010f0e3be2 _ZN3IPC10Connection18dispatchOneMessageEv + 114
24 JavaScriptCore 0x000000010bab0ad5 _ZN3WTF7RunLoop11performWorkEv + 437
25 JavaScriptCore 0x000000010bab11b2 _ZN3WTF7RunLoop11performWorkEPv + 34
26 CoreFoundation 0x000000010cd56bc1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
27 CoreFoundation 0x000000010cd4caec __CFRunLoopDoSources0 + 556
28 CoreFoundation 0x000000010cd4bfa3 __CFRunLoopRun + 867
29 CoreFoundation 0x000000010cd4b9b8 CFRunLoopRunSpecific + 488
30 GraphicsServices 0x0000000110bcdad2 GSEventRunModal + 161
31 UIKit 0x000000010db9c8fc UIApplicationMain + 171
32 App 0x000000010af35b2d main + 109
33 libdyld.dylib 0x00000001107a99e9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
AFAIK Google IMA depends on WebKit which does not exist on tvOS, so you cannot use this on tvOS yet. Google will need to release a build specifically for tvOS...
So far, three systems I manage have become unable to allow users to log on. We use a PolicyBanner file (and have been doing so for months or years on dozens of Macs, and yes we've tried deleting /Library/Security/PolicyBanner.rtf from problem machines), and these systems get stuck there… hit the Accept button, and instead of being taken to a login screen, the system churns for a moment and returns them to the banner. We've tried most or all of the usual suspects, and the only "solution" has been to restore an older Time Machine backup.
All three systems in question run 10.8.2 One is an iMac12,2, one is a MacBook Pro, and one is a bigger tower Mac (can't log in to it right now) The only vague possibility I can come up with is, I'm a huge believer in doing as much from the command line as possible… I've scripted a number of things, including updating Java, Adobe Reader, MS Office, etc. I suppose it's possible that installing one or more patches from the shell introduces some weird issue that 99.9% of Mac users would never see. I have another MacBook Pro running 10.8.2 which has not manifested this issue, another macBook Pro running 10.7.5 that has not, and another older MacBook somewhere that I never see online or hear from the user :-)
Another data point... on systems with File Vault enabled, a user who boots the machine and unlocks the disk winds up being logged in. They see the PolicyBanner, are prompted for their Apple ID, and then get a message about how there was some problem, do they want to open applications that were open before. Once they're logged in, if they log out, the system is stuck at the banner again.
So, here's the system.log output. Crash report put me over the 30K character limit but I'd be happy to provide it.
Feb 14 14:12:05 sahara SecurityAgent[1452]: MacBuddy was run = 0
Feb 14 14:12:05 sahara SecurityAgent[1452]: *** WARNING: -[NSImage compositeToPoint:operation:fraction:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.
Feb 14 14:12:05 sahara SecurityAgent[1452]: *** WARNING: -[NSImage compositeToPoint:fromRect:operation:fraction:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.
Feb 14 14:12:05 sahara SecurityAgent[1452]: *** WARNING: -[NSImage compositeToPoint:operation:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.
Feb 14 14:12:05 sahara SecurityAgent[1452]: *** WARNING: -[NSImage compositeToPoint:fromRect:operation:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.
Feb 14 14:12:05 sahara SecurityAgent[1452]: -[__NSCFString bytes]: unrecognized selector sent to instance 0x7fdc61222c40
Feb 14 14:12:05 sahara SecurityAgent[1452]: NSExceptionHandler has recorded the following exception:
NSInvalidArgumentException -- -[__NSCFString bytes]: unrecognized selector sent to instance 0x7fdc61222c40
Stack trace: 0x1057a5637 0x7fff8ac183f0 0x7fff8f0f06ea 0x7fff8f0485ce 0x7fff8f0483b8 0x7fff8b40ce8f 0x7fff90b521b4 0x7fff9109d18a 0x10594d919 0x10595c10e 0x7fff910a36cb 0x7fff910a1767 0x7fff910a141c 0x7fff8e3de29d 0x7fff8f052a46 0x7fff8e3ddfdd 0x7fff8e3de29d 0x7fff8f052a46 0x7fff8e3ddfdd 0x7fff8e468b75 0x7fff8e3de29d 0x7fff8f052a46 0x7fff8e3ddfdd 0x7fff8e3de29d 0x7fff8f052a46 0x7fff8e3ddfdd 0x7fff8e3de29d 0x7fff8f052a46 0x7fff8e3ddfdd 0x7fff8e3de29d 0x7fff8f052a46 0x7fff8e3ddfdd 0x7fff8e3dd634 0x7fff8e3a9a61 0x7fff8e533f44 0x7fff8e466b18 0x7fff8e466138 0x7fff8e465d1f 0x7fff9108d0c5 0x105959e50 0x105948a94 0x7fff8c879a2d 0x7fff8c8740b6 0x7fff8c8790c8 0x7fff8effc0fe 0x7fff8effb6b2 0x7fff8cae00a4 0x7fff8cadfe42 0x7fff8cadfcd3 0x7fff8e3a6613 0x7fff8e3a5ed2 0x7fff8e39d283 0x10577c544 0x7fff878ac7e1 0x1
Feb 14 14:12:05 sahara SecurityAgent[1452]: An uncaught exception was raised
Feb 14 14:12:05 sahara SecurityAgent[1452]: -[__NSCFString bytes]: unrecognized selector sent to instance 0x7fdc61222c40
Feb 14 14:12:05 sahara SecurityAgent[1452]: (
0 CoreFoundation 0x00007fff8f05a0a6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8ac183f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8f0f06ea -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
3 CoreFoundation 0x00007fff8f0485ce ___forwarding___ + 414
4 CoreFoundation 0x00007fff8f0483b8 _CF_forwarding_prep_0 + 232
5 CoreGraphics 0x00007fff8b40ce8f CGDataProviderCreateWithCFData + 133
6 LoginUICore 0x00007fff90b521b4 LUICreateImageFromJPEGData + 12
7 LoginUIKit 0x00007fff9109d18a +[NSImage(LUIHelpers) imageForUserFromJPEGData:avatarType:] + 69
8 loginwindow 0x000000010594d919 APMechanismSetResult + 31889
9 loginwindow 0x000000010595c10e UserListOfUserWithPrimaryGroupGUID + 44376
10 LoginUIKit 0x00007fff910a36cb -[LUIUserListViewController stripView:itemForColumn:] + 525
11 LoginUIKit 0x00007fff910a1767 -[LUIStripView loadItemsForView] + 635
12 LoginUIKit 0x00007fff910a141c -[LUIStripView viewWillDraw] + 160
13 AppKit 0x00007fff8e3de29d __22-[NSView viewWillDraw]_block_invoke_0 + 307
14 CoreFoundation 0x00007fff8f052a46 __NSArrayEnumerate + 582
15 AppKit 0x00007fff8e3ddfdd -[NSView viewWillDraw] + 244
16 AppKit 0x00007fff8e3de29d __22-[NSView viewWillDraw]_block_invoke_0 + 307
17 CoreFoundation 0x00007fff8f052a46 __NSArrayEnumerate + 582
18 AppKit 0x00007fff8e3ddfdd -[NSView viewWillDraw] + 244
19 AppKit 0x00007fff8e468b75 -[NSScrollView viewWillDraw] + 45
20 AppKit 0x00007fff8e3de29d __22-[NSView viewWillDraw]_block_invoke_0 + 307
21 CoreFoundation 0x00007fff8f052a46 __NSArrayEnumerate + 582
22 AppKit 0x00007fff8e3ddfdd -[NSView viewWillDraw] + 244
23 AppKit 0x00007fff8e3de29d __22-[NSView viewWillDraw]_block_invoke_0 + 307
24 CoreFoundation 0x00007fff8f052a46 __NSArrayEnumerate + 582
25 AppKit 0x00007fff8e3ddfdd -[NSView viewWillDraw] + 244
26 AppKit 0x00007fff8e3de29d __22-[NSView viewWillDraw]_block_invoke_0 + 307
27 CoreFoundation 0x00007fff8f052a46 __NSArrayEnumerate + 582
28 AppKit 0x00007fff8e3ddfdd -[NSView viewWillDraw] + 244
29 AppKit 0x00007fff8e3de29d __22-[NSView viewWillDraw]_block_invoke_0 + 307
30 CoreFoundation 0x00007fff8f052a46 __NSArrayEnumerate + 582
31 AppKit 0x00007fff8e3ddfdd -[NSView viewWillDraw] + 244
32 AppKit 0x00007fff8e3dd634 -[NSView _sendViewWillDrawInRect:clipRootView:] + 1525
33 AppKit 0x00007fff8e3a9a61 -[NSView displayIfNeeded] + 1044
34 AppKit 0x00007fff8e533f44 -[NSNextStepFrame displayIfNeeded] + 84
35 AppKit 0x00007fff8e466b18 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 1377
36 AppKit 0x00007fff8e466138 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 940
37 AppKit 0x00007fff8e465d1f -[NSWindow orderWindow:relativeTo:] + 159
38 LoginUIKit 0x00007fff9108d0c5 -[LUIWindowController showWindow] + 498
39 loginwindow 0x0000000105959e50 UserListOfUserWithPrimaryGroupGUID + 35482
40 loginwindow 0x0000000105948a94 APMechanismSetResult + 11788
41 libdispatch.dylib 0x00007fff8c879a2d _dispatch_barrier_sync_f_slow_invoke + 77
42 libdispatch.dylib 0x00007fff8c8740b6 _dispatch_client_callout + 8
43 libdispatch.dylib 0x00007fff8c8790c8 _dispatch_main_queue_callback_4CF + 275
44 CoreFoundation 0x00007fff8effc0fe __CFRunLoopRun + 1614
45 CoreFoundation 0x00007fff8effb6b2 CFRunLoopRunSpecific + 290
46 HIToolbox 0x00007fff8cae00a4 RunCurrentEventLoopInMode + 209
47 HIToolbox 0x00007fff8cadfe42 ReceiveNextEventCommon + 356
48 HIToolbox 0x00007fff8cadfcd3 BlockUntilNextEventMatchingListInMode + 62
49 AppKit 0x00007fff8e3a6613 _DPSNextEvent + 685
50 AppKit 0x00007fff8e3a5ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
51 AppKit 0x00007fff8e39d283 -[NSApplication run] + 517
52 SecurityAgent 0x000000010577c544 SecurityAgent + 70980
53 libdyld.dylib 0x00007fff878ac7e1 start + 0
54 ??? 0x0000000000000001 0x0 + 1
)
Feb 14 14:12:05 sahara SecurityAgent[1452]: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString bytes]: unrecognized selector sent to instance 0x7fdc61222c40'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff8f05a0a6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8ac183f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8f0f06ea -[NSObject(NSObject) doesNotRecognizeSelector:] + 186
3 CoreFoundation 0x00007fff8f0485ce ___forwarding___ + 414
4 CoreFoundation 0x00007fff8f0483b8 _CF_forwarding_prep_0 + 232
5 CoreGraphics 0x00007fff8b40ce8f CGDataProviderCreateWithCFData + 133
6 LoginUICore 0x00007fff90b521b4 LUICreateImageFromJPEGData + 12
7 LoginUIKit 0x00007fff9109d18a +[NSImage(LUIHelpers) imageForUserFromJPEGData:avatarType:] + 69
8 loginwindow 0x000000010594d919 APMechanismSetResult + 31889
9 loginwindow 0x000000010595c10e UserListOfUserWithPrimaryGroupGUID + 44376
10 LoginUIKit 0x00007fff910a36cb -[LUIUserListViewController stripView:itemForColumn:] + 525
11 LoginUIKit 0x00007fff910a1767 -[LUIStripView loadItemsForView] + 635
12 LoginUIKit 0x00007fff910a141c -[LUIStripView viewWillDraw] + 160
13 AppKit 0x00007fff8e3de29d __22-[NSView viewWillDraw]_block_invoke_0 + 307
14 CoreFoundation 0x00007fff8f052a46 __NSArrayEnumerate + 582
15 AppKit 0x00007fff8e3ddfdd -[NSView viewWillDraw] + 244
16 AppKit 0x00007fff8e3de29d __22-[NSView viewWillDraw]_block_invoke_0 + 307
17 CoreFoundation 0x00007fff8f052a46 __NSArrayEnumerate + 582
18 AppKit 0x00007fff8e3ddfdd -[NSView viewWillDraw] + 244
19 AppKit 0x00007fff8e468b75 -[NSScrollView viewWillDraw] + 45
20 AppKit 0x00007fff8e3de29d __22-[NSView viewWillDraw]_block_invoke_0 + 307
21 CoreFoundation 0x00007fff8f052a46 __NSArrayEnumerate + 582
22 AppKit 0x00007fff8e3ddfdd -[NSView viewWillDraw] + 244
23 AppKit 0x00007fff8e3de29d __22-[NSView viewWillDraw]_block_invoke_0 + 307
24 CoreFoundation 0x00007fff8f052a46 __NSArrayEnumerate + 582
25 AppKit 0x00007fff8e3ddfdd -[NSView viewWillDraw] + 244
26 AppKit 0x00007fff8e3de29d __22-[NSView viewWillDraw]_block_invoke_0 + 307
27 CoreFoundation 0x00007fff8f052a46 __NSArrayEnumerate + 582
28 AppKit 0x00007fff8e3ddfdd -[NSView viewWillDraw] + 244
29 AppKit 0x00007fff8e3de29d __22-[NSView viewWillDraw]_block_invoke_0 + 307
30 CoreFoundation 0x00007fff8f052a46 __NSArrayEnumerate + 582
31 AppKit 0x00007fff8e3ddfdd -[NSView viewWillDraw] + 244
32 AppKit 0x00007fff8e3dd634 -[NSView _sendViewWillDrawInRect:clipRootView:] + 1525
33 AppKit 0x00007fff8e3a9a61 -[NSView displayIfNeeded] + 1044
34 AppKit 0x00007fff8e533f44 -[NSNextStepFrame displayIfNeeded] + 84
35 AppKit 0x00007fff8e466b18 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 1377
36 AppKit 0x00007fff8e466138 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 940
37 AppKit 0x00007fff8e465d1f -[NSWindow orderWindow:relativeTo:] + 159
38 LoginUIKit 0x00007fff9108d0c5 -[LUIWindowController showWindow] + 498
39 loginwindow 0x0000000105959e50 UserListOfUserWithPrimaryGroupGUID + 35482
40 loginwindow 0x0000000105948a94 APMechanismSetResult + 11788
41 libdispatch.dylib 0x00007fff8c879a2d _dispatch_barrier_sync_f_slow_invoke + 77
42 libdispatch.dylib 0x00007fff8c8740b6 _dispatch_client_callout + 8
43 libdispatch.dylib 0x00007fff8c8790c8 _dispatch_main_queue_callback_4CF + 275
44 CoreFoundation 0x00007fff8effc0fe __CFRunLoopRun + 1614
45 CoreFoundation 0x00007fff8effb6b2 CFRunLoopRunSpecific + 290
46 HIToolbox 0x00007fff8cae00a4 RunCurrentEventLoopInMode + 209
47 HIToolbox 0x00007fff8cadfe42 ReceiveNextEventCommon + 356
48 HIToolbox 0x00007fff8cadfcd3 BlockUntilNextEventMatchingListInMode + 62
49 AppKit 0x00007fff8e3a6613 _DPSNextEvent + 685
50 AppKit 0x00007fff8e3a5ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
51 AppKit 0x00007fff8e39d283 -[NSApplication run] + 517
52 SecurityAgent 0x000000010577c544 SecurityAgent + 70980
53 libdyld.dylib 0x00007fff878ac7e1 start + 0
54 ??? 0x0000000000000001 0x0 + 1
)
Feb 14 14:12:06 sahara ReportCrash[1492]: DebugSymbols was unable to start a spotlight query: spotlight is not responding or disabled.
Feb 14 14:12:06 sahara ReportCrash[1492]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
Feb 14 14:12:06 sahara ReportCrash[1492]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
Feb 14 14:12:06 sahara ReportCrash[1492]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
Feb 14 14:12:06 sahara ReportCrash[1492]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
Feb 14 14:12:06 sahara ReportCrash[1492]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
Feb 14 14:12:06 sahara ReportCrash[1492]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
Feb 14 14:12:06 sahara ReportCrash[1492]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
Feb 14 14:12:06 sahara ReportCrash[1492]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
Feb 14 14:12:06 sahara ReportCrash[1492]: failed looking up LS service ( scCreateSystemService returned MACH_PORT_NULL, called from SetupCoreApplicationServicesCommunicationPort, so using client-side NULL calls.
Feb 14 14:12:06 sahara ReportCrash[1492]: LaunchServices/5123589: Unable to lookup coreservices session port for session 0x186a0 uid=0 euid=0
Feb 14 14:12:06 sahara com.apple.SecurityServer[20]: Engine::authorize: Rule::evaluate returned 4294907288 returning errAuthorizationInternal
Feb 14 14:12:06 sahara loginwindow[1440]: Login Window - Returned from Security Agent
Feb 14 14:12:06 sahara loginwindow[1440]: AuthorizationRef doesn't have a username (<LoginAuthRefMgr: 0x7f9e4c220640>). Exiting.
Feb 14 14:12:06 sahara WindowServer[1441]: CGXRestartSessionWorkspace: session workspace exited for session 256 (on console)
Feb 14 14:12:06 sahara WindowServer[1441]: Session 256 released (1 references)
Feb 14 14:12:06 sahara WindowServer[1441]: Session 256 released (0 references)
Feb 14 14:12:06 sahara WindowServer[1441]: loginwindow connection closed; closing server.
Feb 14 14:12:06 sahara com.apple.launchd[1] (com.apple.SecurityAgent.00000000-0000-0000-0000-0000000186AC[1452]): Job appears to have crashed: Abort trap: 6
Feb 14 14:12:06 sahara loginwindow[1493]: Login Window Application Started
Feb 14 14:12:06 sahara WindowServer[1494]: Server is starting up
Feb 14 14:12:06 sahara WindowServer[1494]: Session 256 retained (2 references)
Feb 14 14:12:06 sahara WindowServer[1494]: Session 256 released (1 references)
Feb 14 14:12:06 sahara WindowServer[1494]: Session 256 retained (2 references)
Feb 14 14:12:06 sahara WindowServer[1494]: init_page_flip: page flip mode is on
Feb 14 14:12:06 sahara WindowServer[1494]: mux_initialize: Mode is dynamic
Feb 14 14:12:06 sahara WindowServer[1494]: GLCompositor enabled for tile size [256 x 256]
Feb 14 14:12:06 sahara WindowServer[1494]: CGXGLInitMipMap: mip map mode is on
Feb 14 14:12:06 sahara WindowServer[1494]: WSMachineUsesNewStyleMirroring: true
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x04272d80: GL mask 0x11; bounds (0, 0)[1680 x 1050], 14 modes available
Main, Active, on-line, enabled, built-in, boot, Vendor 610, Model 9cb6, S/N 0, Unit 0, Rotation 0
UUID 0x0000061000009cb60000000004272d80
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x003f003f: GL mask 0x8; bounds (0, 0)[0 x 0], 1 modes available
off-line, enabled, Vendor ffffffff, Model ffffffff, S/N ffffffff, Unit 3, Rotation 0
UUID 0xffffffffffffffffffffffff003f003f
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x003f003e: GL mask 0x4; bounds (0, 0)[0 x 0], 1 modes available
off-line, enabled, Vendor ffffffff, Model ffffffff, S/N ffffffff, Unit 2, Rotation 0
UUID 0xffffffffffffffffffffffff003f003e
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x003f003d: GL mask 0x2; bounds (0, 0)[0 x 0], 1 modes available
off-line, enabled, Vendor ffffffff, Model ffffffff, S/N ffffffff, Unit 1, Rotation 0
UUID 0xffffffffffffffffffffffff003f003d
Feb 14 14:12:06 sahara WindowServer[1494]: Created shield window 0x4 for display 0x04272d80
Feb 14 14:12:06 sahara WindowServer[1494]: Created shield window 0x5 for display 0x003f003f
Feb 14 14:12:06 sahara WindowServer[1494]: Created shield window 0x6 for display 0x003f003e
Feb 14 14:12:06 sahara WindowServer[1494]: Created shield window 0x7 for display 0x003f003d
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x04272d80: GL mask 0x11; bounds (0, 0)[1680 x 1050], 14 modes available
Main, Active, on-line, enabled, built-in, boot, Vendor 610, Model 9cb6, S/N 0, Unit 0, Rotation 0
UUID 0x0000061000009cb60000000004272d80
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x003f003f: GL mask 0x8; bounds (2704, 0)[1 x 1], 1 modes available
off-line, enabled, Vendor ffffffff, Model ffffffff, S/N ffffffff, Unit 3, Rotation 0
UUID 0xffffffffffffffffffffffff003f003f
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x003f003e: GL mask 0x4; bounds (2705, 0)[1 x 1], 1 modes available
off-line, enabled, Vendor ffffffff, Model ffffffff, S/N ffffffff, Unit 2, Rotation 0
UUID 0xffffffffffffffffffffffff003f003e
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x003f003d: GL mask 0x2; bounds (2706, 0)[1 x 1], 1 modes available
off-line, enabled, Vendor ffffffff, Model ffffffff, S/N ffffffff, Unit 1, Rotation 0
UUID 0xffffffffffffffffffffffff003f003d
Feb 14 14:12:06 sahara WindowServer[1494]: CGXPerformInitialDisplayConfiguration
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x04272d80: MappedDisplay Unit 0; Alias(4, 0x11); Vendor 0x610 Model 0x9cb6 S/N 0 Dimensions 13.03 x 8.15; online enabled built-in, Bounds (0,0)[1680 x 1050], Rotation 0, Resolution 1
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x003f003f: MappedDisplay Unit 3; Vendor 0xffffffff Model 0xffffffff S/N -1 Dimensions 0.00 x 0.00; offline enabled, Bounds (2704,0)[1 x 1], Rotation 0, Resolution 1
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x003f003e: MappedDisplay Unit 2; Vendor 0xffffffff Model 0xffffffff S/N -1 Dimensions 0.00 x 0.00; offline enabled, Bounds (2705,0)[1 x 1], Rotation 0, Resolution 1
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x003f003d: MappedDisplay Unit 1; Vendor 0xffffffff Model 0xffffffff S/N -1 Dimensions 0.00 x 0.00; offline enabled, Bounds (2706,0)[1 x 1], Rotation 0, Resolution 1
Feb 14 14:12:06 sahara WindowServer[1494]: CGXMuxBoot: Boot normal
Feb 14 14:12:06 sahara WindowServer[1494]: GLCompositor: GL renderer id 0x01022647, GL mask 0x0000000f, accelerator 0x00003237, unit 0, caps QEX|QGL|MIPMAP, vram 1024 MB
Feb 14 14:12:06 sahara ReportCrash[1492]: Saved crash report for SecurityAgent[1452] version 7.0 (55116.8) to /Library/Logs/DiagnosticReports/SecurityAgent_2013-02-14-141206_sahara.crash
Feb 14 14:12:06 sahara ReportCrash[1492]: Removing excessive log: file://localhost/Library/Logs/DiagnosticReports/SecurityAgent_2013-02-05-100201_sahara.crash
Feb 14 14:12:06 sahara WindowServer[1494]: GLCompositor: GL renderer id 0x01022647, GL mask 0x0000000f, texture units 8, texture max 16384, viewport max {16384, 16384}, extensions FPRG|NPOT|GLSL|FLOAT
Feb 14 14:12:06 sahara WindowServer[1494]: GLCompositor: GL renderer id 0x01024400, GL mask 0x00000010, accelerator 0x000048c7, unit 4, caps QEX|QGL|MIPMAP, vram 420 MB
Feb 14 14:12:06 sahara WindowServer[1494]: GLCompositor: GL renderer id 0x01024400, GL mask 0x00000010, texture units 8, texture max 16384, viewport max {16384, 16384}, extensions FPRG|NPOT|GLSL|FLOAT
Feb 14 14:12:06 sahara loginwindow[1493]: **DMPROXY** Found `/System/Library/CoreServices/DMProxy'.
Feb 14 14:12:06 sahara WindowServer[1494]: Created shield window 0x8 for display 0x04272d80
Feb 14 14:12:06 sahara WindowServer[1494]: Display 0x04272d80: MappedDisplay Unit 0; ColorProfile { 2, "Color LCD"}; TransferTable (256, 3)
Feb 14 14:12:06 sahara launchctl[1496]: com.apple.findmymacmessenger: Already loaded
Feb 14 14:12:06 sahara com.apple.SecurityServer[20]: Session 100013 created
Feb 14 14:12:06 sahara hidd[69]: CGSShutdownServerConnections: Detaching application from window server
Feb 14 14:12:06 sahara hidd[69]: CGSDisplayServerShutdown: Detaching display subsystem from window server
Feb 14 14:12:06 sahara helpd[1503]: Could not find access page in directory /Library/Documentation/Help/Norton Help Scripts
Feb 14 14:12:06 --- last message repeated 1 time ---
Feb 14 14:12:06 sahara locationd[1505]: Incorrect NSStringEncoding value 0x8000100 detected. Assuming NSASCIIStringEncoding. Will stop this compatiblity mapping behavior in the near future.
Feb 14 14:12:06 sahara locationd[1505]: NOTICE,Location icon should now be in state 0
Feb 14 14:12:06 sahara UserEventAgent[1500]: cannot find useragent 1102
Feb 14 14:12:06 sahara loginwindow[1493]: Login Window Started Security Agent
Feb 14 14:12:06 sahara WindowServer[1494]: 3891612: App SecurityAgent cannot order in untagged windows before login.
Feb 14 14:12:06 sahara WindowServer[1494]: kCGErrorInvalidOperation: CGXOrderWinsAndPanels: error ordering window
Feb 14 14:12:07 sahara com.apple.launchd.peruser.92[1406]: Background: Bug: 12C3012: launchd + 80370 [7DCC9489-2DF5-3807-83FA-EF5666EE8078]: 0x0
Feb 14 14:12:07 sahara com.apple.launchd.peruser.92[1406]: Background: This API can only be used by a process running within an Aqua session.
Feb 14 14:12:07 sahara SecurityAgent[1506]: spawn_via_launchd() failed, errno=5 label=[0x0-0x5a05a].com.apple.AppleSpell path=/System/Library/Services/AppleSpell.service/Contents/MacOS/AppleSpell flags=0
Feb 14 14:12:07 --- last message repeated 1 time ---
Feb 14 14:12:07 sahara SecurityAgent[1506]: Error launching spell checker for U.S. English: Error Domain=NSCocoaErrorDomain Code=256 "The application “AppleSpell.service” could not be launched because a miscellaneous error occurred (OSStatus -10810)." UserInfo=0x7fc6d8c60940 {NSURL=file://localhost/System/Library/Services/AppleSpell.service/, NSLocalizedDescription=The application “AppleSpell.service” could not be launched because a miscellaneous error occurred (OSStatus -10810)., NSUnderlyingError=0x7fc6d8c62330 "The operation couldn’t be completed. (OSStatus error -10810.)"}
Feb 14 14:12:08 sahara WindowServer[1494]: **DMPROXY** (2) Found `/System/Library/CoreServices/DMProxy'.
Feb 14 14:12:08 sahara WindowServer[1494]: Display 0x04272d80: MappedDisplay Unit 0; ColorProfile { 2, "Color LCD"}; TransferTable (256, 3)
Feb 14 14:12:09 --- last message repeated 1 time ---
Feb 14 14:12:09 sahara WindowServer[1494]: MPAccessSurfaceForDisplayDevice: Set up page flip mode on display 0x04272d80 device: 0x105604320 isBackBuffered: 1 numComp: 3 numDisp: 3
I am trying to run the salesforce ios phonegap app for mobile sdk
project named
https://github.com/forcedotcom/SalesforceMobileSDK-iOS/tree/master/hy...
The app starts but stops with the Exception:
2012-01-09 17:18:15.897 VFConnector[1354:207] -[NSCFString JSONValue]:
unrecognized selector sent to instance 0x5aac9b0
2012-01-09 17:18:15.916 VFConnector[1354:207] *** Terminating app due
to uncaught exception 'NSInvalidArgumentException', reason: '-
[NSCFString JSONValue]: unrecognized selector sent to instance
0x5aac9b0'
*** Call stack at first throw:
(
0 CoreFoundation 0x01a775a9
__exceptionPreprocess + 185
1 libobjc.A.dylib 0x01bcb313
objc_exception_throw + 44
2 CoreFoundation 0x01a790bb -
[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x019e8966 ___forwarding___ +
966
4 CoreFoundation 0x019e8522
_CF_forwarding_prep_0 + 50
5 VFConnector 0x00004af3 -
[SalesforceOAuthPlugin populateOAuthProperties:] + 99
6 VFConnector 0x00003a8d -
[SalesforceOAuthPlugin authenticate:withDict:] + 365
7 VFConnector 0x0001772b -[PhoneGapDelegate
execute:] + 434
8 VFConnector 0x00002d67 -
[SFContainerAppDelegate execute:] + 71
9 VFConnector 0x00017150 -[PhoneGapDelegate
executeQueuedCommands] + 265
10 VFConnector 0x000171fd -[PhoneGapDelegate
flushCommandQueue] + 81
11 VFConnector 0x0001756c -[PhoneGapDelegate
webView:shouldStartLoadWithRequest:navigationType:] + 822
12 VFConnector 0x00003060 -
[SFContainerAppDelegate
webView:shouldStartLoadWithRequest:navigationType:] + 96
13 UIKit 0x004bea92 -[UIWebView
webView:decidePolicyForNavigationAction:request:frame:decisionListener:]
+ 291
14 CoreFoundation 0x019e7c7d __invoking___ + 29
15 CoreFoundation 0x019e7b51 -[NSInvocation
invoke] + 145
16 CoreFoundation 0x01a15858 -[NSInvocation
invokeWithTarget:] + 72
17 WebKit 0x025d8c76 -
[_WebSafeForwarder forwardInvocation:] + 182
18 CoreFoundation 0x019e8a04 ___forwarding___ +
1124
19 CoreFoundation 0x019e8522
_CF_forwarding_prep_0 + 50
20 CoreFoundation 0x019e7c7d __invoking___ + 29
21 CoreFoundation 0x019e7b51 -[NSInvocation
invoke] + 145
22 WebCore 0x030cc150
_ZL20HandleDelegateSourcePv + 64
23 CoreFoundation 0x01a588ff
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
24 CoreFoundation 0x019b688b
__CFRunLoopDoSources0 + 571
25 CoreFoundation 0x019b5d86 __CFRunLoopRun +
470
26 CoreFoundation 0x019b5840
CFRunLoopRunSpecific + 208
27 CoreFoundation 0x019b5761 CFRunLoopRunInMode
+ 97
28 GraphicsServices 0x021141c4 GSEventRunModal +
217
29 GraphicsServices 0x02114289 GSEventRun + 115
30 UIKit 0x00335c93 UIApplicationMain
+ 1160
31 VFConnector 0x00002777 main + 135
32 VFConnector 0x000026e5 start + 53
33 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
Please Help because I am stuck on this for 2 days!
The error is a JSON library dependency issue. Ensure all the JSON libraries required are installed.