Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

[Package Manager] Failed to resolve packages: [Packages] directory does not exist.

Discussion in '2018.1 Beta' started by litefeel, Mar 20, 2018.

  1. litefeel

    litefeel

    Joined:
    Dec 6, 2016
    Posts:
    68
    can not build my project on unity 2018.1.0b11

    some info:
    project version: unity 5.6.1f1
    unity editor version: 2018.1.0b11
    os: mac os

    build log: https://travis-ci.org/litefeel/Unity-BitmapFontImporter/jobs/355832400

    some important logs.

     
  2. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    555
    Hi! Upon inspecting the build log, I see an unexpected assert failing before the package manager errors:

    Assertion failed on expression: '!projectPath.empty()'​

    This might explain the ensuing PackageManager error about not being able to create the manifest file, which is needed to run the package manager logic (now part of the Unity application flow).

    Can you double-check the project path you provided exists and is valid? If it is, would you mind reporting this as a bug so we can investigate it further? (https://unity3d.com/unity/qa/bug-reporting)
     
  3. litefeel

    litefeel

    Joined:
    Dec 6, 2016
    Posts:
    68
    I'm sorry, I can not report a bug by unity editor, because I have not mac.
    I printed the information for this directory and confirmed that the directory is correct.

    Assertion failed on expression: '!projectPath.empty()'


    1. the project path is correct.
    2. this Assertion display on Unity 2017.3.1f1, 2018.1.0b10 and 2018.1.0b11
    3. build successed on 2017.3.1f1 and faild on 2018.1

    full log for 2017.3.1.f1 https://travis-ci.org/litefeel/Unity-BitmapFontImporter/jobs/356153925
    full log for 2018.1.0b11 https://travis-ci.org/litefeel/Unity-BitmapFontImporter/jobs/356153929

    some log on 2017.3.1f1
    some log on 2018.1.0b11
     
  4. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Why can't you submit a bug report?
    A proper bug report with the project and log files attached will drastically increase the chances of us fixing this.
    https://unity3d.com/unity/beta/guide-to-beta-testing
     
  5. litefeel

    litefeel

    Joined:
    Dec 6, 2016
    Posts:
    68
    1. Report errors must come from the unity editor.
    2. I have not mac, and have not reproduced on windows.

    so, I can not report the bug.
     
  6. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    555
    Hi litefeel,

    The package manager needs the (UnityProject)/Packages/manifest.json file to be present to work. If it doesn't find the file, it will create it with default values, then assume it is present. As a workaround, you could create a simple manifest.json file with just an empty JSON object as its content ("{}", without the quotes). (This file should be tracked in source control, if you use any.)

    It's quite strange that it doesn't work on MacOS but works on Windows. Might be a permission issue, i.e. does the process running Unity have permission to create files and directories in the Unity project root directory? Another thing to check is to make sure the Unity project root directory is marked with a ReadOnly flag.
     
  7. litefeel

    litefeel

    Joined:
    Dec 6, 2016
    Posts:
    68
    https://travis-ci.org/litefeel/Unity-BitmapFontImporter/builds/356153924

    This is all build.
    Unity version: 5.6, 2017.1, 2017.2, 2017.3, 2018.1
    They are the same environment.

    Assertion failed on expression: '!projectPath.empty()'
    It does not appear in 5.6, 2017.1 and 2017.2
    It appears in 2017.3 and 2018.1

    build status:
    success on: 5.6, 2017.1, 2017.2 and 2017.3
    failed on: 2018.1

    permission:
    it can create Unity.log in Project directory, so it have not permission issue

    My guess:
    Command line parameter '-projectPath was changed, and cannot got it correctly.
    for 2017.3:
    if projectPath is empty, then use current directory, and can create it, so it's success.
    for 2018.1:
    if projectPath is empty, then use other directory, and can not create it, so it's failed.


    all build log https://travis-ci.org/litefeel/Unity-BitmapFontImporter/builds/356153924
     
  8. litefeel

    litefeel

    Joined:
    Dec 6, 2016
    Posts:
    68
    Anyone here?
     
  9. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    555
    Hi litefeel,

    As I suggested earlier, you could try the following as a workaround.

    Create a directory named `Packages` in your project, then create a file named `manifest.json` in it. Edit this file and put the following content (without quotes): "{}"

    This file should be tracked in source control, if you use any.

    Let us know if this solves your problem.
     
  10. litefeel

    litefeel

    Joined:
    Dec 6, 2016
    Posts:
    68
    https://travis-ci.org/litefeel/Unity-BitmapFontImporter/jobs/359274954

    build failed.

    some log.

     
  11. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    555
    Hi lifefeel,

    I still see the following unexpected line in the logs:
    This is very strange, because I also see that file in your project files... Unity should simply not be trying to create it. It's as if it has the wrong "current working directory" and cannot resolve the relative path to that file.

    We'll clone your project from Github and try to see what we can find.
     
  12. litefeel

    litefeel

    Joined:
    Dec 6, 2016
    Posts:
    68
    thanks
     
  13. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    555
    Hi litefeel,

    I have been able to reproduce this issue. This will happen if you have not activated a license on the machine. Is there any way for you to connect remotely to the machine and set up the license?
     
  14. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    555
    Hi again litefeel,

    After further verification, I have two more options for you.

    If you use a Pro or Plus license, you can use the "-serial" command-line parameter with the license number (the full number, not the one ending with XXXX as shown in the About window). For a Personal license, you should be able to use the -username and -password options. These command-line options are documented at https://docs.unity3d.com/Manual/CommandLineArguments.html.

    Of course, the values passed to the -serial and -password fields are sensitive, and you should take care to not commit these sensitive values in your Github repo directly, nor should you log them in your builds. (Note that in the Unity logs, these command-line parameter values are obfuscated.)
     
  15. miniduck

    miniduck

    Joined:
    Sep 27, 2012
    Posts:
    117
    I can see in litefeel's log he cannot connect to Package Manager, same for me.
    2018 has been setup with personal license using offline activation, machine has network but no internet access.
    Is there anything I can try on my end?
     
  16. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    555
    Hi gigolo,

    This is not the same problem. litefeel's issue was that he had no license enabled, and that prevented Unity from correctly setting the projectPath. (I reported this as a bug to the appropriate team; this should have resulted instead in a proper error message saying that no license was activated, and Unity shutting down rather than failing later on.)

    Your issue is different, and may have to do with your network setup. Which beta version are you using? Do you have antivirus software running that may be preventing Unity from starting external processes? Do you have a proxy configured? Do you have any special firewall settings that could be relevant?
     
  17. miniduck

    miniduck

    Joined:
    Sep 27, 2012
    Posts:
    117
    I'm running b13 on Centos 7.4, no antivirus or internet proxy setup (http_proxy not set)
    As you can see in the log I was testing setting/unsetting UNITY_NOPROXY to localhost but didn't change anything
     
    Last edited: Apr 6, 2018
  18. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    555
    Hi gigolo,

    Thanks for the info. We have observed the same on our end and are investigating. Can you open a bug report?
     
  19. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    from Procore twitter yesterday :

    PB 3.0.3 is now available! Some major additions (like edge thickness controls, nice!) and several high-profile fixes, too. Available via Package Manager in Unity 2018.x - remember to backup before you update! :)

    But I can't see this version in my Package Manager. Any clue ?
     
  20. litefeel

    litefeel

    Joined:
    Dec 6, 2016
    Posts:
    68

    Failed to build.
    I have added my username and password.


    https://travis-ci.org/litefeel/Unity-BitmapFontImporter/jobs/363496502

     
  21. miniduck

    miniduck

    Joined:
    Sep 27, 2012
    Posts:
    117
    1023056
     
    LeonhardP likes this.
  22. sebastienparent

    sebastienparent

    Unity Technologies

    Joined:
    Jan 22, 2018
    Posts:
    2
  23. sebastienparent

    sebastienparent

    Unity Technologies

    Joined:
    Jan 22, 2018
    Posts:
    2
    Ok so it seems batchmode does require a -serial parameter for license activation to work properly (as far as I know serial numbers are only for Plus and Pro licenses). This is because personal license activation requires the user to declare they are not above the revenue cap, which cannot not be automated since revenues change over time. On top of that, it seems there may be a conflict between automated activation the -nographics parameter. I was able to make it work in 2018.1 with the following parameters (adding -serial and removing -nographics):

    -----------------------------------------------------------------------------
    COMMAND LINE ARGUMENTS:
    /Applications/Unity/Unity.app/Contents/MacOS/Unity
    -batchmode
    -silent-crashes
    -force-free
    -username
    (hidden)
    -password
    (hidden)
    -serial
    (hidden)
    -logFile
    /Users/me/temp/unity.log
    -projectPath
    /Users/me/unity/Unity-BitmapFontImporter-ci
    -executeMethod
    MyTest.Test
    -quit
    -----------------------------------------------------------------------------

    Not sure if the -nographics conflict with the activation is intended, need to dig a bit more
     
  24. litefeel

    litefeel

    Joined:
    Dec 6, 2016
    Posts:
    68
    Thank you for testing.


    Is this a new 2018 policy or a technical issue?

    If you cannot run batch mode without a serial , it means that free users cannot integrate continuously.
     
  25. thmhoag

    thmhoag

    Joined:
    Oct 6, 2017
    Posts:
    2
    I just want to add that I'm experiencing the same issue as a new user attempting to setup CI with the 2018.1 beta.

    Can we clarify exactly what parameters are required to run a headless CI build and if any of those parameters require a Plus/Pro license? I'm a little confused by this response as it would seem to indicate -force-free is required, which would lead me to believe that it shouldn't need -serial since we're clarifying that we're using the free license. I'm also not quite sure why it would need -serial and -username and -password. It seems as though only one form of authentication should be necessary (if at all).
     
  26. RichardFine

    RichardFine

    Unity Technologies

    Joined:
    Nov 11, 2014
    Posts:
    13
    Activating in batch mode requires a Plus/Pro license.

    Building in batch mode does not require a Plus/Pro license, but it does require that you previously activated.
     
  27. thmhoag

    thmhoag

    Joined:
    Oct 6, 2017
    Posts:
    2
    Appreciate the extra info Richard, that helps a bit. The goal for me personally, and I believe @litefeel as well, was to get a CI build up and running via Travis CI. To that end, is there a supported way to activate the personal edition of Unity via command-line prior to running a build in batch mode? I've only been able to find methods of activating via the UI, which would not work for Travis CI. While I'm not necessarily tied to using Travis, I'd definitely prefer to do my builds in some type of ephemeral container which is looking problematic at this point.
     
    basisbit and Noxalus like this.
  28. RichardFine

    RichardFine

    Unity Technologies

    Joined:
    Nov 11, 2014
    Posts:
    13
    No, I'm afraid there's no way to do that today. We're keeping it in mind for the next evolution of the licensing system, but for now your only option for ephemeral containers is to buy a Plus (or Pro) license.