Puzzling security exception when sending an SMS

51 views
Skip to first unread message

mike.g...@gmail.com

unread,
May 8, 2021, 8:44:02 AM5/8/21
to Automate
Hi.

I have a flow that tracks me when I am out alone in the countryside.  It then regularly sends a SMS to my wife giving my location, just in case I have any problems.  Apart from poor mobile signals this seems to have served me well for some time (though thankfully we have never needed to rely on it).

Yesterday to my surprise the flow came to an unusual end, having successfully sent about 6 successful location reporting SMS messages, the flow ended up with:-

05-07 13:33:59.235 I 1211@3: SMS send
05-07 13:33:59.369 F 1211@3: java.lang.SecurityException: Package com.android.phone (uid=1***) does not match provided uid 10***
05-07 13:33:59.370 I 1211@3: Stopped by failure

[N.B. For security reasons the two sets of *** in the exception line each cover 3 digits (different in the two cases) as I am not sure how user specific these numbers are..]

I do not understand how the uid can have reliably worked 6 times and then been wrong this last time.  I have subsequently checked the "Subscription id" in the "SMS send" block and there is only one option, the one it is set to use.

The only thing I can think of is that if at that point there was no phone signal than maybe the "Subscription id" will not check out.  However the flow already checks for a robust mobile signal before attempting to send.

So I remain puzzled and would be grateful for any suggestions as to what may have happened and how I might avoid it in future.

Thanks for your time.

Mike

Henrik "The Developer" Lindqvist

unread,
May 8, 2021, 4:59:38 PM5/8/21
to Automate
Must be an Android or device issue, since sending an SMS only involves a single method call.

Does is always fail now, or did it begin working again?

Android version?

The Subscription field can be left empty if your device only has a single SIM.

If it's just a temporary failure, the use the Failure catch block to handle it, maybe retrying after a few seconds.

mike.g...@gmail.com

unread,
May 9, 2021, 12:42:04 PM5/9/21
to Automate
Thanks for the speedy response Henrik.

It still seemed to still work after that odd failure.

Android 11.  Samsung S21.

I have now implemented a Catch in case it happens again.

Thanks for the help.

Mike

L.Schmidt

unread,
May 11, 2021, 3:56:04 PM5/11/21
to automa...@googlegroups.com
This uid isn't about carrier subscription id, but about file ownership
on your device. But why file owner seems to have changed, I can't tell
you.

mike.g...@gmail.com

unread,
May 11, 2021, 4:25:20 PM5/11/21
to Automate
Thanks for your clarification  L.Schmidt.

Though I remain unclear not only why the ownership should have changed but also which file it was referencing.  However the error has not occurred again and once again all seems well.

Thanks for your help.

Mike

Reply all
Reply to author
Forward
0 new messages