Test seems to fail with deviceid option in console mode

Hi, all

We have Runtime Engine License, and trying to following:

  • Run our test in azure DevOps
  • Run our test with Android Emulator

I guess I can not run our test with -deviceId option by license problem…

In katalon task, I run following

-noSplash -runMode=console -projectPath="$(System.DefaultWorkingDirectory)/Shobosso/Shobosso238.prj" -retry=0 -testSuitePath="Test Suites/Mobile/JustAccessGoogle" -browserType="Android" -deviceId="$(DeviceID)" -apiKey="$(katalon-api-key)"

And I got following error

Start activating online...

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).

log4j:WARN Please initialize the log4j system properly.

Online activation for console mode failed.

Activation failed. Please make sure you are using a valid license.

If I run above test without “-deviceId” option, online license can be activated. (test itself failed with No mobile device name available error though.)

Why I got license error with deviceid option?

1 Like


The log shows Katalon Studio could not recognize the apiKey argument. Please check the $(katalon-api-key) param again.


Hi @duyluong
As mentioned above, just removing -deviceID option resolve the license problem.

I confirmed again, but the apiKey is set in azure keyVault correctly and the licence can be activated just removing deviceID option.


Can you share us the execution log? You can send us in private message if your data is sensitive.


@duyluong Thank you, I attach 2 files : with deviceID option and without it. (only katalon execution task)
If whole azure DevOps log is required, I’ll send them in private message.

With_DeviceID_katalonTask.txt (10.5 KB) Without_DeviceID_katalonTask.txt (977.6 KB)

Hi @rie.ota,

In the execution log with deviceId, we found this:

2020-02-26T00:46:51.6210380Z sh: DeviceID: command not found

2020-02-26T00:47:04.4781070Z INFO: Command-line arguments: -runMode=console -projectPath=/Users/runner/runners/2.165.0/work/1/s/Shobosso/Shobosso238.prj -retry=0 -testSuitePath=Test Suites/Mobile/JustAccessGoogle -browserType=Android -deviceId= -apiKey=******

that means Katalon Studio Runtime Engine did not recognize the environment variable: DeviceID. You can run the test again with this command before the katalon task:

echo $(DeviceID)

and share us the result.

Actually I set following command in previous task

      DeviceID=`adb shell service call iphonesubinfo 1 | awk -F "'" '{print $2}' | sed '1 d' | tr -d '.' | awk '{print}' ORS=`
      echo $DeviceID

and it saids

2020-02-26T00:46:22.9972270Z 358240051111110


Please change from:

-noSplash -runMode=console -projectPath="$(System.DefaultWorkingDirectory)/Shobosso/Shobosso238.prj" -retry=0 -testSuitePath=“Test Suites/Mobile/JustAccessGoogle” -browserType=“Android” -deviceId="$(DeviceID)"


-noSplash -runMode=console -projectPath="$(System.DefaultWorkingDirectory)/Shobosso/Shobosso238.prj" -retry=0 -testSuitePath=“Test Suites/Mobile/JustAccessGoogle” -browserType=“Android” -deviceId="$DeviceID"

and try again

hi @duyluong,

^ I tried and got following error

Option deviceId requires an argument

8_katalonTask.txt (9.9 KB)

In previous task, echo $DeviceID said 358240051111110

^ Sorry, I had removed not only parentheses but apikey.
Tried again and I got following error again

Offline activation failed.

Start activating online...

Online activation for console mode failed.

Activation failed. Please make sure you are using a valid license.

All launchers terminated

Script that I run :

-noSplash -runMode=console -projectPath="$(System.DefaultWorkingDirectory)/Shobosso/Shobosso238.prj" -retry=0 -testSuitePath="Test Suites/Mobile/JustAccessGoogle" -browserType="Android" -deviceId="$DeviceID" -apiKey="$(katalon-api-key)"

1 Like

this is resolved by following script, thank you.

-deviceId="emulator-5554" -browserType="Android"

1 Like