Search Unity

iphone trampoline

Discussion in 'iOS and tvOS' started by deadbug, Aug 16, 2010.

  1. deadbug

    deadbug

    Joined:
    Sep 9, 2009
    Posts:
    165
    Hey all,
    am using unity 3 b5 and have this error i cant solve when i build.

    Error building Player: FileNotFoundException: Could not find file "/Users/christopher/Desktop/Go Go Samurai/Temp/StagingArea/iPhone-Trampoline/Unity-iPhone.xcodeproj/christopher.pbxuser".
    UnityEditor.HostView:OnGUI()

    Has anyone had the same?

    Thanks,
    Chris
     
  2. dayglo

    dayglo

    Joined:
    Apr 28, 2010
    Posts:
    24
    I've had the same this morning mate!
     
  3. mrvaibhavpanchal

    mrvaibhavpanchal

    Joined:
    Nov 10, 2008
    Posts:
    4
    Hmmm. Me too!
    I was able to run scene once on iPad though.
     
  4. umop

    umop

    Joined:
    Apr 29, 2009
    Posts:
    4
    Any workarounds for this?
     
  5. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    This is probably the result of absolute pathnames being used to locate assets (if the project folder has moved then the paths might be incorrect). You should be able to fix this by deleting the assets referred to in the error and adding them back into the project. Alternatively, just move the project folder back to its original location.

    This problem is a known and logged bug in Unity but wasn't detected in time for the 3.0 release. It is scheduled to be fixed in the next version.
     
  6. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    Hey andeee,

    my error is the same but I don't know what asset this error is referring to

    Error building Player: FileNotFoundException: Could not find file "/Users/glennjones/src/dev/matchPoint/Temp/StagingArea/iPhone-Trampoline/Unity-iPhone.xcodeproj/glennjones.pbxuser".
    UnityEditor.HostView:OnGUI()

    That file is not on my machine, how and when is it created. I get this when tryinh to build a universal application.

    Thanks

    iByte
     
  7. mswehli

    mswehli

    Joined:
    Oct 19, 2010
    Posts:
    53
    Hi,
    I get almost the exact same error but also no idea what it refers to. just says my name .pbxuser.

    Anyone figure out how to fix this?
     
  8. mswehli

    mswehli

    Joined:
    Oct 19, 2010
    Posts:
    53
    Think its a problem with the project file, i created a new project, duplicated all the assets, and references all the scripts and textures, and it built normally. This is fine because its a small project, but for larger projects i don't think this solution would be viable.

    [EDIT] After creating the new project, i found that the temp folder in my older project directory had been deleted, so i opened the old project again and built it and it worked. Guess it just needed to recreate the temp folder?
     
    Last edited: Oct 26, 2010
  9. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    I checked my project folder and there was a TEMP directory. I deleted it and now I am able to build.

    Thanks

    iByte
     
  10. Sam at FPS

    Sam at FPS

    Joined:
    Sep 1, 2009
    Posts:
    80
    Just wanted to add that I just got this error too.

    Out of nowhere my project won't build and keeps showing that error.

    Re-imported all assets. No good.
    Re-started Unity. No good.
    Deleted temp file. No good.
    Re-started computer. No good.

    I'm re-creating the whole project right now. I'm not happy, and my boss is even less happy after I told him 'Something went wrong and the whole project is f*cked and I don't know how to fix it'.

    This better work....:mad:
     
  11. Sam at FPS

    Sam at FPS

    Joined:
    Sep 1, 2009
    Posts:
    80
    Hmmm.. ok, maybe instead of getting angry I should ask for help.

    I have possibly accidentally flicked or switched or done something. Now when I build in Unity (just build, not build and run), Unity doesn't open up Xcode like it used to.

    I've re-created the project and I no longer get the error mentioned in the OP, but some xcode build scripts are not running now because Unity is not opening up the xcode project.

    Does that ring any bells for anyone?
     
  12. schplurg

    schplurg

    Joined:
    Mar 21, 2009
    Posts:
    208
    I am having this problem too and have not found a solution. I have not moved any assets or my projects folder. The only thing I did was set a texture to import at 2048 instead of 1024, then I put it back to 1024 when I saw this error. ???

    The error happens when I use "build" or "build and play".

    Any word on when this bug fix will be available?
     
  13. schplurg

    schplurg

    Joined:
    Mar 21, 2009
    Posts:
    208
    Update:

    After exporting all assets to a Unity Package, the original project now works again! I never even created the new project, in fact I accidentally "built and played" the old one and it worked.

    What the...?
     
  14. Thom Denick

    Thom Denick

    Joined:
    Jul 12, 2010
    Posts:
    32
    The reason it suddenly started working is because you finally deleted your temp folder, which you do by simply quitting and restarting Unity.
     
  15. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    This problem started happening in our project. I can append to an existing Xcode project, but whenever I try to build the project new for iOS, I get the error quoted by the original poster. Deleting the Temp folder and/or quitting Unity has no effect.

    I even tried renaming user.pbxuser to danielbrauer.pbxuser during the build process (the generic file gets created near the beginning of the build, whereas the error moving the specific name happens near the end). This caused a different error:

    Code (csharp):
    1. Error building Player: IOException: Failed to Copy File / Directory from 'Temp/StagingArea/iPhone-Trampoline/Unity-iPhone.xcodeproj/project.pbxproj' to '/Users/danielbrauer/ [path to project] /Unity-iPhone.xcodeproj/project.pbxproj'.
    I can't fix this myself, because that file does exist. The use of absolute and relative paths might be related to the known problem that andeeee mentioned.
     
  16. Fastrak

    Fastrak

    Joined:
    Oct 13, 2008
    Posts:
    18
    I only see this error if I am opening a project created on another machine. When I get it I;

    Open the xcode project manually and build / save once.

    Now Unity will be able to build and append to this project correctly.
     
  17. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    This was fixed for me in Unity 3.2.
     
  18. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    Actually, it still appears to be happening in 3.2 and 3.3. I don't know what causes it yet, or why it works sometimes.
     
  19. Zoneman

    Zoneman

    Joined:
    Feb 6, 2010
    Posts:
    42
    I think I found the solution. This worked for me.

    In my case it seemed the error occurred because I renamed my Unity parent project folder. I changed the name back to the original name, and it worked fine.

    It seems Unity / xCode builds, doesn't favor changing the name for the project parent folder(directory).

    Lemme know
     
  20. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    We haven't changed the name of our project from 3.1 through 3.3.
     
  21. tion80

    tion80

    Joined:
    Mar 5, 2009
    Posts:
    54
    I suspect this is happening because of what you set in 'BuildOptions'

    I used to set it as BuildOptions.AcceptExternalModificationsToPlayer and having pbxuser issue

    Once i change that to BuildOptions.Development BuildOptions.AllowDebugging BuildOptions.ShowBuiltPlayer, I don't have an issue anymore
     
  22. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    I've seen similar results in recent testing. It appears that the bug was fixed except for this case. I'll report it if you haven't already.
     
  23. angelann_182000

    angelann_182000

    Joined:
    Oct 5, 2010
    Posts:
    26
    I have the same problem but it works now. What I did is just quit unity. The TEMP folder is automatically deleted, you can check it out in finder. Then I started unity again and press build and run. And it now build perfectly.
     
  24. Markus

    Markus

    Joined:
    Jan 9, 2010
    Posts:
    7
    For anyone having trouble with this and deleting the Temp folder doesn't help, I may have a hack fix for you (just my style).

    My Temp folder is automatically deleted when I close Unity, but when I reopen I still get the same build error.

    What I did was trace the path to the 'User.pbxuser' file (given in the error) WHILE Unity was building my project and renamed it to match the missing [username].pbxuser. The Unity build succeeded and XCode took over just fine. Error hasn't returned.

    ftw.
     
  25. tallyho_stu

    tallyho_stu

    Joined:
    May 10, 2010
    Posts:
    38
    I'd support Zoneman's comment. I only start getting the problem when I'm trying to append to an existing build in which I've changed the standard project name in Xcode. Leaving the standard Unity-iPhone project name allows appending without build errors.
     
    Last edited: May 5, 2011
  26. jamieb

    jamieb

    Joined:
    May 1, 2011
    Posts:
    2
    I'm getting this now. Perfect (ly bad) timing. How do I fix it?

    3.3.0f4
     
  27. dadako

    dadako

    Joined:
    Jul 17, 2010
    Posts:
    66
    restarting unity seems to get rid of this
     
  28. thomasw

    thomasw

    Joined:
    Jun 20, 2011
    Posts:
    5
    I'm running into this problem with Unity 3.4. Restarting doesn't fix the problem for me.
     
  29. cholland

    cholland

    Joined:
    Aug 12, 2011
    Posts:
    1
    I was having the same problem. The initial part of the problem came when another coder and I were sharing the same XCode project through SVN. He originally made the project on his machine. I tried to make Unity append to this project but I was getting the "FileNotFoundException: [long path here]/<username>.pbxuser" issue.

    What I did to fix it was.. have Unity build to a fresh xcode project folder. Then go into its "Unity-iPhone.xcodeproj" folder (of the new build), and copy out my <username>.pbxuser file. Then paste that file into my "share" projects "Unity-IPhone.xcodeproj" folder.

    Now I can build and append to the share version just fine. I do seem to get a red thread::CurrentThreadIsMainThread error but it is working.
     
  30. jamieb

    jamieb

    Joined:
    May 1, 2011
    Posts:
    2
    I figured it out (at least for me): I had just checked out of git, and so there was no jamie.whatever file. Once I opened the file in XCode, the files appeared, and then I could build from Unity with the error. Phew!
     
  31. Bangz

    Bangz

    Joined:
    Jun 24, 2011
    Posts:
    5
    This worked for me! Simply copied another pbxuser and set the filename to be my username, within Unity-iPhone.xcodeproj. Thanks CHolland :)
     
  32. Ipsquiggle

    Ipsquiggle

    Joined:
    Nov 15, 2009
    Posts:
    8
    cholland's solution worked for me as well. Thanks!
     
  33. sheva

    sheva

    Joined:
    Nov 22, 2010
    Posts:
    157
    cholland's method works :) Thank you.
     
  34. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    513
    Another happy customer of cholland here. Thanks :)
     
  35. markofjohnson

    markofjohnson

    Joined:
    Oct 12, 2010
    Posts:
    68
    I'm probably paraphrasing what other people said... I fixed this by:

    1) Open the Xcode project you are trying to append build (which for me is checked out from SVN, made by another developer)
    2) Go to the project file, do 'show package content' and find user.pbxuser
    3) Copy and rename that file in place to your username.pbxuser
    4) Append build now fixed.

    I think what is happening is that Unity is copying the Xcode project you are trying to append build into the Temp iPhone trampoline area, and it deletes and recopies every time you build. Thats why you can't fix the problem in Temp. You gotta fix it in the Xcode project itself.

    The answer about changing the file during the build was funny! (Dude, your computer is slow!) Get a solid state drive if you can afford it. It will change your life.
     
  36. AnCh

    AnCh

    Joined:
    May 2, 2012
    Posts:
    2
    Hi there,

    I'm encountering the same problem, but while building with Jenkins CI.

    As soon as I use BuildOptions.AcceptExternalModificationsToPlayer, I get the following error:

    Error building Player: FileNotFoundException: Could not find file "/Users/anchmac/Documents/Jenkins/UnityProject/Temp/StagingArea/iPhone-Trampoline/Unity-iPhone.xcodeproj/anchmac.pbxuser". :(

    There's only a user.pbxuser to be found in the xcode project.

    I can't do anything like renaming the file from user.pbxuser to anchmac.pbxuser because Unity deletes the Temp directory prior to creating the build.


    Is there some official workaround? I don't want to rename my Mac User to "user" just to match the pbxuser file name.

    How come Unity is looking for user.pbxuser? Can I configure this somewhere?

    Regards,
    An of Ch
     
    Last edited: May 3, 2012
  37. AnCh

    AnCh

    Joined:
    May 2, 2012
    Posts:
    2
    After digging for hours this funny little patch helped me out: I changed the system environment variable "USER" to "user".
     
  38. Cawas

    Cawas

    Joined:
    Jan 14, 2010
    Posts:
    121
  39. chiodo80

    chiodo80

    Joined:
    Nov 19, 2011
    Posts:
    3
    Hi guys, I had the same problem and the reason is for a "change of folder name".
    I really didn't change my folder name directly.
    I'm using a Mac and I changed my user "short name" like from jhonsmith to jsmith.
    SO my funity folder has changed from Users/jhonsmith/myproject to Users/jsmith/myproject.
    So I chaged again my short name, rebooted the Mac and it's fixed!
    To figure out this I spent an hour reading the thread xD
     
  40. AbgaryanFX

    AbgaryanFX

    Joined:
    Jan 9, 2010
    Posts:
    167
    Thanks man !
     
  41. Robin_H

    Robin_H

    Joined:
    Feb 26, 2013
    Posts:
    2
    cholland love you~~~~~ You know it.:D
     
  42. Lousest

    Lousest

    Joined:
    Apr 9, 2015
    Posts:
    1
    I was having the same problem! And I fix it
    you just need to change the Unity build path or delete older .

    :Dwise it can help you
     
  43. Deleted User

    Deleted User

    Guest

    cholland
    Thanks man! your method fixed it.