Should I worry about Safari shutting down roughly 30 seconds after building and running my app extension? - safari-extension

I'm in the process of porting over the logic from the background scripts of a Chrome/Firefox web extension to a Safari App Extension. I'm very new to Xcode, so it's taking some time learning how to interpret and confront the issues I'm encountering.
I have a test project up and running, my content scripts are getting injected successfully into Safari, and I have updated the messaging logic to account for the different API's used in Safari App Extensions. Dispatching messages back and forth between Swift and Javascript is working. I was just about ready to get into migrating the Javascript logic over to Swift, but after I switched the scheme to my app extension to make use of Xcode's console, errors started appearing and Safari is now closing about 30 seconds after I run the project if I do nothing in the browser. If I click on the extension's toolbar item or setup a timer to dispatch a message to the Safari principle class, the browser will remain open for a few minutes, then eventually closes.
Through a ton of searching, I have only found a few threads that may correlate to what I'm experiencing, so I'm not sure where to go from here. One post on StackOverflow mentioned "the Xcode debugger has a tendency to kill the extension process if it doesn't receive any events from the content script" (safari app extension crashes after a few seconds for hello world project), but I'm not sure if that is what is happening on my end.
One thing that makes this more confusing is the error message I see the most is: "Safari[2803:95905] [Process] kill() returned unexpected error 1." It's confusing because I've found quite a few posts online mentioning this is a known bug with WKWebViews, but none of these post are referring to Safari App Extensions. It looks like most developers running into the bug are coding for iOS apps.
Is anyone else running into this and other error messages that appear to be killing their Safari App Extension process, thus shutting down, maybe even crashing, the Safari instance created after running their Xcode project? If so, has any figured out a way to fix the problem and what is the solution? I have tried starting over from scratch with a brand new Safari App Extension project, and the same errors are exhibited. Is this all normal behavior??
Here is a portion of the console logging I see every time Safari closes/crashes (not sure which at this point). Sometimes there is more information, and sometimes there is less, but the errors displayed are mostly always the same:
2019-12-12 18:13:08.917857-0800 Safari[2803:95905] Metal API Validation Enabled
2019-12-12 18:13:09.159014-0800 Safari[2803:95988] Bogus event on event stream listener.
2019-12-12 18:13:09.159101-0800 Safari[2803:96452] Bogus event on event stream listener.
2019-12-12 18:13:09.214558-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.372862-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.373012-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.378587-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.378758-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.483250-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.483355-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.485804-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.490306-0800 Safari[2803:95905] [logging-persist] cannot open file at line 43353 of [378230ae7f]
2019-12-12 18:13:09.490385-0800 Safari[2803:95905] [logging-persist] os_unix.c:43353: (0) open(/var/db/DetachedSignatures) - Undefined error: 0
2019-12-12 18:13:09.522278-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.522382-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.522447-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.522498-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.551921-0800 Safari[2803:95942] [RemotePlistController] The downloaded plist could not be loaded: Error Domain=NSCocoaErrorDomain Code=260 "The file couldn’t be opened because it doesn’t exist."
2019-12-12 18:13:09.577117-0800 Safari[2803:95905] [PerSitePreferences] Failed to set up all website policies before timeout
2019-12-12 18:13:09.578903-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.731939-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.753432-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.753519-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.753611-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.753669-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.891540-0800 Safari[2803:95905] [Safari] extractOptions:140: *** unknown hint identifier 'kCGImageSourceTypeIdentifierHint:dyn.age8u' -- ignoring...
2019-12-12 18:13:09.898688-0800 Safari[2803:95940] [RemotePlistController] The downloaded plist could not be loaded: Error Domain=NSCocoaErrorDomain Code=260 "The file couldn’t be opened because it doesn’t exist."
2019-12-12 18:13:09.921347-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.921500-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.921578-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.921635-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.922366-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.922439-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.922498-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.922545-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.922917-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.923024-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.923306-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.923363-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.923909-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.924171-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.946914-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:09.947027-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:10.044157-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:10.159500-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:10.159683-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:10.166124-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:10.500702-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:10.501052-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:10.504431-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:10.610748-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:10.861719-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:12.053141-0800 Safari[2803:95940] Creating client/daemon connection: 3889E9E5-F875-40CA-A484-27A377D595B9
2019-12-12 18:13:12.057331-0800 Safari[2803:95940] Got the query meta data reply for: com.apple.MobileAsset.CoreSuggestions, response: 0
2019-12-12 18:13:12.093342-0800 Safari[2803:95940] Consumed extension
2019-12-12 18:13:12.097874-0800 Safari[2803:95940] Got the query meta data reply for: com.apple.MobileAsset.CoreSuggestions, response: 0
2019-12-12 18:13:15.802250-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:15.805448-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:15.833848-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:15.835537-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:15.842346-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:15.844550-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:15.846696-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
2019-12-12 18:13:15.847707-0800 Safari[2803:95905] [Process] kill() returned unexpected error 1
The last line in the console (not shown in the above logging snippet) always states, "Program ended with exit code: 0". This is also confusing to me, because I believe that is telling me the extension closed without any errors. With all the error messages above that line, I'm not sure how to interpret what seems to be a pretty big discrepancy.
Any help anyone can provide would be MUCH appreciated!

Related

chrome driver not start in symfony panther using laravel.. showing following errors

Could not start chrome. Exit code: 1 (General error). Error output: [1660123102.783][SEVERE]: CreatePlatformSocket() returned an error: The requested service provider could not be loaded or initialized. (0x277A)
[1660123102.783][WARNING]: Unknown error 10106 mapped to net::ERR_FAILED
[1660123102.783][SEVERE]: CreatePlatformSocket() returned an error: The requested service provider could not be loaded or initialized. (0x277A)
[1660123102.783][WARNING]: Unknown error 10106 mapped to net::ERR_FAILED

Selenium error : error response has status code 21

I am getting an error in Selenium :
error response has status code 21 and message, timed out waiting for page to load

PBRequester failed with Error Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline."

Hi I am getting this error
PBRequester failed with Error Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={NSErrorFailingURLStringKey=https://gsp10-ssl.apple.com/use, _kCFStreamErrorCodeKey=8, NSErrorFailingURLKey=https://gsp10-ssl.apple.com/use, NSLocalizedDescription=The Internet connection appears to be offline., _kCFStreamErrorDomainKey=12, NSUnderlyingError=0x19735570 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "The Internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=8, NSErrorFailingURLStringKey=https://gsp10-ssl.apple.com/use, NSErrorFailingURLKey=https://gsp10-ssl.apple.com/use, NSLocalizedDescription=The Internet connection appears to be offline., _kCFStreamErrorDomainKey=12}}}
I know this error came because internet connection is loss in middle.But I am not getting how to handle this error?

DNU Restore gives lots of "HTTP request timed out"

I'm trying to run the samples from https://github.com/aspnet/home.
But I'm having problems updating the references. The restore is very slow and fails for some packages:
GET http://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.EnvironmentVariables'
Warning: FindPackagesById: Microsoft.Framework.Configuration.EnvironmentVariables
HTTP request timed out. Retrying.
GET http://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.EnvironmentVariables'
Warning: FindPackagesById: Microsoft.Framework.Configuration.Ini
HTTP request timed out. Retrying.
GET http://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Ini'
Warning: FindPackagesById: Microsoft.Framework.Configuration.Ini
HTTP request timed out. Retrying.
GET http://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Configuration.Ini'
Warning: FindPackagesById: Microsoft.Framework.Logging
HTTP request timed out. Retrying.
GET http://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging'
Warning: FindPackagesById: Microsoft.Framework.Logging
HTTP request timed out. Retrying.
GET http://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.Framework.Logging'
Warning: FindPackagesById: Newtonsoft.Json
HTTP request timed out. Retrying.
GET http://www.myget.org/F/aspnetvnext/api/v2/FindPackagesById()?id='Newtonsoft.Json'
Warning: FindPackagesById: Newtonsoft.Json
HTTP request timed out. Retrying.
GET http://www.nuget.org/api/v2/FindPackagesById()?id='Newtonsoft.Json'
Error: FindPackagesById: Microsoft.AspNet.Mvc.Razor
HTTP request timed out. Exiting.
I tried with different urls using nuget, myget, http, https.
I checked my internet connection.
There is a related issue in the dnx repo, but it did not help.
Any workaround to try?
I'm using mono 4.0.3.20 on CentOS.
Here is the workaround:
export MONO_THREADS_PER_CPU=2000
from http://www.mono-project.com/archived/articlethreadpool_deadlocks/

how to get the message in NSLocalizedDescription in iOS?

I have this error in requesting data from api.. All I want is to get only the message "The request timed out." in NSLocalizedDescription. How to get that? heres the return error below.
Error Domain=NSURLErrorDomain Code=-1001 "The request timed out."
UserInfo=0xa5bd490 {NSErrorFailingURLStringKey=api url,
NSErrorFailingURLKey=api url, NSLocalizedDescription=The request timed
out., NSUnderlyingError=0xa5763b0 "The request timed out."}
I solved already this problem issue...
NSString *getError = error.localizedDescription;