isonic1 / flick

A CLI with helpful QA tools for Android (Devices & Emulators) and iOS (Devices).
MIT License
101 stars 26 forks source link

undefined method `split' for nil:NilClass #47

Open VTDuyen1 opened 4 years ago

VTDuyen1 commented 4 years ago

Hi everybody! I am having the problem:

 var shell = require('shelljs');
 shell.exec('flick video -p ios -a start -u b540e68bbffcc1bb08bd518f7696a655acb9fc05');

/Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/user_interaction.rb:359:in method_missing': undefined methodsplit' for nil:NilClass (NoMethodError) from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/checker.rb:5:in which' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/checker.rb:15:insystem_dependency' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/ios.rb:36:in devices' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/ios.rb:41:indevices_connected?' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/ios.rb:45:in check_for_devices' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/ios.rb:52:inget_device_udid' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/ios.rb:6:in initialize' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/video.rb:13:innew' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/lib/flick/video.rb:13:in initialize' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/bin/flick:34:innew' from /Library/Ruby/Gems/2.6.0/gems/flick-0.4.6/bin/flick:34:in block (2 levels) in <top (required)>' from /Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/command.rb:182:incall' from /Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/command.rb:153:in run' from /Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/runner.rb:446:inrun_active_command' from /Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/runner.rb:68:in run!' from /Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/delegates.rb:15:inrun!' from /Library/Ruby/Gems/2.6.0/gems/commander-4.4.7/lib/commander/import.rb:5:in `block in <top (required)>'

Does anyone have a solution to this problem? I was really worried when it took 2 work days to find the answer to it.

isonic1 commented 4 years ago

Hi @VTDuyen1 - It looks like the code is failing because your PATH environment variable is coming back nil/null. If you open a termnial on this same machine and do a echo $PATH. Do you see any results?

isonic1 commented 4 years ago

@VTDuyen1 this particular code is checking to make sure you have the required dependencies installed before it can start the process. I can add an override to ignore the checks if for whatever reason the machine you're using doesn't have a $PATH which it technically should always.

VTDuyen1 commented 4 years ago

Hi @VTDuyen1 - It looks like the code is failing because your PATH environment variable is coming back nil/null. If you open a termnial on this same machine and do a echo $PATH. Do you see any results?

Hi @isonic1, I get the result: ➜ runtime git:(7280b65947) ✗ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Please tell me what this PATH is missing. I really need "flick" to record the automated testing process, so I look forward to hearing from you soon.

VTDuyen1 commented 4 years ago

Hi @isonic1 , Can you tell me if I am missing any environment variables?