You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter TextField在iOS端引发WebProcess崩溃及卡顿问题求助

iOS Flutter TextField引发WebProcess崩溃卡顿问题

在iOS端开发Flutter应用时,点击TextField并输入拉丁字母后,控制台输出以下崩溃日志:

[Process] 0x112000940 - [PID=73674] WebProcessProxy::didClose: (web process 73674 crash)
[Process] 0x112000940 - [PID=73674] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=4
[Process] 0x13b897018 - [pageProxyID=6, webPageID=7, PID=73674] WebPageProxy::processDidTerminate: (pid 73674), reason 4
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x111004e40 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=73674, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
[Loading] 0x13b897018 - [pageProxyID=6, webPageID=7, PID=73674] WebPageProxy::dispatchProcessDidTerminate: reason=Crash
[ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]_block_invoke
[XPC] Handle connection with error: Connection interrupted
Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
[Process] 0x112001930 - [PID=74275] WebProcessProxy::didBecomeUnresponsive:
[Process] 0x13a780018 - [pageProxyID=360, webPageID=361, PID=74275] WebPageProxy::processDidBecomeUnresponsive:
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x111006580 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebProcess Suspended Assertion' for process with PID=73685, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}

随后应用出现卡顿,偶尔会崩溃。当前应用堆内存仅约20MB,理论上不会触发此类问题。新建空白Flutter项目复现相同代码未出现异常,且项目未集成WebView组件。

相关代码如下:

import 'package:flutter/material.dart';

class SearchScreen extends StatelessWidget {
  const SearchScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.amber,
      appBar: AppBar(
        title: TextFormField(),
      ),
    );
  }
}

可能的原因及排查方向

  • 第三方依赖冲突:检查pubspec.yaml中的依赖包,尤其是涉及文本输入、输入法适配或iOS原生能力扩展的库,部分包可能间接引入WebKit相关逻辑或修改了系统权限配置。
  • iOS原生配置异常:核查项目的Info.plist和Entitlements文件,确认是否存在与WebKit、字体服务相关的权限配置错误,导致系统启动WebProcess时权限不足。
  • Flutter版本兼容问题:当前使用的Flutter版本可能存在TextField与特定iOS版本的适配bug,尝试切换至最新稳定版或已知兼容的旧版本测试。
  • 构建缓存损坏:执行flutter clean清理项目缓存,删除iOS目录下的Pods文件夹和Build文件夹后重新构建项目。
  • 输入法兼容性:切换至iOS系统默认输入法测试,排除第三方输入法与Flutter TextField的交互冲突。

内容的提问来源于stack exchange,提问作者JBTG

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.23 12:58:13