jamf / FileVault2_Scripts

Scripts and Extension Attributes for use with FileVault 2 on Mountain Lion
145 stars 60 forks source link

NSInvalidArgumentException #12

Open wantedwriter opened 3 years ago

wantedwriter commented 3 years ago

We are seeing this in our environment on a very limited number of 10.15.x devices. Any ideas?

Script result: Prompting wantedwriter for their login password. 2021-08-20 13:05:40.937 osascript[64483:2165352] -[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8e2540e0 2021-08-20 13:05:40.956 osascript[64483:2165352] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8e2540e0' *** First throw call stack: ( 0 CoreFoundation 0x00007fff36a21627 exceptionPreprocess + 250 1 libobjc.A.dylib 0x00007fff6f8bd5bf objc_exception_throw + 48 2 CoreFoundation 0x00007fff36aa0757 -[NSObject(NSObject) retain_OA] + 0 3 CoreFoundation 0x00007fff36985e8b forwarding + 1427 4 CoreFoundation 0x00007fff36985868 _CF_forwarding_prep0 + 120 5 CoreFoundation 0x00007fff36954967 CFArrayContainsValue + 197 6 HIServices 0x00007fff34c5b7b9 TransformProcessType + 927 7 osascript 0x000000010c9e402c osascript + 12332 8 HIToolbox 0x00007fff3566f7c5 AEInteractWithUser + 53 9 StandardAdditions 0x000000010f60c8b9 CSDSTEXTurl + 5865 10 StandardAdditions 0x000000010f5fd331 AEVTsysodlog + 85 11 AE 0x00007fff37d18203 _AppleEventsCheckInAppWithBlock + 18103 12 AE 0x00007fff37d27c83 AESendMessage + 2838 13 AE 0x00007fff37d33fb1 aeSend + 355 14 osascript 0x000000010c9e2b25 osascript + 6949 15 AppleScript 0x00007fff4a85b342 _Z13ComponentSendPK6AEDescPS_ii + 485 16 AppleScript 0x00007fff4a86cf0a _ZN15TUASApplication4SendEP25TStackFrame_UASRemoteSendP6AEDescS3_hhh + 2332 17 AppleScript 0x00007fff4a88dca7 _Z13UASRemoteSendhhhhhPh + 548 18 AppleScript 0x00007fff4a8661f0 _Z13UASActor_Sendhhh + 383 19 AppleScript 0x00007fff4a899402 _Z13UASValue_Sendhh14TUASClassIndexh + 326 20 AppleScript 0x00007fff4a870ff9 _Z11UASExecute1v + 288 21 AppleScript 0x00007fff4a844b26 _Z14ASExecuteEventPK6AEDescjiPj + 614 22 AppleScript 0x00007fff4a83d971 AppleScriptComponent + 1677 23 AppleScript 0x00007fff4a856bdb _ZN12AGenericCall8DelegateEP23ComponentInstanceRecord + 37 24 AppleScript 0x00007fff4a856ba1 _ZN15AGenericManager13HandleOSACallEP19ComponentParameters + 57 25 AppleScript 0x00007fff4a85618c GenericComponent + 156 26 OpenScripting 0x00007fff358b23e2 OSAExecuteEvent + 50 27 osascript 0x000000010c9e35bd osascript + 9661 28 libdyld.dylib 0x00007fff70a65cc9 start + 1 29 ??? 0x0000000000000003 0x0 + 3 ) libc++abi.dylib: terminating with uncaught exception of type NSException Error Changing Key

Error: Password is required. Error: User could not be authenticated. Error: Unable to unlock or authenticate to FileVault.

2021-08-20 13:05:51.343 osascript[64491:2165814] -[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8e2540e0 2021-08-20 13:05:51.344 osascript[64491:2165814] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8e2540e0' First throw call stack: ( 0 CoreFoundation 0x00007fff36a21627 exceptionPreprocess + 250 1 libobjc.A.dylib 0x00007fff6f8bd5bf objc_exception_throw + 48 2 CoreFoundation 0x00007fff36aa0757 -[NSObject(NSObject) retain_OA] + 0 3 CoreFoundation 0x00007fff36985e8b forwarding + 1427 4 CoreFoundation 0x00007fff36985868 _CF_forwarding_prep0 + 120 5 CoreFoundation 0x00007fff36954967 CFArrayContainsValue + 197 6 HIServices 0x00007fff34c5b7b9 TransformProcessType + 927 7 osascript 0x000000010c27702c osascript + 12332 8 HIToolbox 0x00007fff3566f7c5 AEInteractWithUser + 53 9 StandardAdditions 0x000000010ee9e8b9 CSDSTEXTurl + 5865 10 StandardAdditions 0x000000010ee8f331 AEVTsysodlog + 85 11 AE 0x00007fff37d18203 _AppleEventsCheckInAppWithBlock + 18103 12 AE 0x00007fff37d27c83 AESendMessage + 2838 13 AE 0x00007fff37d33fb1 aeSend + 355 14 osascript 0x000000010c275b25 osascript + 6949 15 AppleScript 0x00007fff4a85b342 _Z13ComponentSendPK6AEDescPS_ii + 485 16 AppleScript 0x00007fff4a86cf0a _ZN15TUASApplication4SendEP25TStackFrame_UASRemoteSendP6AEDescS3_hhh + 2332 17 AppleScript 0x00007fff4a88dca7 _Z13UASRemoteSendhhhhhPh + 548 18 AppleScript 0x00007fff4a8661f0 _Z13UASActor_Sendhhh + 383 19 AppleScript 0x00007fff4a899402 _Z13UASValue_Sendhh14TUASClassIndexh + 326 20 AppleScript 0x00007fff4a870ff9 _Z11UASExecute1v + 288 21 AppleScript 0x00007fff4a844b26 _Z14ASExecuteEventPK6AEDescjiPj + 614 22 AppleScript 0x00007fff4a83d971 AppleScriptComponent + 1677 23 AppleScript 0x00007fff4a856bdb _ZN12AGenericCall8DelegateEP23ComponentInstanceRecord + 37 24 AppleScript 0x00007fff4a856ba1 _ZN15AGenericManager13HandleOSACallEP19ComponentParameters + 57 25 AppleScript 0x00007fff4a85618c GenericComponent + 156 26 OpenScripting 0x00007fff358b23e2 OSAExecuteEvent + 50 27 osascript 0x000000010c2765bd osascript + 9661 28 libdyld.dylib 0x00007fff70a65cc9 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException /Library/Application Support/JAMF/tmp/FileVault - Reissue Recovery Key: line 191: 64491 Abort trap: 6 /usr/bin/osascript -e " on run display dialog \"FileVault Key not Changed\" & return & \"$result\" buttons {\"Cancel\", \"Try Again\"} default button 2 with title \"$orgName FileVault Key Reset\" with icon POSIX file \"$brandIcon\" end run" Prompting wantedwriter for their login password. 2021-08-20 13:05:51.528 osascript[64492:2165848] -[__NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8e2540e0 2021-08-20 13:05:51.529 osascript[64492:2165848] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8e2540e0' *** First throw call stack: ( 0 CoreFoundation 0x00007fff36a21627 exceptionPreprocess + 250 1 libobjc.A.dylib 0x00007fff6f8bd5bf objc_exception_throw + 48 2 CoreFoundation 0x00007fff36aa0757 -[NSObject(NSObject) retainOA] + 0 3 CoreFoundation 0x00007fff36985e8b forwarding___ + 1427 4 CoreFoundation 0x00007fff36985868 _CF_forwarding_prep0 + 120 5 CoreFoundation 0x00007fff36954967 CFArrayContainsValue + 197 6 HIServices 0x00007fff34c5b7b9 TransformProcessType + 927 7 osascript 0x00000001098c202c osascript + 12332 8 HIToolbox 0x00007fff3566f7c5 AEInteractWithUser + 53 9 StandardAdditions 0x000000010c4e98b9 CSDSTEXTurl + 5865 10 StandardAdditions 0x000000010c4da331 AEVTsysodlog + 85 11 AE 0x00007fff37d18203 _AppleEventsCheckInAppWithBlock + 18103 12 AE 0x00007fff37d27c83 AESendMessage + 2838 13 AE 0x00007fff37d33fb1 aeSend + 355 14 osascript 0x00000001098c0b25 osascript + 6949 15 AppleScript 0x00007fff4a85b342 _Z13ComponentSendPK6AEDescPS_ii + 485 16 AppleScript 0x00007fff4a86cf0a _ZN15TUASApplication4SendEP25TStackFrame_UASRemoteSendP6AEDescS3_hhh + 2332 17 AppleScript 0x00007fff4a88dca7 _Z13UASRemoteSendhhhhhPh + 548 18 AppleScript 0x00007fff4a8661f0 _Z13UASActor_Sendhhh + 383 19 AppleScript 0x00007fff4a899402 _Z13UASValue_Sendhh14TUASClassIndexh + 326 20 AppleScript 0x00007fff4a870ff9 _Z11UASExecute1v + 288 21 AppleScript 0x00007fff4a844b26 _Z14ASExecuteEventPK6AEDescjiPj + 614 22 AppleScript 0x00007fff4a83d971 AppleScriptComponent + 1677 23 AppleScript 0x00007fff4a856bdb _ZN12AGenericCall8DelegateEP23ComponentInstanceRecord + 37 24 AppleScript 0x00007fff4a856ba1 _ZN15AGenericManager13HandleOSACallEP19ComponentParameters + 57 25 AppleScript 0x00007fff4a85618c GenericComponent + 156 26 OpenScripting 0x00007fff358b23e2 OSAExecuteEvent + 50 27 osascript 0x00000001098c15bd osascript + 9661 28 libdyld.dylib 0x00007fff70a65cc9 start + 1 29 ??? 0x0000000000000003 0x0 + 3 ) libc++abi.dylib: terminating with uncaught exception of type NSException Error Changing Key

Error: Password is required. Error: User could not be authenticated. Error: Unable to unlock or authenticate to FileVault.

2021-08-20 13:06:01.847 osascript[64497:2166533] -[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8e2540e0 2021-08-20 13:06:01.848 osascript[64497:2166533] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8e2540e0' First throw call stack: ( 0 CoreFoundation 0x00007fff36a21627 exceptionPreprocess + 250 1 libobjc.A.dylib 0x00007fff6f8bd5bf objc_exception_throw + 48 2 CoreFoundation 0x00007fff36aa0757 -[NSObject(NSObject) retain_OA] + 0 3 CoreFoundation 0x00007fff36985e8b forwarding + 1427 4 CoreFoundation 0x00007fff36985868 _CF_forwarding_prep0 + 120 5 CoreFoundation 0x00007fff36954967 CFArrayContainsValue + 197 6 HIServices 0x00007fff34c5b7b9 TransformProcessType + 927 7 osascript 0x00000001077a202c osascript + 12332 8 HIToolbox 0x00007fff3566f7c5 AEInteractWithUser + 53 9 StandardAdditions 0x000000010a3c78b9 CSDSTEXTurl + 5865 10 StandardAdditions 0x000000010a3b8331 AEVTsysodlog + 85 11 AE 0x00007fff37d18203 _AppleEventsCheckInAppWithBlock + 18103 12 AE 0x00007fff37d27c83 AESendMessage + 2838 13 AE 0x00007fff37d33fb1 aeSend + 355 14 osascript 0x00000001077a0b25 osascript + 6949 15 AppleScript 0x00007fff4a85b342 _Z13ComponentSendPK6AEDescPS_ii + 485 16 AppleScript 0x00007fff4a86cf0a _ZN15TUASApplication4SendEP25TStackFrame_UASRemoteSendP6AEDescS3_hhh + 2332 17 AppleScript 0x00007fff4a88dca7 _Z13UASRemoteSendhhhhhPh + 548 18 AppleScript 0x00007fff4a8661f0 _Z13UASActor_Sendhhh + 383 19 AppleScript 0x00007fff4a899402 _Z13UASValue_Sendhh14TUASClassIndexh + 326 20 AppleScript 0x00007fff4a870ff9 _Z11UASExecute1v + 288 21 AppleScript 0x00007fff4a844b26 _Z14ASExecuteEventPK6AEDescjiPj + 614 22 AppleScript 0x00007fff4a83d971 AppleScriptComponent + 1677 23 AppleScript 0x00007fff4a856bdb _ZN12AGenericCall8DelegateEP23ComponentInstanceRecord + 37 24 AppleScript 0x00007fff4a856ba1 _ZN15AGenericManager13HandleOSACallEP19ComponentParameters + 57 25 AppleScript 0x00007fff4a85618c GenericComponent + 156 26 OpenScripting 0x00007fff358b23e2 OSAExecuteEvent + 50 27 osascript 0x00000001077a15bd osascript + 9661 28 libdyld.dylib 0x00007fff70a65cc9 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException /Library/Application Support/JAMF/tmp/FileVault - Reissue Recovery Key: line 191: 64497 Abort trap: 6 /usr/bin/osascript -e " on run display dialog \"FileVault Key not Changed\" & return & \"$result\" buttons {\"Cancel\", \"Try Again\"} default button 2 with title \"$orgName FileVault Key Reset\" with icon POSIX file \"$brandIcon\" end run" Prompting wantedwriter for their login password. 2021-08-20 13:06:02.054 osascript[64498:2166562] -[__NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8e2540e0 2021-08-20 13:06:02.055 osascript[64498:2166562] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8e2540e0' *** First throw call stack: ( 0 CoreFoundation 0x00007fff36a21627 exceptionPreprocess + 250 1 libobjc.A.dylib 0x00007fff6f8bd5bf objc_exception_throw + 48 2 CoreFoundation 0x00007fff36aa0757 -[NSObject(NSObject) retainOA] + 0 3 CoreFoundation 0x00007fff36985e8b forwarding_ + 1427 4 CoreFoundation 0x00007fff36985868 _CF_forwarding_prep0 + 120 5 CoreFoundation 0x00007fff36954967 CFArrayContainsValue + 197 6 HIServices 0x00007fff34c5b7b9 TransformProcessType + 927 7 osascript 0x000000010698802c osascript + 12332 8 HIToolbox 0x00007fff3566f7c5 AEInteractWithUser + 53 9 StandardAdditions 0x00000001095b08b9 CSDSTEXTurl + 5865 10 StandardAdditions 0x00000001095a1331 AEVTsysodlog + 85 11 AE 0x00007fff37d18203 _AppleEventsCheckInAppWithBlock + 18103 12 AE 0x00007fff37d27c83 AESendMessage + 2838 13 AE 0x00007fff37d33fb1 aeSend + 355 14 osascript 0x0000000106986b25 osascript + 6949 15 AppleScript 0x00007fff4a85b342 _Z13ComponentSendPK6AEDescPS_ii + 485 16 AppleScript 0x00007fff4a86cf0a _ZN15TUASApplication4SendEP25TStackFrame_UASRemoteSendP6AEDescS3_hhh + 2332 17 AppleScript 0x00007fff4a88dca7 _Z13UASRemoteSendhhhhhPh + 548 18 AppleScript 0x00007fff4a8661f0 _Z13UASActor_Sendhhh + 383 19 AppleScript 0x00007fff4a899402 _Z13UASValue_Sendhh14TUASClassIndexh + 326 20 AppleScript 0x00007fff4a870ff9 _Z11UASExecute1v + 288 21 AppleScript 0x00007fff4a844b26 _Z14ASExecuteEventPK6AEDescjiPj + 614 22 AppleScript 0x00007fff4a83d971 AppleScriptComponent + 1677 23 AppleScript 0x00007fff4a856bdb _ZN12AGenericCall8DelegateEP23ComponentInstanceRecord + 37 24 AppleScript 0x00007fff4a856ba1 _ZN15AGenericManager13HandleOSACallEP19ComponentParameters + 57 25 AppleScript 0x00007fff4a85618c GenericComponent + 156 26 OpenScripting 0x00007fff358b23e2 OSAExecuteEvent + 50 27 osascript 0x00000001069875bd osascript + 9661 28 libdyld.dylib 0x00007fff70a65cc9 start + 1 29 ??? 0x0000000000000003 0x0 + 3 ) libc++abi.dylib: terminating with uncaught exception of type NSException Error Changing Key 2021-08-20 13:06:12.407 osascript[64503:2167214] -[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8e2540e0 2021-08-20 13:06:12.408 osascript[64503:2167214] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFConstantString objectAtIndex:]: unrecognized selector sent to instance 0x7fff8e2540e0' *** First throw call stack: ( 0 CoreFoundation 0x00007fff36a21627 exceptionPreprocess + 250 1 libobjc.A.dylib 0x00007fff6f8bd5bf objc_exception_throw + 48 2 CoreFoundation 0x00007fff36aa0757 -[NSObject(NSObject) retain_OA] + 0 3 CoreFoundation 0x00007fff36985e8b __forwarding + 1427 4 CoreFoundation 0x00007fff36985868 _CF_forwarding_prep0 + 120 5 CoreFoundation 0x00007fff36954967 CFArrayContainsValue + 197 6 HIServices 0x00007fff34c5b7b9 TransformProcessType + 927 7 osascript 0x000000010feef02c osascript + 12332 8 HIToolbox 0x00007fff3566f7c5 AEInteractWithUser + 53 9 StandardAdditions 0x0000000112b168b9 CSDSTEXTurl + 5865 10 StandardAdditions 0x0000000112b07331 AEVTsysodlog + 85 11 AE 0x00007fff37d18203 _AppleEventsCheckInAppWithBlock + 18103 12 AE 0x00007fff37d27c83 AESendMessage + 2838 13 AE 0x00007fff37d33fb1 aeSend + 355 14 osascript 0x000000010feedb25 osascript + 6949 15 AppleScript 0x00007fff4a85b342 _Z13ComponentSendPK6AEDescPS_ii + 485 16 AppleScript 0x00007fff4a86cf0a _ZN15TUASApplication4SendEP25TStackFrame_UASRemoteSendP6AEDescS3_hhh + 2332 17 AppleScript 0x00007fff4a88dca7 _Z13UASRemoteSendhhhhhPh + 548 18 AppleScript 0x00007fff4a8661f0 _Z13UASActor_Sendhhh + 383 19 AppleScript 0x00007fff4a899402 _Z13UASValue_Sendhh14TUASClassIndexh + 326 20 AppleScript 0x00007fff4a870ff9 _Z11UASExecute1v + 288 21 AppleScript 0x00007fff4a844b26 _Z14ASExecuteEventPK6AEDescjiPj + 614 22 AppleScript 0x00007fff4a83d971 AppleScriptComponent + 1677 23 AppleScript 0x00007fff4a856bdb _ZN12AGenericCall8DelegateEP23ComponentInstanceRecord + 37 24 AppleScript 0x00007fff4a856ba1 _ZN15AGenericManager13HandleOSACallEP19ComponentParameters + 57 25 AppleScript 0x00007fff4a85618c GenericComponent + 156 26 OpenScripting 0x00007fff358b23e2 OSAExecuteEvent + 50 27 osascript 0x000000010feee5bd osascript + 9661 28 libdyld.dylib 0x00007fff70a65cc9 start + 1 29 ??? 0x0000000000000003 0x0 + 3 ) libc++abi.dylib: terminating with uncaught exception of type NSException /Library/Application Support/JAMF/tmp/FileVault - Reissue Recovery Key: line 205: 64503 Abort trap: 6 /usr/bin/osascript -e " on run display dialog \"FileVault Key not changed\" & return & \"$haltMsg\" buttons {\"Close\"} default button 1 with title \"$orgName FileVault Key Reset\" with icon POSIX file \"$brandIcon\" end run " Quitting.. Too Many failures

ebeiersdorfer commented 2 years ago

Seeing the same on a number of 10.15.x, this seems to be working great for us otherwise though. Ever get this figured out?