Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Project with spaces in directory name started failing

Discussion in 'Unity Build Automation' started by matias_arje, Apr 9, 2015.

  1. matias_arje

    matias_arje

    Joined:
    Apr 1, 2015
    Posts:
    7
    It appears that since today a build (with no recent significant changes) started failing. The logs indicate that it is caused by spaces in project name. The failing action seems an external command in cleanup phase. I would guess that the directory should be enclosed in quotes when invoking the external command (the ls command tries to process all words in project directory name separately).

    Is this happening to anyone else or just me? If this is a bug introduced by a recent update, is it expected to be fixed soon, or should I start looking into renaming the directories in git?

    Thanks!

    This is the failure in full build log:

    1069: [Unity] Cleanup mono
    1070: [Unity] Unloading native extension module for target: iOS
    1071: [Unity] Exiting batchmode successfully now!
    1072: Cleaning up
    1073: ls: Exclusion: No such file or directory
    1074: ls: Spot: No such file or directory
    1075: + Building exported player (iOS)
    1076: find: /BUILD_PATH/pet-spot.551b97ea64b2ee6d550cec02.default-ios/Pet
    1077: Spot
    1078: Exclusion: No such file or directory

    For comparison, this is the same log passage from yesterday, which succeeded.

    1049: [Unity] Cleanup mono
    1050: [Unity] Unloading native extension module for target: iOS
    1051: [Unity] Exiting batchmode successfully now!
    1052: Saving Library to cache
    1053: Cleaning up
    1054: + Building exported player (iOS)
    1055: Detected Framework: /BUILD_PATH/BVR_TEMP_DIR/d20150408-2043-ppe7s8/Pet Spot Exclusion proto
     
  2. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    740
    We fixed the problem and rolled out a patch. Would you please try it again now and let us know if it works properly again? :)
     
    matias_arje likes this.
  3. matias_arje

    matias_arje

    Joined:
    Apr 1, 2015
    Posts:
    7
    Now building the project works again! Thanks for the quick response!
     
    David-Berger likes this.
  4. Kiloutre

    Kiloutre

    Joined:
    Jan 20, 2021
    Posts:
    1
    Still encountering the same issue today in 2021, tried with Unity Hub 3.0.0-beta.4 and various unity versions (2020.3.17f1, 2019.4.22f1)
     
  5. Forger_One

    Forger_One

    Joined:
    Apr 23, 2020
    Posts:
    1
    I had this issue today with Unity 2021.3.16f1. Simply renaming the folder and reimporting the project into unity hub seems to have fixed it.
     
    halley likes this.
  6. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    1,882
    Honestly, if you're going to develop software, you should just develop the discipline. Anything and everything related to compiling code should just avoid spaces and oddball characters in filenames. Just as C# variable names cannot have spaces or brackets or periods in them, filenames should also avoid any characters which may confuse the tools that access them.

    It's definitely possible for the people on the Unity (and Blender and Linux and Android and iOS and...) teams to play whack-a-mole and find every possible condition that has an issue with spaces in filenames, and fix those issues, but it's much more straightforward to learn the data hygiene skills to avoid the likelihood of getting caught out by this.