GetSms() fails after Android service update to version 2.1.0

Mobile Testing, Android App Testing.
TimoL
Posts: 16
Joined: Thu Sep 13, 2018 3:08 pm

GetSms() fails after Android service update to version 2.1.0

Post by TimoL » Thu Nov 07, 2019 12:13 pm

I updated Ranorex Studio to version 9.2.0. The mobile tests succeeded after that, but I got warning that the Android app should be updated. So I deployed and updated the app, but now the GetSms() function fails:

"Action 'getsms' failed on element '{MobileApp:Android OS}'.
Failed to invoke action GetSms
Cannot decode RpcResponse. Expected type was 'Ranorex.Core.Remoting.Data.SmsCollection' but element of type 'Struct' was found. "

The phone has been connected by USB. So the SMSes are read in wrong format now? How to fix it?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11996
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: GetSms() fails after Android service update to version 2.1.0

Post by Support Team » Fri Nov 08, 2019 12:17 pm

Hello Timo,

Thank you for your post.

This error appears if the Service app has no permissions to access your SMS.
Therefore, please grant access to SMS by following these steps:

1. Open the settings on your Android device
2. Choose "Apps & notifications"
3. Choose "App permissions"
4. Choose SMS
5. Enable the permission for the "Ranorex Services" app

Kind regards,
Stephan
.
Image