TestProject Forum
Powered by leading experts in the test automation community

Cannot read SMS OTP with "OTP From SMS by Index" add-on

Hi,

I just started using TestProject for trial with our mobile app. So far the test steps are good but I stuck at the step “Extract OTP From SMS by Index”. The test always fails here. I capture a snippet of error detail below (with masking my app address). If someone could suggest if I can fix this error, that would be appreciated.

Thank you.

java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot start the ‘com.xxxx.xxxxxx’ application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Error executing adbExec. Original error: ‘Command ‘’/Applications/TestProject Agent.app/Contents/Resources/android-sdk/platform-tools/adb’ -P xxxxx -s xxxxxxx shell am start -W -n xxxx.xxxxxx/xxxx.xxxxxx.uinew.register.RegisterActivity -S’ exited with code 255’; Stderr: 'Security exception: Permission Denial: starting Intent { flg=0x10000000 cmp=com.xxxx.xxxxxx/com.xxxx.xxxxxx.uinew.register.RegisterActivity } from null (pid=17085, uid=2000) not exported from uid 10264

Hi @sor.lee,

Can you please describe to me when it fails exactly? Do you see the TestProject OTP application installed on your device?

Hi @amit.yahav,

It failed in my “android app.” test project. In that test, I created a step, by using add-on “OTP From SMS by Index”, to extract OTP for testing my app’s registration. The step starts after my app. registration form submission step which will send OTP to user. When I run the test, the step (extract OTP) failed after running for a while with the error messages I sent previously.

I don’t have the TestProject OTP application installed on my device. I installed the add-on “Android SMS OTP Automation” to my agent.

My understanding is I can use the add-on to extract OTP in android device that I registered to agent, please advise if I was wrong.

Thank you.

Hi @sor.lee,

The OTP application should be installed on your device whenever you are using this OTP addon. The error message says that there’s a security issue when the agent tries to launch your application with this specific activity.

Can you please run your test again and then send me the agent logs? You can send them to me in the chat on our website.

Thanks Amit. I chatted with John and got a probable root cause. That is about the way the developer of my app. handles the step which is not compatible with the OTP addon.

Hi @sor.lee,

Thanks for the update!
I’ve spoke with John about it and after he investigated the issue, the reason why it’s failing is because the OTP addon tries to get you back to your AUT at the exact package and activity you were at before using the OTP action.

The combination of your package and activity cannot launch the application. You can read more about it here: