Pasta
Pasta

Reputation: 2491

Trigger.io [Errno 18] Cross-device link

When I try to run package ios on mac, I get the following:

[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

The settings are all filled up correctly on App config, local config, etc.

Here is debug output

........
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

Upvotes: 13

Views: 12808

Answers (4)

James Brady
James Brady

Reputation: 27492

This is fixed in the v1.4.34 Trigger.io platform version - see http://docs.trigger.io/en/v1.4/release-notes.html#v1-4-34

Upvotes: 1

Amir Nathoo
Amir Nathoo

Reputation: 1866

Are you using an external hard-drive? If so, it looks like we've been bitten by a limitation of Python here (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

In the short term, can you run your forge commands not on your external hard drive? We'll work on a fix for the underlying problem and report back here.

Upvotes: 7

Rotem Harel
Rotem Harel

Reputation: 736

Go to /Users/username/forge-workspace/compapp1/.template/generate_dynamic/ios_tasks.py line 294,

change this line: os.rename(tmp_file, filename)

to this one: shutil.move(tmp_file, filename)

Package again.

source

Upvotes: 23

Paul
Paul

Reputation: 61

I encountered the same issue compiling iOS packages on Ubuntu. I have an encrypted home directory, which is likely the cause of the cross-filesystem issue.

Luckily I was able to work out an easy fix thanks to @Amir's great response.

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

If dir is specified, the file will be created in that directory; otherwise, a default directory is used. The default directory is chosen from a platform-dependent list, but the user of the application can control the directory location by setting the TMPDIR, TEMP or TMP environment variables.

I simply moved the temp directory by starting Trigger with the following commands:

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

Upvotes: 1

Related Questions