Why I get the console warning: [Process] kill() re

2020-01-29 03:28发布

Since I installed the iOS 13.2 beta, I have been getting a debug console error message. It happens every time I load a ViewController with a WKWebView object in the storyboard.

Then the following message is shown continuously 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  
2019-10-10 12:10:47.934169+0200 (...) [Process] kill() returned unexpected error 1  
2019-10-10 12:10:47.947668+0200 (...) [Process] kill() returned unexpected error 1  
2019-10-10 12:10:47.964375+0200 (...) [Process] kill() returned unexpected error 1  
2019-10-10 12:10:48.193556+0200 (...) [Process] kill() returned unexpected error 1  
2019-10-10 12:10:48.193723+0200 (...) [Process] kill() returned unexpected error 1  
2019-10-10 12:10:48.193941+0200 (...) [Process] kill() returned unexpected error 1  
2019-10-10 12:10:48.194012+0200 (...) [Process] kill() returned unexpected error 1  
2019-10-10 12:10:48.195679+0200 (...) [Process] kill() returned unexpected error 1  
2019-10-10 12:10:48.200432+0200 (...) [Process] kill() returned unexpected error 1  
2019-10-10 12:10:48.207225+0200 (...) [Process] kill() returned unexpected error 1  
2019-10-10 12:10:48.207298+0200 (...) [Process] kill() returned unexpected error 1 

At the moment I close the view I get the following message:

2019-10-10 12:32:41.577505+0200 (...)[ProcessSuspension] 0x1051e50b0 - ProcessAssertion::processAssertionWasInvalidated() 

Sometimes I get the following message in the middle while the web view is loaded: (I can't say when it happens)

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 the if I touch the screen it starts again

    2019-10-10 12:10:48.200432+0200 (...) [Process] kill() returned unexpected error 1  
    2019-10-10 12:10:48.207225+0200 (...) [Process] kill() returned unexpected error 1  
    2019-10-10 12:10:48.207298+0200 (...) [Process] kill() returned unexpected error 1 
...

I have checked that this is happening in all of the view controller with WKWebViews of my app, so it doesn't seems to be a code error.

This doesn't crash the app, but I would like to know why this is happening, and if someone else is having the same issue.

7条回答
姐就是有狂的资本
2楼-- · 2020-01-29 03:43

I don't really know why this affects it, but hey ¯\_(ツ)_/¯

I am using Firebase - and here was a line in my Podfile:

pod 'Firebase/DynamicLinks'

After removing that, I no longer got these logs. Strange, but it works I guess if you don't yet need this pod for now.

This may also be an issue for other pods, who knows.

I have that line in my Podfile for a feature I am yet to implement, but can't until I get a full Apple Developer Membership account.

查看更多
我只想做你的唯一
3楼-- · 2020-01-29 03:46

It is not fixed in the latest iOS 13.3 release

查看更多
Lonely孤独者°
4楼-- · 2020-01-29 03:47

As in the accepted answer, this is a WebKit bug and it seems that it has been fixed but not released up until the latest iOS release 13.2.2 (at the time of writing this answer).

As a workaround, however, you can disable/hide the logs temporarily as mentioned in an answer by @iDevzilla:

1- From Xcode menu open: Product > Scheme > Edit Scheme

2- On your Environment Variables set OS_ACTIVITY_MODE = disable

enter image description here

This will ONLY hide the logs so you can continue developing and testing on iOS. As some indicated, this problem crashes their apps no matter what (for me it is not until now). Also, be careful using this method as it might hide important error messages!

查看更多
够拽才男人
5楼-- · 2020-01-29 03:48

For the other two five macOS developer out there: It’s also not fixed in macOS 10.15.2.

查看更多
叼着烟拽天下
6楼-- · 2020-01-29 03:51

The iOS bug with WKWebView is not solved yet, even with iOS 13.3 (at the time of writing this answer). Nonetheless, no issue is not seen on UIWebView.

For Ionic developers, Ionic supports two webviews for a few years now (UIWebView and WKWebView). Since Ionic V3, WKWebview is used by default when building for iOS. Ionic documentation favours WKWebview as the the best option for any app, as it features many improvements over the legacy UIWebView.

Till fixing this iOS bug, you can force using UIWebView in Ionic apps by adding the following preference line to the config.xml under the tag widget and not platform.

<preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />

This basically forces Ionic to use CDVUIWebViewEngine which is not impacted by the bug.

查看更多
看我几分像从前
7楼-- · 2020-01-29 04:02

It's a bug in WebKit (or the underlying OS itself). And no, it was not fixed in 13.[2,3] release.

see:

查看更多
登录 后发表回答