Trigger.io [Errno 18]跨设备链接

时间:2012-07-20 11:29:46

标签: trigger.io

当我尝试在Mac上运行 package ios 时,我得到以下内容:

[INFO] Forge tools running at version 3.3.5
[INFO] Update result: you already have the latest tools
[INFO] Configuration is unchanged: using existing templates
[INFO] Checking JavaScript files...
[INFO] JavaScript check complete
[INFO] Verifying your configuration settings...
[INFO] Configuration settings check complete
[INFO] Development build created. Use forge run to run your app.
[INFO] Forge tools running at version 3.3.5
[INFO] Checking JavaScript files...
[INFO] JavaScript check complete
[INFO] Verifying your configuration settings...
[INFO] Configuration settings check complete
[INFO] Starting package process for iOS
[INFO] Going to package: /Users/******************/device-ios.app
[INFO] Plist OK
[INFO] 1 Provisioned Device(s):
[INFO] ['c**************************b']
[ERROR] [Errno 18] Cross-device link

这些设置都在App config,本地配置等上正确填写

这是调试输出

........
in run
    self._run_task(func_name, args, kw)
  File "/Users/username/forge-workspace/compapp1/.template/generate_dynamic/build.py", line 293, in _run_task
    self.tasks[func_name](self, *args, **kw)
  File "/Users/username/forge-workspace/compapp1/.template/generate_dynamic/ios_tasks.py", line 568, in package_ios
    certificate_password=certificate_password,
  File "/Users/username/forge-workspace/compapp1/.template/generate_dynamic/ios_tasks.py", line 362, in create_ipa_from_app
    self._create_entitlements_file(build, plist_dict, temp_file_path)
  File "/Users/username/forge-workspace/compapp1/.template/generate_dynamic/ios_tasks.py", line 299, in _create_entitlements_file
    _replace_in_file(temp_file_path, 'APP_ID', bundle_id)
  File "/Users/username/forge-workspace/compapp1/.template/generate_dynamic/ios_tasks.py", line 294, in _replace_in_file
    os.rename(tmp_file, filename)
OSError: [Errno 18] Cross-device link

4 个答案:

答案 0 :(得分:21)

转到/Users/username/forge-workspace/compapp1/.template/generate_dynamic/ios_tasks.py第294行,

更改此行: os.rename(tmp_file, filename)

到这一个: shutil.move(tmp_file, filename)

再次打包。

source

答案 1 :(得分:6)

您使用的是外置硬盘吗?如果是这样,看起来我们已经被Python的限制所困扰(http://docs.python.org/library/os.html#os.rename):

The operation may fail on some Unix flavors if src and dst are on different filesystems

在短期内,您可以运行不在外置硬盘上的锻造命令吗?我们将针对潜在问题进行修复并在此处进行报告。

答案 2 :(得分:1)

我遇到了在Ubuntu上编译iOS包的相同问题。我有一个加密的主目录,这可能是跨文件系统问题的原因。

幸运的是,由于@ Amir的出色回应,我能够轻松解决问题。

来自http://docs.python.org/dev/library/tempfile.html#tempfile.mkstemp

  

如果指定了dir,则将在该目录中创建该文件;否则,使用默认目录。默认目录是从与平台相关的列表中选择的,但应用程序的用户可以通过设置TMPDIR,TEMP或TMP环境变量来控制目录位置。

我只是通过使用以下命令启动Trigger来移动临时目录:

export TMPDIR="/home/me/tmp"
python /home/me/source/TriggerToolkit/run_trigger_toolkit.py

答案 3 :(得分:1)

这已在v1.4.34 Trigger.io平台版本中修复 - 请参阅http://docs.trigger.io/en/v1.4/release-notes.html#v1-4-34