Search Unity

Couldn't build player because of unsupported data on target platform.

Discussion in 'Editor & General Support' started by george_vasilchenko, Mar 25, 2019.

  1. george_vasilchenko

    george_vasilchenko

    Joined:
    Sep 20, 2014
    Posts:
    14
    Hi folks,

    I am experiencing this problem while building my project.
    The build fails with a few messages found in BuildReport:
    • Couldn't build player because of unsupported data on target platform.
    • Building Player failed
    • Building - Failed to write file: globalgamemanagers.assets
    Doesn't really look a lot to start with. What makes it a bit more complex is that the same project is build successfully with Cloud build service.

    Searching for similar errors didn't yield much, only some legacy GUI related methods failures. Not really applicable to this case imho.

    Anyone has experienced this issue with a more recent versions of Unity? I am using 2018.3.8, Android.
     
  2. StartStart

    StartStart

    Joined:
    Jan 2, 2013
    Posts:
    150
    Backup your project > Remove all folder but keep Assets folder > Try build again.
     
  3. george_vasilchenko

    george_vasilchenko

    Joined:
    Sep 20, 2014
    Posts:
    14
    Unfortunately it didn't help.
    One more missing bit of info: I build it all in -batchmode.
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,279
    Can you share the Log file?
     
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Does it work when building from the Editor?
     
  6. george_vasilchenko

    george_vasilchenko

    Joined:
    Sep 20, 2014
    Posts:
    14
    Sure. The complete log file is build.txt and json formatted build messages file is build-messages.txt.
    I have removed all sensitive information from the build log file.
     

    Attached Files:

  7. george_vasilchenko

    george_vasilchenko

    Joined:
    Sep 20, 2014
    Posts:
    14
    Yes, absolutely. Builds fine with no related warnings.
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please share your build script
     
  9. george_vasilchenko

    george_vasilchenko

    Joined:
    Sep 20, 2014
    Posts:
    14
    The script contains some helper classes for arguments, validation and parsing. Those work properly since the provided input data is always correct within the build. The build runs successfully if I build it on another machine.
     

    Attached Files:

  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,279
    Are you building from the command line? Does it work if you use the build player window?
     
  11. george_vasilchenko

    george_vasilchenko

    Joined:
    Sep 20, 2014
    Posts:
    14
    This is what I have tried:
    • Windows machine (my PC), Unity Editor Build => OK
    • Windows machine (my PC), command line => OK
    • Unity Cloud build => OK
    • Linux Machine 1 (hosted in cloud), Docker - command line => OK
    • Linux Machine 2 (hosted on my PC), Docker - command line => BAD (errors mentioned in post title)
    It actually makes no sense to me why would a docker container hosted on a machine A behave different when hosted on a machine B, it is completely isolated and unaware of the host configuration. The docker image is of course the same.
     
  12. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,279
    Are you able to submit a bug report with a sample project?
     
  13. george_vasilchenko

    george_vasilchenko

    Joined:
    Sep 20, 2014
    Posts:
    14
    The project I work on is commercial.
    What are the rules/regulations at Unity regarding this?
     
  14. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,279
    Its fine to submit a full commercial project and the project will only be used for the bug. How big is the project? Ideally, it would be better if you could provide a very simple project that just shows the bug however if it's only happening in the project then we can also take the whole thing. If it's very large we may need to provide an FTP link so you can upload it.
     
  15. george_vasilchenko

    george_vasilchenko

    Joined:
    Sep 20, 2014
    Posts:
    14
    Sounds good Karl, lets do it then. The project size is 220MB. Let me know the next steps pls.
     
  16. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Reviewing the error, "Failed to write file", could it be R/W permissions that might be different between the systems? Just a guess though, but something you might want to check.
     
  17. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,279
    220MB is fine. To report a bug:https://unity3d.com/unity/qa/bug-reporting
    Its also worth checking R/W like Jeff mentioned. If thats the problem then its still worth reporting so we can try and improve the error message.
     
  18. george_vasilchenko

    george_vasilchenko

    Joined:
    Sep 20, 2014
    Posts:
    14
    Bull's eye!
    Permissions are the problem. The cloud hosted docker container is spun up using 'docker run' command, locally I use 'docker-compose up'. Although I specify my volumes identically, something still goes wrong with the permissions. And the weird part is that the control over the permissions is not that clear. I was convinced that since I am 'root' in both cases I am almighty to run anything anywhere. It turns out that some file operation within the Unity build fails, not clear why though.. If I do not specify any volumes to mount on the host (from container to my PC) I am safe, it builds fine.
    I believe there is no bug here just not a very clear message in the log.
    @karl_jones indeed a more informative exception message would be handy.

    I will report the message-related issue.
    Everyone involved, thanks for the help in the investigation!
     
    karl_jones likes this.