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

Next.js移动端insertBefore NotFoundError问题求助

Next.js 移动端500错误:仅影响iOS 15+及部分Android 12/13 Chrome用户

我遇到了一个仅影响特定移动端用户的Next.js错误,会触发严重的500应用错误:

  • 受影响设备:iOS v15及以上版本用户、部分Android v12和v13版本Chrome用户
  • 涉及技术栈:Next.js 12(搭配React 17+)、Next.js 13(搭配React 18)

通过Sentry捕获到的部分错误栈如下:

NotFoundError: The object can not be found here.
  at insertBefore([native code])
  at e(/_next/static/chunks/framework-847cdbe141f8ae13.js:9:89722)
  ...

以及:

NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before the new node is to be inserted is not a child of this node.
  at e(/_next/static/chunks/framework-847cdbe141f8ae13.js:9:89710)
  ...

仅移动端可复现该错误的触发场景包括:

  • 快速导航至Next.js应用
  • 从第三方来源(如社交媒体或谷歌搜索链接)进入应用
  • 打开已停滞的标签页后返回该页面

请问是否有其他开发者遇到过类似问题?

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.10 08:50:26