Xcode 14.3构建错误:“无法启动PIF传输会话(操作正在进行中?)”

huangapple go评论151阅读模式
英文:

Xcode 14.3 build error "unable to initiate PIF transfer session (operation in progress?)"

问题

遇到了在 Xcode 14.3 中的构建错误,阻止我构建我的应用程序。

“构建服务无法创建构建操作:在处理消息时出现未知错误:MsgHandlingError(消息:“无法启动 PIF 传输会话(操作正在进行中?)”)

没有比这更详细的信息 - 删除派生数据,重新启动 Xcode,重置软件包缓存都没有帮助。

有什么想法吗?

我尝试删除派生数据,重新启动 Xcode,重置软件包缓存,但都无济于事。

英文:

Ran into this build error in Xcode 14.3 that prevents me from building my app.

Build service could not create build operation: unknown error while handling message: MsgHandlingError(message: "unable to initiate PIF transfer session (operation in progress?)")

There isn't more detail than that--deleting derived data, restarting Xcode, resetting package caches did not help.

Any ideas?

I tried deleting derived data, restarting Xcode, and resetting package caches to no avail.

答案1

得分: 83

更新:正如其他人提到的,可以通过简单地关闭Xcode然后重新打开它,然后执行常规构建(Command+B)而不是运行来解决这个问题。在尝试其他选项之前,试试这个方法!

该错误似乎可以通过以下步骤解决:

  1. 关闭Xcode
  2. 打开Finder,然后删除派生数据文件夹:~/Library/Developer/Xcode/DerivedData
  3. 打开Finder,按CMD+SHIFT+G,然后前往 ~/Library/Caches/org.swift.swiftpm。右键单击 > 显示包内容,然后删除 repositories 文件夹和 repositories.lock 文件。
  4. 打开Xcode,让它自然构建

同事还通过删除派生数据,然后在Xcode 14.1或14.2上重建,然后切换回Xcode 14.3来解决了这个问题。下次再看到这个问题时,将再次尝试这些步骤以确认是否可靠。

英文:

UPDATE: As some others have mentioned, this can be fixed by simply closing Xcode and re-opening it, then doing a regular build (Command+B) instead of running it. Give that a shot before trying the other options!

The error seemed to be resolved by doing the following:

  1. Close Xcode
  2. Open finder, and delete the derived data folder: ~/Library/Developer/Xcode/DerivedData
  3. Open finder, CMD+SHIFT+G and go to ~/Library/Caches/org.swift.swiftpm. Right-click > Show Package Contents, and delete the repositories folder and repositories.lock file.
  4. Open Xcode and let it build naturally

Coworker also resolved this by deleting derived data, rebuilding on Xcode 14.1 or 14.2, and then switching back to Xcode 14.3. Will try these steps again next time I see it to confirm if this is a reliable fix.

答案2

得分: 55

关闭并重新打开Xcode似乎也会消除这个错误。

英文:

Closing and opening Xcode seems to also remove this error.

答案3

得分: 4

错误是由缓存问题引起的。重新启动 Mac 和 Xcode 可以解决它,或者

打开 Xcode 设置,
然后转到位置,点击“Derived Data”并删除所有派生数据,然后清理并构建项目,错误就会消失。

英文:

The Error is appeared due to cache issue.
Restart mac and xcode can solved it OR

Open Xcode Setting ,
the Go to Location and click on Dervied Data and Delete All Derived data the clean and build the project error are gone

Xcode 14.3构建错误:“无法启动PIF传输会话(操作正在进行中?)”

答案4

得分: 1

我可以为您翻译以下内容:

  1. 关闭 Xcode

  2. 进入项目并执行以下命令:

    • 删除 node_modules 文件夹
    • 删除 package-lock.json 文件
    • 删除 yarn.lock 文件
    • 执行 npm cache clean --force
    • 执行 npm install
  3. 打开 Finder,删除 DerivedData 文件夹:
    ~/Library/Developer/Xcode/DerivedData

  4. 打开 Finder,按下 CMD+SHIFT+G 并前往:
    ~/Library/Caches/org.swift.swiftpm。右键点击 > 显示包内容,并删除 repositories 文件夹和 repositories.lock 文件。

  5. 打开 Xcode,执行 CLEAN PREV BUILD,并让它自然构建。

英文:

Runs for me:

  1. Close Xcode

  2. Run into the project :

    rm -rf node_modules
    rm -f package-lock.json
    rm -f yarn.lock
    npm cache clean --force
    npm install

  3. Open finder, and delete the derived data folder:
    ~/Library/Developer/Xcode/DerivedData

  4. Open finder, CMD+SHIFT+G and go to
    ~/Library/Caches/org.swift.swiftpm. Right-click > Show Package
    Contents, and delete the repositories folder and repositories.lock
    file.

  5. Open Xcode CLEAN PREV BUILD and let it build naturally

答案5

得分: 1

关闭和打开对我的情况有效。

英文:

Close and open works for my case.

huangapple
  • 本文由 发表于 2023年4月11日 04:59:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/75980685.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定