Posts

Post not yet marked as solved
0 Replies
653 Views
I have a Safari App Extension that uses an instance of WkWebView to run JavaScript code. This app extension runs flawlessly with Safari 13 & 14, but Safari 15 occasionally kills the WkWebView instance for no apparent reason. The only thing logged to the console is this message: (JavaScriptCore) Received an invalid message "<unknown message receiver>.<unknown message>" from the web process. SafariExtension: (WebKit) [com.apple.WebKit:Process] 0x10c2e9300 - WebProcessProxy didClose (web process crash) SafariExtension: (WebKit) [com.apple.WebKit:Process] 0x7ff1e7048020 - [pageProxyID=5, webPageID=6, PID=22131] WebPageProxy::processDidTerminate: (pid 22131), reason 3 I can't find any correlation between the JavaScript that's running and that error. The error seemingly occurs at random. Has anyone else experienced such a problem? Thanks
Posted
by dtheobald.
Last updated
.
Post not yet marked as solved
0 Replies
369 Views
I have a Safari App Extension that uses an instance of WkWebView to run JavaScript code. This app extension runs flawlessly with Safari 13 & 14, but Safari 15 occasionally kills the WkWebView instance for no apparent reason. The only thing logged to the console is this message: (JavaScriptCore) Received an invalid message "<unknown message receiver>.<unknown message>" from the web process. SafariExtension: (WebKit) [com.apple.WebKit:Process] 0x10c2e9300 - WebProcessProxy didClose (web process crash) SafariExtension: (WebKit) [com.apple.WebKit:Process] 0x7ff1e7048020 - [pageProxyID=5, webPageID=6, PID=22131] WebPageProxy::processDidTerminate: (pid 22131), reason 3 I can't find any correlation between the JavaScript that's running and that error. The error seemingly occurs at random. Has anyone else experienced such a problem? Thanks
Posted
by dtheobald.
Last updated
.
Post not yet marked as solved
1 Replies
649 Views
I have a need to be able to draw a rectangle anywhere on the screen over any application even if the application is in full screen mode. I've gotten suggestions to create a transparent window the size of the desktop and draw the rectangle in it, but that method won't work when the active app is in full screen mode. I presume that it's possible to do this being that there are screen annotation applications that can do such things, so I'm looking for suggestions as to how to accomplish this? Thanks in advance
Posted
by dtheobald.
Last updated
.
Post not yet marked as solved
1 Replies
528 Views
I have a Mac bound to a WIndows Active directory and am trying to figure out why when I login as a user in the AD domain global user agents don't run. Not only do the global user agents not run, there's no ~/Library/LaunchAgents directory for local user agents.BTW - The global user agents run when I login as a local user.I need user agents to run for AD domain users, so what do I need to do to enable them?Thanks
Posted
by dtheobald.
Last updated
.
Post marked as solved
5 Replies
2.6k Views
I'm trying to verify a local macOS user's password using the Authorization services API (via Swift 5) based on an Objective-C example I found.I've tried every permutation of calls to AuthoricationCreate that I can think of, but they always fail with an OOStatus code of -60005 or -60007My simple Swift 5 test code is as follows:import Cocoa import CoreFoundation class log { static func debug(_ msg: String) { Swift.print(msg) fflush(stdout) } static func error(_ msg: String) { Swift.print(msg) fflush(stdout) } } struct MacAPIRequest_Authenticate { public var user: String = String() public var password: String = String() public init() {} } var auth: MacAPIRequest_Authenticate = MacAPIRequest_Authenticate() auth.user=CommandLine.arguments[1] auth.password=CommandLine.arguments[2] log.debug("auth=\(auth)") let authPassword = UnsafeMutablePointer(mutating: (auth.password as NSString).utf8String) log.debug("authPassword=\(String(cString: authPassword!))") let authUser = UnsafeMutablePointer(mutating: (auth.user as NSString).utf8String) log.debug("authUser=\(String(cString: authUser!))") var authEnvItems = [ AuthorizationItem(name: kAuthorizationEnvironmentUsername, valueLength: (auth.user as NSString).length, value: authUser, flags: UInt32(0)), AuthorizationItem(name: kAuthorizationEnvironmentPassword, valueLength: (auth.password as NSString).length, value: authPassword, flags: UInt32(0)) ] log.debug("authEnvItems=\(authEnvItems)") var authEnv = AuthorizationEnvironment(count: UInt32(authEnvItems.count), items: &amp;authEnvItems) var authRightsItems = [ AuthorizationItem(name: "allow", valueLength: 0, value: nil, flags: 0) ] var authRights = AuthorizationRights(count: UInt32(authRightsItems.count), items: &amp;authRightsItems) log.debug("authRights=\(authRights)") var authRef: AuthorizationRef? = nil var authStatus: OSStatus var authFlags = AuthorizationFlags(rawValue: 0) // First try permutation without using AuthorizationCopyRights: authStatus = AuthorizationCreate(&amp;authRights, &amp;authEnv, authFlags, nil) log.debug("0 authStatus=\(authStatus)") // Using AuthorizationCopyRights: authStatus = AuthorizationCreate(nil, &amp;authEnv, authFlags, &amp;authRef) log.debug("1 authStatus=\(authStatus)") authFlags = AuthorizationFlags([.extendRights, .preAuthorize]) authStatus = AuthorizationCopyRights(authRef!, &amp;authRights, &amp;authEnv, authFlags, nil) log.debug("2 authStatus=\(authStatus)") if (authStatus == errAuthorizationSuccess) { log.debug("auth(\(auth)) authorized") } else { log.debug("auth(\(auth)) denied") }The above was based on what I found here - How verify account's passwordHere's what this outputs:auth=MacAPIRequest_Authenticate(user: "username", password: "password") authPassword=password authUser=username authEnvItems=[__C.AuthorizationItem(name: 0x00007fa52a4df030, valueLength: 8, value: Optional(0x00007fa52a4e9258), flags: 0), __C.AuthorizationItem(name: 0x00007fa52a4df030, valueLength: 8, value: Optional(0x00007fa52a4321d8), flags: 0)] authRights=AuthorizationItemSet(count: 1, items: Optional(0x00007fa52a4c32a0)) 0 authStatus=-60005 1 authStatus=0 2 authStatus=-60007 auth(MacAPIRequest_Authenticate(user: "username", password: "password")) deniedI expect OSStatus of 0 (zero) when providing the correct username/password combination.
Posted
by dtheobald.
Last updated
.