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

Mac全新安装Flipper遇连接错误及设备检测问题求助

Flipper在Mac M1上的连接与设备识别问题

问题现象

启动Flipper时出现端口占用错误:

Connection error
Couldn't start connection server. Looks like you have multiple copies of Flipper running or another process is using the same port(s). As a result devices will not be able to connect to Flipper.

Please try to kill the offending process by running kill $(lsof -ti:PORTNUMBER) and restart flipper.

Error: listen EADDRINUSE: address already in use :::8089

执行命令杀死8089端口进程后,进程会立即重启。

同时,即使在Xcode模拟器中运行React Native应用,Flipper仍提示:

NO DEVICES FOUND No devices found Start a fresh emulator  or check the troubleshooting guide.

点击Flipper中的「Start Emulator / Simulator」图标后,弹出模态框无响应,加载动画无限转动。

环境信息

  • OS: macOS Monterey v12.6.3
  • 芯片: Apple M1

已尝试的无效操作

按照官方文档配置自定义端口,执行以下命令后无效果:

xcrun simctl spawn booted defaults write "Apple Global Domain" "com.facebook.flipper.ports" -string "1111,2222"

Flipper doctor检测显示一切正常,但问题依旧。

解决方案建议

  • 彻底排查端口占用进程
    1. 执行lsof -i :8089查看进程详细信息,确认进程名称和PID
    2. 若为第三方进程,用kill -9 [PID]强制终止(替换[PID]为实际进程ID);若为系统进程,尝试重启Mac后再启动Flipper
  • 修正自定义端口配置
    1. 关闭所有Flipper实例和模拟器
    2. 在Mac系统级别执行配置命令:defaults write com.facebook.flipper.plist "ports" -array "1111" "2222"
    3. 重启Flipper和模拟器,检查端口是否正常使用
  • 重置Flipper配置
    1. 关闭Flipper,删除配置目录:rm -rf ~/Library/Application\ Support/Flipper
    2. 重新启动Flipper,生成全新配置文件
  • 修复模拟器连接问题
    1. 在Xcode中打开模拟器,执行xcrun simctl list确认模拟器状态正常
    2. 重置模拟器:点击模拟器顶部菜单「Device」>「Erase All Content and Settings...」,完成后重启模拟器和Flipper
    3. 在React Native项目中手动指定端口:在ios/Podfile中添加Flipper端口配置,或在AppDelegate.m的Flipper初始化代码中指定自定义端口

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.18 07:05:24