Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of iOS build support is broken #17

Closed
galli-leo opened this issue May 31, 2018 · 3 comments
Closed

Installation of iOS build support is broken #17

galli-leo opened this issue May 31, 2018 · 3 comments

Comments

@galli-leo
Copy link

Hi there,

I wanted to use your script for installing Unity (with iOS build support) on our CI servers.

Unfortunately, while unity can successfully run, it does not seem to load the iOS Playback Engine and thus it cannot build the player for iOS. On my local machine everything works and I have verified that the packages are correctly installed on the CI server. The iOS dlls are found in the correct folder as well. Additionally, I ran the script twice as well as unity, to ensure that it really is installed and unity had some time to discover them. However, none of that worked.

Unsuccessful build on CI:

[Package Manager] Server::Start -- Port 56302 was selected

 COMMAND LINE ARGUMENTS:
/Applications/Unity/Unity.app/Contents/MacOS/Unity
-quit
-batchmode
-nographics
-username
(hidden)
-password
(hidden)
-serial
(hidden)
-executeMethod
BuildiOS.Build
-logFile
/Users/vsts/agent/2.133.3/work/1/a/build.log
Assertion failed on expression: '!projectPath.empty()'
 
(Filename: /Users/builduser/buildslave/unity/build/Editor/Src/ProjectUtility.cpp Line: 374)


Loading GUID <-> Path mappings...0.000063 seconds
Loading Asset Database...0.017959 seconds
Audio: FMOD Profiler initialized on port 54900
AssetDatabase consistency checks...0.054008 seconds
Refreshing native plugins compatible for Editor in 4.52 ms, found 0 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
DisplayProgressbar: Unity Package Manager
[Package Manager] Resolving 4 packages:
[Package Manager]  * Package :  com.unity.ads@2.0.3
    (location: /Users/vsts/Library/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.3)
[Package Manager]  * Package :  com.unity.analytics@2.0.13
    (location: /Users/vsts/Library/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.13)
[Package Manager]  * Package :  com.unity.purchasing@0.0.19
    (location: /Users/vsts/Library/Unity/cache/packages/packages.unity.com/com.unity.purchasing@0.0.19)
[Package Manager]  * Package :  com.unity.standardevents@1.0.10
    (location: /Users/vsts/Library/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.10)
[Package Manager] Resolve completed
Initialize engine version: 2017.3.0p2 (b91e4c5f54ad)
Forcing GfxDevice: Null
GfxDevice: creating device client; threaded=0
NullGfxDevice:
    Version:  NULL 1.0 [1.0]
    Renderer: Null Device
    Vendor:   Unity Technologies
Initialize mono
Mono path[0] = '/Applications/Unity/Unity.app/Contents/Managed'
Mono path[1] = '/Applications/Unity/Unity.app/Contents/Mono/lib/mono/2.0'
Mono config path = '/Applications/Unity/Unity.app/Contents/Mono/etc'
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56751
Begin MonoManager ReloadAssembly
Initializing Unity.PackageManager (PackageManager) v2017.3.0 for Unity v2017.3.0p2
Registering precompiled unity dll's ...
Register platform support module: /Applications/Unity/Unity.app/Contents/PlaybackEngines/MacStandaloneSupport/UnityEditor.OSXStandalone.Extensions.dll //<- OSX standalone loaded!!!
Registered in 0.000719 seconds.
Refreshing native plugins compatible for Editor in 1.75 ms, found 0 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
Mono: successfully reloaded assembly
- Completed reload, in  0.980 seconds
Registering platform support modules:
Registered platform support modules in: 0.114629s.
Native extension for OSXStandalone target not found
Begin MonoManager ReloadAssembly
Registering precompiled user dll's ...
Registered in 0.036282 seconds.
Refreshing native plugins compatible for Editor in 1.66 ms, found 0 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
Mono: successfully reloaded assembly
- Completed reload, in  0.716 seconds
Initializing Unity.PackageManager (PackageManager) v2017.3.0 for Unity v2017.3.0p2
Registering platform support modules:
Registered platform support modules in: 0.0657s.
Native extension for OSXStandalone target not found
Validating Project structure ... 0.018611 seconds.
Refresh: detecting if any assets need to be imported or removed ... Refresh: elapses 0.028040 seconds (Nothing changed)
Warming cache for 347 main assets: 0.001032 seconds elapsed
Initializing Unity extensions:
Unloading 74 Unused Serialized files (Serialized files now loaded: 0)
System memory in use before: 274.7 MB.
System memory in use after: 274.7 MB.

Unloading 42 unused Assets to reduce memory usage. Loaded Objects now: 571.
Total: 1.234061 ms (FindLiveObjects: 0.391822 ms CreateObjectMapping: 0.009332 ms MarkObjects: 0.803785 ms  DeleteObjects: 0.028298 ms)

Error building player because build target was unsupported
 
(Filename:  Line: -1)

Unloading 10 Unused Serialized files (Serialized files now loaded: 0)
System memory in use before: 295.4 MB.
System memory in use after: 295.5 MB.

Unloading 7 unused Assets to reduce memory usage. Loaded Objects now: 2566.
Total: 3.587696 ms (FindLiveObjects: 0.664893 ms CreateObjectMapping: 0.017000 ms MarkObjects: 2.881423 ms  DeleteObjects: 0.023554 ms)

Load scene 'Temp/__Backupscenes/0.backup' time: 0.037881 ms 
Setting up 2 worker threads for Enlighten.
  Thread -> id: 70000d93d000 -> priority: 1 
  Thread -> id: 70000d9c0000 -> priority: 1 
Unloading 0 Unused Serialized files (Serialized files now loaded: 0)
System memory in use before: 295.2 MB.
System memory in use after: 295.3 MB.

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 2566.
Total: 3.823746 ms (FindLiveObjects: 0.706092 ms CreateObjectMapping: 0.017084 ms MarkObjects: 3.093664 ms  DeleteObjects: 0.005575 ms)


*** Cancelled 'Build.Player.iOSSupport' in 1 seconds (577 ms)

Batchmode quit successfully invoked - shutting down!
Refresh: detecting if any assets need to be imported or removed ... Refresh: elapses 0.022545 seconds (Nothing changed)
Refresh: detecting if any assets need to be imported or removed ... Refresh: elapses 0.021749 seconds (Nothing changed)
[Package Manager] Server::Kill -- Server was shutdown
Cleanup mono
Exiting batchmode successfully now!

Successful local build:

[Package Manager] Server::Start -- Port 52266 was selected

LICENSE SYSTEM [2018530 18:25:21] Next license update check is after 2018-05-31T15:04:23


 COMMAND LINE ARGUMENTS:
/Applications/Unity/Unity.app/Contents/MacOS/Unity
-quit
-batchmode
-nographics
-username
(hidden)
-password
(hidden)
-serial
(hidden)
-executeMethod
BuildiOS.Build
-logFile
../build.log
Loading GUID <-> Path mappings...0.000325 seconds
Loading Asset Database...0.022694 seconds
Audio: FMOD Profiler initialized on port 54900
AssetDatabase consistency checks...0.110509 seconds
Refreshing native plugins compatible for Editor in 11.35 ms, found 1 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
DisplayProgressbar: Unity Package Manager
[Package Manager] Resolving 4 packages:
[Package Manager]  * Package :  com.unity.ads@2.0.3
    (location: /Users/leonardogalli/Library/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.3)
[Package Manager]  * Package :  com.unity.analytics@2.0.13
    (location: /Users/leonardogalli/Library/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.13)
[Package Manager]  * Package :  com.unity.purchasing@0.0.19
    (location: /Users/leonardogalli/Library/Unity/cache/packages/packages.unity.com/com.unity.purchasing@0.0.19)
[Package Manager]  * Package :  com.unity.standardevents@1.0.10
    (location: /Users/leonardogalli/Library/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.10)
[Package Manager] Resolve completed
Initialize engine version: 2017.3.0p2 (b91e4c5f54ad)
Forcing GfxDevice: Null
GfxDevice: creating device client; threaded=0
NullGfxDevice:
    Version:  NULL 1.0 [1.0]
    Renderer: Null Device
    Vendor:   Unity Technologies
Initialize mono
Mono path[0] = '/Applications/Unity/Unity.app/Contents/Managed'
Mono path[1] = '/Applications/Unity/Unity.app/Contents/Mono/lib/mono/2.0'
Mono config path = '/Applications/Unity/Unity.app/Contents/Mono/etc'
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56919
Begin MonoManager ReloadAssembly
Initializing Unity.PackageManager (PackageManager) v2017.3.0 for Unity v2017.3.0p2
Registering precompiled unity dll's ...
Register platform support module: /Applications/Unity/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.dll // iOS loaded!!!
Register platform support module: /Applications/Unity/Unity.app/Contents/PlaybackEngines/MacStandaloneSupport/UnityEditor.OSXStandalone.Extensions.dll
Registered in 0.002157 seconds.
Refreshing native plugins compatible for Editor in 0.56 ms, found 4 plugins.
Preloading 1 native plugins for Editor in 7.29 ms.
Mono: successfully reloaded assembly
- Completed reload, in  1.420 seconds
Registering platform support modules:
Registered platform support modules in: 0.148566s.
Native extension for OSXStandalone target not found
Native extension for iOS target not found
[XcodeApplications] RefreshListOfAvailableXcodeApplications in: 0.060872s.
Begin MonoManager ReloadAssembly
Registering precompiled user dll's ...
Registered in 0.037055 seconds.
Refreshing native plugins compatible for Editor in 0.57 ms, found 4 plugins.
Preloading 1 native plugins for Editor in 0.58 ms.
Mono: successfully reloaded assembly
- Completed reload, in  0.849 seconds
Initializing Unity.PackageManager (PackageManager) v2017.3.0 for Unity v2017.3.0p2
Registering platform support modules:
Registered platform support modules in: 0.067762s.
Native extension for OSXStandalone target not found
Native extension for iOS target not found
[XcodeApplications] RefreshListOfAvailableXcodeApplications in: 0.003853s.
Validating Project structure ... 0.009159 seconds.
Refresh: detecting if any assets need to be imported or removed ... 
Hashing assets ... 0.000 seconds
  file open: 0.000 seconds (2 files)
  file read: 0.000 seconds (0.001 MB)
  hash: 0.000 seconds
----- Compute hash(es) for 1 asset(s).

Refresh: elapses 0.106762 seconds
Updating Assets/Editor/BuildiOS.cs - GUID: 073587f33285b4762bc9b13caf169f76...
 done. [Time: 137.101045 ms] 
Unloading 126 Unused Serialized files (Serialized files now loaded: 0)
System memory in use before: 262.9 MB.
System memory in use after: 263.0 MB.

Unloading 142 unused Assets to reduce memory usage. Loaded Objects now: 809.
Total: 2.918840 ms (FindLiveObjects: 0.561714 ms CreateObjectMapping: 0.024793 ms MarkObjects: 2.281888 ms  DeleteObjects: 0.049846 ms)

- Starting compile Library/ScriptAssemblies/Assembly-CSharp-Editor.dll

...

Load scene 'Temp/__Backupscenes/0.backup' time: 0.044122 ms 
Unloading 0 Unused Serialized files (Serialized files now loaded: 0)
[00:00:00] Enlighten: Reflection Probes took 38.694920 seconds. Cancelled, so not done yet.
System memory in use before: 299.4 MB.
System memory in use after: 299.6 MB.

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 2880.
Total: 12.134338 ms (FindLiveObjects: 1.048075 ms CreateObjectMapping: 0.054204 ms MarkObjects: 11.022089 ms  DeleteObjects: 0.009009 ms)


*** Completed 'Build.Player.iOSSupport' in 42 seconds (41986 ms)

- Starting compile Library/ScriptAssemblies/Assembly-CSharp.dll
- Finished compile Library/ScriptAssemblies/Assembly-CSharp.dll
Symbols will be read from Temp/Assembly-CSharp.dll.mdb
Script Module: Assembly-CSharp.dll
Pass: 0 took 5 milliseconds
Pass: 1 took 12 milliseconds
- Starting compile Library/ScriptAssemblies/Assembly-CSharp-Editor.dll
@sttz
Copy link
Owner

sttz commented Aug 14, 2018

Sorry, somehow I missed your issue.

Unfortunately, I don't know what could be the cause. The script just installs Unity's packages, like the official Unity installer would. As far as I know, there's no additional setup required besides unpacking the iOS playback engine to the Unity folder.

Did you manage to figure something out in the meantime?

@galli-leo
Copy link
Author

Hmm it's been quite a bit. IIRC Unity actually couldn't get a license, so it didn't enable iOS Build Support.

Btw. since you seem to be active now:

I rewrote your script, to only require the base url (Unity provides a handy ini file with all packages & sizes listed) as well as multithreading. Would you be interested in this updated script? Should also be possible to run that on Linux or Windows with little modifications.

@sttz
Copy link
Owner

sttz commented Aug 15, 2018

Thanks, good to know!

Not sure what you mean with the base url and ini file? It's already using those.

As for the multithreading, there's a beta of an upcoming rewrite that has parallelized downloads and installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants