DragonBox / u3d

U3d is a cross-platform set of tools to interact with Unity3D from command line.
MIT License
361 stars 33 forks source link

Empty ini files prevent Unity installation #356

Closed Duobix closed 5 years ago

Duobix commented 5 years ago

Issue Checklist

Issue Description

I ran 'u3d install 2018.3.12f1' and all I get is "error: package 'Unity' doesn't exist. Use --trace to view backtrace'. And the backtrace:

"/Library/Ruby/Gems/2.3.0/gems/u3d-1.1.5/lib/u3d_core/ui/interface.rb:168:in `user_error!': package 'Unity' doesn't exist (U3dCore::Interface::UIError)
        from /Library/Ruby/Gems/2.3.0/gems/u3d-1.1.5/lib/u3d_core/ui/ui.rb:38:in `method_missing'
        from /Library/Ruby/Gems/2.3.0/gems/u3d-1.1.5/lib/u3d/commands.rb:278:in `block in verify_package_names'
        from /Library/Ruby/Gems/2.3.0/gems/u3d-1.1.5/lib/u3d/commands.rb:277:in `each'
        from /Library/Ruby/Gems/2.3.0/gems/u3d-1.1.5/lib/u3d/commands.rb:277:in `verify_package_names'
        from /Library/Ruby/Gems/2.3.0/gems/u3d-1.1.5/lib/u3d/commands.rb:162:in `install'
        from /Library/Ruby/Gems/2.3.0/gems/u3d-1.1.5/lib/u3d/commands_generator.rb:173:in `block (2 levels) in run'
        from /Library/Ruby/Gems/2.3.0/gems/commander-4.4.4/lib/commander/command.rb:178:in `call'
        from /Library/Ruby/Gems/2.3.0/gems/commander-4.4.4/lib/commander/command.rb:153:in `run'
        from /Library/Ruby/Gems/2.3.0/gems/commander-4.4.4/lib/commander/runner.rb:446:in `run_active_command'
        from /Library/Ruby/Gems/2.3.0/gems/commander-4.4.4/lib/commander/runner.rb:68:in `run!'
        from /Library/Ruby/Gems/2.3.0/gems/commander-4.4.4/lib/commander/delegates.rb:15:in `run!'
        from /Library/Ruby/Gems/2.3.0/gems/u3d-1.1.5/lib/u3d/commands_generator.rb:260:in `run'
        from /Library/Ruby/Gems/2.3.0/gems/u3d-1.1.5/lib/u3d/commands_generator.rb:40:in `start'
        from /Library/Ruby/Gems/2.3.0/gems/u3d-1.1.5/exe/u3d:7:in `<top (required)>'
        from /usr/local/bin/u3d:22:in `load'
        from /usr/local/bin/u3d:22:in `<main>'"
lacostej commented 5 years ago

Oops. This one is weird. I'll try to reproduce.

In the mean time could you enter this in a u3d console and see what happens?

>> definition = UnityVersionDefinition.new('2018.3.12f1', :mac, {})
[...]
>> definition.available_package? 'Unity'
true
>> definition.ini.keys
["Unity", "Mono", "VisualStudio", "Android", "iOS", "AppleTV", "Linux", "Mac-IL2CPP", "Vuforia-AR", "WebGL", "Windows-Mono", "Facebook-Games"]

The last command should be an array with 'Unity' in it.

If that fails, could you check what ~/Library/Application Support/u3d/ini_files/unity-2018.3.12f1-osx.ini contains?

Thanks

Duobix commented 5 years ago

I tried: cat unity-2018.3.12f1-osx.ini in the mentioned folder - it returns exactly 0 lines. What I got from u3d console: `Welcome to u3d interactive!

definition = UnityVersionDefinition.new('2018.3.12f1', :mac, {})

<U3d::UnityVersionDefinition:0x00007f9e42244c70 @version="2018.3.12f1", @os=:mac, @url=nil, @ini={}>

definition.available_package? 'Unity' false definition.ini.keys [] `

lacostej commented 5 years ago

Maybe the file wasn't downloaded properly. Try removing the ini file and run the command again.

On Fri, 12 Apr 2019, 14:54 Duobix, notifications@github.com wrote:

What I got from u3d console: `Welcome to u3d interactive!

definition = UnityVersionDefinition.new('2018.3.12f1', :mac, {})

<U3d::UnityVersionDefinition:0x00007f9e42244c70 @Version

https://github.com/Version="2018.3.12f1", @os https://github.com/os=:mac, @url https://github.com/url=nil, @ini https://github.com/ini={}> definition.available_package? 'Unity' false definition.ini.keys [] ` also, 'cat unity-2018.3.12f1-osx.ini' in the mentioned folder returns exactly 0 lines.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DragonBox/u3d/issues/356#issuecomment-482563565, or mute the thread https://github.com/notifications/unsubscribe-auth/AABe2oaFsl8SruPpFnb2NRx6q38dV0Q7ks5vgIILgaJpZM4cp3QK .

Duobix commented 5 years ago

Oh, ok. Deleting the ini file seems to have solved the problem (thank you!) - it seems like there's an empty/null check needed somehere to prevent this from happening again?