Why I get the console warning: [Process] kill() returned unexpected error 1 when I load a WKWebView in iOS13.2?
🚀 Why am I getting the console warning: [Process] kill() returned unexpected error 1 when I load a WKWebView in iOS13.2?
Are you a fellow iOS developer who recently updated to iOS 13.2 beta and encountered an annoying console warning everytime you load a ViewController with a WKWebView object in the storyboard? 😫
You're not alone! Many developers have faced this issue and wondered why they are seeing the following message repeatedly displayed in the console while the web view is visible:
2019-10-10 12:10:47.867830+0200 (...) [Process] kill() returned unexpected error 1
2019-10-10 12:10:47.908698+0200 (...) [Process] kill() returned unexpected error 1
2019-10-10 12:10:47.908814+0200 (...) [Process] kill() returned unexpected error 1
...
And also, when closing the view, you might have come across this message:
2019-10-10 12:32:41.577505+0200 (...)[ProcessSuspension] 0x1051e50b0 - ProcessAssertion::processAssertionWasInvalidated()
Sometimes, in the middle of loading the web view, you may have seen these messages:
2019-10-10 12:33:11.453528+0200 (...) Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2019-10-10 12:33:11.459713+0200 (...) Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service
And if you touched the screen, the console warnings started again! 😱
⚡️ What's Happening?
Firstly, let's clarify that these warnings do not crash your app, so you can breathe a sigh of relief! However, it's understandable that you want to know why they are occurring and if other developers have experienced the same issue. 👩💻
The good news is that this is not a code error on your end. These warning messages are related to a bug in iOS 13.2 beta, specifically with the WKWebView component. So rest assured, you're not going crazy! 🙌
🌟 The Temporary Solution
While we wait for Apple to address this issue and fix it in a future update, there is a temporary solution that can help suppress these pesky console warnings.
Before loading your WKWebView, add the following line of code:
UserDefaults.standard.set(false, forKey: "_UIConstraintBasedLayoutLogUnsatisfiable")
This essentially disables unsatisfiable layout constraint logging and should prevent the warning messages from cluttering your console. However, keep in mind that this is just a workaround and not a permanent solution.
🌐 Stay Updated and Provide Feedback
As with any beta version, it's important to keep an eye out for updates and bug fixes from Apple. Make sure to regularly check for software updates and install them as soon as they are available. In most cases, these issues are addressed in subsequent releases.
Additionally, consider providing feedback directly to Apple. Their developer portal provides a way for you to report bugs and issue feedback on beta versions. By doing so, you can contribute to making the iOS experience better for everyone.
📣 Share Your Experience
Have you also encountered this console warning when using WKWebView in iOS 13.2 beta? How did you handle it? Share your experience and any additional tips or insights you may have in the comments below. Let's help each other navigate through this beta release! 🚀
Remember to subscribe to our newsletter for more helpful tips and updates on iOS development. Happy coding! 👩💻👨💻