Bug 188238

Summary: LOG_ERROR when attempting to create a sandbox extension
Product: WebKit Reporter: Devin Rousso <drousso>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, bfulgham, cdumez, jbedard, joepeck, pvollan, sihui_liu
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Devin Rousso 2018-08-01 14:40:32 PDT
When trying to load any page, I get the following errors printed to the console (debug build):

Starting SafariForWebKitDevelopment with DYLD_FRAMEWORK_PATH set to point to built WebKit in WebKit/WebKitBuild/Debug.
objc[58801]: Class AMSupportURLConnectionDelegate is implemented in both /System/Library/PrivateFrameworks/EmbeddedOSInstall.framework/Versions/A/EmbeddedOSInstall (0x7fffacf078c0) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x111deb430). One of the two will be used. Which one is undefined.
objc[58801]: Class AMSupportURLSession is implemented in both /System/Library/PrivateFrameworks/OSPersonalization.framework/Versions/A/OSPersonalization (0x7fffae766f50) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x111deb480). One of the two will be used. Which one is undefined.
2018-08-01 14:34:31.504 SafariForWebKitDevelopment[58801:2576881] NetworkStorageDB:_openDBReadConnections: failed to open read connection to DB @ ~/Library/Caches/com.apple.Safari/Cache.db.  Error=14. Cause=unable to open database file
2018-08-01 14:34:31.504 SafariForWebKitDevelopment[58801:2576881] CacheRead: unable to open cache files in ~/Library/Caches/com.apple.Safari
2018-08-01 14:34:31.504 SafariForWebKitDevelopment[58801:2576881] Failed to obtain sandbox extension for path=~/Library/Caches/com.apple.Safari. Errno:1
2018-08-01 14:34:31.505 SafariForWebKitDevelopment[58801:2576881] NetworkStorageDB:_openDBReadConnections: failed to open read connection to DB @ ~/Library/Caches/com.apple.Safari/Cache.db.  Error=14. Cause=unable to open database file
2018-08-01 14:34:31.505 SafariForWebKitDevelopment[58801:2576881] CacheRead: unable to open cache files in ~/Library/Caches/com.apple.Safari
2018-08-01 14:34:31.505 SafariForWebKitDevelopment[58801:2576881] Failed to obtain sandbox extension for path=~/Library/Caches/com.apple.Safari. Errno:1
ERROR: Could not create a sandbox extension for '~/Library/Caches/com.apple.Safari/WebKitCache'
WebKit/Source/WebKit/Shared/mac/SandboxExtensionMac.mm(299) : static bool WebKit::SandboxExtension::createHandleWithoutResolvingPath(const WTF::String &, WebKit::SandboxExtension::Type, WebKit::SandboxExtension::Handle &)
ERROR: Could not create a sandbox extension for '~/Library/Caches/com.apple.Safari/WebKitCache/OfflineWebApplicationCache'
WebKit/Source/WebKit/Shared/mac/SandboxExtensionMac.mm(299) : static bool WebKit::SandboxExtension::createHandleWithoutResolvingPath(const WTF::String &, WebKit::SandboxExtension::Type, WebKit::SandboxExtension::Handle &)
ERROR: Could not create a sandbox extension for '~/Library/Safari/Databases'
WebKit/Source/WebKit/Shared/mac/SandboxExtensionMac.mm(299) : static bool WebKit::SandboxExtension::createHandleWithoutResolvingPath(const WTF::String &, WebKit::SandboxExtension::Type, WebKit::SandboxExtension::Handle &)
Failed to open cahce settings store at file://~/Library/Safari/Touch%20Icons%20Cache/TouchIconCacheSettings.db: Error Domain=com.apple.Safari.SQLite Code=14 "unable to open database file"
2018-08-01 14:34:32.119 SafariForWebKitDevelopment[58801:2576881] NetworkStorageDB:_openDBReadConnections: failed to open read connection to DB @ ~/Library/Caches/com.apple.Safari/Cache.db.  Error=14. Cause=unable to open database file
2018-08-01 14:34:32.119 SafariForWebKitDevelopment[58801:2576881] CacheRead: unable to open cache files in ~/Library/Caches/com.apple.Safari
2018-08-01 14:34:32.119 SafariForWebKitDevelopment[58801:2576881] Failed to obtain sandbox extension for path=~/Library/Caches/com.apple.Safari. Errno:1
2018-08-01 14:34:32.251 SafariForWebKitDevelopment[58801:2576882] AOSKit ERROR: XPC CLIENT: Unauthorized client error received
2018-08-01 14:34:32.258 SafariForWebKitDevelopment[58801:2576929] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'SandboxBroker': Connection invalid
ERROR: Could not create a sandbox extension for '~/Library/Caches/com.apple.Safari/WebKit/NetworkCache'
WebKit/Source/WebKit/Shared/mac/SandboxExtensionMac.mm(299) : static bool WebKit::SandboxExtension::createHandleWithoutResolvingPath(const WTF::String &, WebKit::SandboxExtension::Type, WebKit::SandboxExtension::Handle &)
ERROR: Could not create a sandbox extension for '~/Library/Caches/com.apple.Safari/WebKit/OfflineWebApplicationCache'
WebKit/Source/WebKit/Shared/mac/SandboxExtensionMac.mm(299) : static bool WebKit::SandboxExtension::createHandleWithoutResolvingPath(const WTF::String &, WebKit::SandboxExtension::Type, WebKit::SandboxExtension::Handle &)

Two of the errors (Caches/com.apple.Safari/WebKitCache/OfflineWebApplicationCache and Safari/Databases) continue logging while the page keeps reloading "due to an error".

I'm building off of r234441.

ProductName:	Mac OS X
ProductVersion:	10.14
BuildVersion:	18A336e
Comment 1 Alexey Proskuryakov 2018-08-01 15:04:18 PDT
A lot of the time, "Could not create a sandbox extension" means that the directory doesn't exist, and that could be a bug with process spawning code in WebKit.

But this looks concerning:

2018-08-01 14:34:32.258 SafariForWebKitDevelopment[58801:2576929] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'SandboxBroker': Connection invalid