Languages

Menu
Sites
Language
Tizen CLI run command give NullPointerException in logs

Hi,

I am trying to learn the Tizen cli and so far I've managed to properly build, package, and install my apps with the command line. However, I am having trouble with the run command. tizen run results in the following error in the console:

$ tizen run -p wAqbfS5qgd -s 192.168.1.162:26101 -t UN55MU7500
Launching the Tizen application...
An error has occurred. See the log file tizen-sdk/tools/ide/cli.log.

When I look in the cli log (which is actually located in ~/tizen-studio-data/cli/logs/cli.log, not where the error states) I see the following NullPointerException:


2018-04-19 12:55:15,984 [TRACE] Main.java(127) - Start running Tizen CLI Main class...
2018-04-19 12:55:15,986 [TRACE] Main.java(128) - Argument count:9
2018-04-19 12:55:15,999 [TRACE] RunCLI.java(56) - Execute RunCLI...
2018-04-19 12:55:16,584 [ERROR] AbstractCLI.java(93) - 
java.lang.NullPointerException
    at org.tizen.ncli.subcommands.target.RunCLICommand.runApp(RunCLICommand.java:243)
	at org.tizen.ncli.subcommands.target.RunCLICommand.call(RunCLICommand.java:126)
	at org.tizen.ncli.subcommands.target.RunCLICommand.call(RunCLICommand.java:43)
	at org.tizen.ncli.subcommands.AbstractSubCommand.runCommand(AbstractSubCommand.java:76)
	at org.tizen.ncli.ide.shell.RunCLI.execute(RunCLI.java:66)
	at org.tizen.ncli.ide.shell.AbstractCLI.execute(AbstractCLI.java:91)
	at org.tizen.ncli.ide.shell.Main.run(Main.java:183)
	at org.tizen.ncli.ide.shell.Main.main(Main.java:115)
2018-04-19 12:55:16,586 [ERROR] Main.java(191) - 

Could someone explain this error? Is this a known bug in the current version of the CLI?

Responses

5 Replies
Armaan-Ul- Islam

After Checking your post I've created a new tizen web project & ran the project on my Gear. Everything seems fine:

 

Checklist from my end->

# Check the If parameters of run command are spelled correctly.

-p  (check Spelling, specially Capital/small cases)

-s (recheck IP)

-t (you can skip this one as you are identifying device using serial (IP))

 

# Make sure the app is already installed properly on the device with specific package id you are using. Try running directly from device first instead of using CLI or IDE to check run compatibility.

 

# I've used Tizen CLI version: 2.4.50 for the test.

Clifton Craig

I am able to build, package, and install the app to the TV with no issues. It is only the run command that gives me trouble. I've tried with only the -s cmd line switch, then only with the -t switch. I finally tried with both as it seemed there might have been an option missing from the error message.

I also have Tizen CLI version 2.4.50. I'm running version 1210 on my 55" MU7500 TV. I have verified that the app, once install, can be launched manually on the device by clicking on it. It merely seems there is an issue with the CLI. 

Armaan-Ul- Islam

Personally I don't have the TV device...but Tizen CLI 2.4.50 seems okay for my Tizen wearable.

 

You may test the commands on a TV emulator to check If the response is same for emulators or not.

Clifton Craig

I FINALLY figured out my problem! I was merely passing the package ID via the -p switch. I believe this is what the documentation states to do though I'll have to research and double check. Anyway, the proper way to run an app via the command line is to pass the fully qualified app ID not just the package name. In my case I had the following:

<tizen:application id="wAqbfS5qgd.addrmplayer" package="wAqbfS5qgd" required_version="2.3"/>

...And I was using this command:

$ tizen run -p wAqbfS5qgd -s 192.168.1.162:26101 -t UN55MU7500

The solution was to use this command:

$ tizen run -p wAqbfS5qgd.addrmplayer -s 192.168.1.162:26101 -t UN55MU7500

Thanks Armaan, for your help and patience! I hope someone else having the same issue will stumble across this post and benefit!

Armaan-Ul- Islam

You're welcome.