multiple bugs

178 views
Skip to first unread message

Oswald Buddenhagen

unread,
Jul 1, 2021, 2:40:13 PM7/1/21
to Automate
moin,

trying to use the app on lineage os 18.1 on a galaxy s5, mindthegapps installed, rooted with magisk (hidden).

i just created the first flow.
the "act as voice assistant [...]" checkbox is *not* checked.
yet, when i hit the START button, i get a request to grant the "act as voice assistant with access to screen content" privilege, which is at least unexpected. answering NEVER has no immediately obvious adverse effect.
the meaning of the checkbox is entirely unclear in the first place. i see no corresponding entry in the "security" section of the docu.

next, the "set airplane mode" block simply hangs indefinitely.

next, the "set interruptions" block throws IllegalStateException: Notification service listener not running.

next, the "set cyanogenmod profile" block wants a profile UUID, which is _rather_ questionable usability (the settings app doesn't even show that). also, it's been lineage os instead of cyanogenmod for quite a while now.

on the bright side, the orientation sensor block works ...

Bushmills

unread,
Jul 1, 2021, 2:54:30 PM7/1/21
to Automate
With a similar device setup (Lineage OS 18.1 from Jun 28, magisk, opengapps nano) but different device (OnePlus 3) I can report airplane mode functional, both turning on and off.

Henrik "The Developer" Lindqvist

unread,
Jul 1, 2021, 9:41:04 PM7/1/21
to Automate
Clicking any Never button will cancel the dialog and never show it again. Clicking the Start button again will start the flow even if the privileges aren't granted, likely resulting in hung or failing features, e.g. as the Airplane mode set and Interruptions set blocks does for you.
The privilege dialog is superfluous in my opinion since the privileges are already listed just below it, but Google disagreed when reviewing the app, so i have to use it.
I'll update the documentation to say that not granting a privilege may cause a flow fail or not work properly.

The Cyanogenmod profile set block only works with CyanogenMod devices. Upgrading it to work with LineageOS is on the to-do list, but they seem to have abandoned the SDK.

FYI, on a rooted device you can choose "Superuser" as "Power save mode workaround" in settings, then you don't need to to set Automate as default voice assistant, i.e. grant "act as voice assistant with access to screen content" privilege.
On Thursday, July 1, 2021 at 8:40:13 PM UTC+2 oswald.bu...@gmx.de wrote:

Oswald Buddenhagen

unread,
Jul 5, 2021, 4:32:22 AM7/5/21
to automa...@googlegroups.com
On Thu, Jul 01, 2021 at 06:41:04PM -0700, Henrik "The Developer" Lindqvist wrote:
>Clicking any Never button will cancel the dialog and never show it again.
>
do you have any idea where exactly that decision could be reversed? i
failed to find anything matching in the system settings.

>Clicking the Start button again will start the flow even if the
>privileges aren't granted, likely resulting in hung or failing
>features, e.g. as the Airplane mode set and Interruptions set blocks
>does for you.
>
while failure as such is ok, hanging and throwing exceptions aren't
reasonable outcomes. you need to add more error checking if these are
indeed related.

>The privilege dialog is superfluous in my opinion since the privileges are
>already listed just below it, but Google disagreed when reviewing the app,
>so i have to use it.
>
i don't understand the logic behind that. what exactly did they say?
where is the privilege used for what? what is the checkbox for, given
that a dialog follows regardless?

today i started automate again, and now the same flow has a checkbox for
dnd access, which actually makes sense, but why did it appear only now?

>I'll update the documentation to say that not granting a privilege may
>cause a flow fail or not work properly.
>
that's fairly obvious to anyone with half a clue. you need to be more
specific.

>The Cyanogenmod profile set block only works with CyanogenMod devices.
>Upgrading it to work with LineageOS is on the to-do list, but they seem
>to have abandoned the SDK.
>
i see.

>FYI, on a rooted device you can choose "Superuser" as "Power save mode
>workaround" in settings, then you don't need to to set Automate as
>default voice assistant, i.e. grant "act as voice assistant with access
>to screen content" privilege.
>
that's certainly useful to know. you could semi-automate that: when
/sbin/su (or whatever) is available, ask the user whether they want to
enable the workaround.

regards

>On Thursday, July 1, 2021 at 8:40:13 PM UTC+2 oswald.bu...@gmx.de wrote:
>
>> moin,
>>
>> trying to use the app on lineage os 18.1 on a galaxy s5, mindthegapps
>> installed, rooted with magisk (hidden).
>>
>> i just created the first flow.
>> the "act as voice assistant [...]" checkbox is *not* checked.
>> yet, when i hit the START button, i get a request to grant the "act as
>> voice assistant with access to screen content" privilege, which is at least
>> unexpected. answering NEVER has no immediately obvious adverse effect.
>> the meaning of the checkbox is entirely unclear in the first place. i see
>> no corresponding entry in the "security" section of the docu.
>>
>> next, the "set airplane mode" block simply hangs indefinitely.
>>
>> next, the "set interruptions" block throws IllegalStateException:
>> Notification service listener not running.
>>
>> next, the "set cyanogenmod profile" block wants a profile UUID, which is
>> _rather_ questionable usability (the settings app doesn't even show that).
>> also, it's been lineage os instead of cyanogenmod for quite a while now.
>>
>> on the bright side, the orientation sensor block works ...
>>
>
>--
>You received this message because you are subscribed to a topic in the Google Groups "Automate" group.
>To unsubscribe from this topic, visit https://groups.google.com/d/topic/automate-user/tTH2fvv_IsY/unsubscribe.
>To unsubscribe from this group and all its topics, send an email to automate-use...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/automate-user/f8b24b53-ad3e-43ed-b25f-0835cdc1ed2dn%40googlegroups.com.

Henrik "The Developer" Lindqvist

unread,
Jul 5, 2021, 3:30:00 PM7/5/21
to Automate
  1. You can click the "Clear defaults" option in settings to restore all dialogs, etc..
  2. An exception is a failure, unless the entire app crashes. The flow probably hasn't "hung", it's waiting for the privilege, e.g. accessibility service, to enabled.
  3. Google reviews are idiots, they're likely told an app had to show a "permission prompt" before an app is using a particular feature, so that's what Automate does with the dialog. The checkboxes is shown so the user can easily review them.
  4. More specific how?

Oswald Buddenhagen

unread,
Jul 6, 2021, 5:48:03 AM7/6/21
to automa...@googlegroups.com
On Mon, Jul 05, 2021 at 12:30:00PM -0700, Henrik "The Developer" Lindqvist wrote:
> 1. You can click the "Clear defaults" option in settings to restore
> all dialogs, etc..
>
ah, in automate itself. i didn't expect that, as privs are granted by
the system, supposedly ...

anyway, i did that, and i enabled the superuser workarounds, so now i
get a root permission prompt. but when i grant it ... i get an "open
with" prompt for an unidentified object (it offers me f-droid and the
play store). whaaaa?
that's the flow which tries to set airplane mode.

> 2. An exception is a failure, unless the entire app crashes.
>
obviously. my point was that you can identify the root cause of
particular failures and emit more helpful error messages in these cases.
like "exception foo caught; maybe you failed to grant required
permission bar?". you'd need to test the usual stupid things a user can
do and see what happens in each case.

>The flow probably hasn't "hung", it's waiting for the privilege, e.g.
>accessibility service, to enabled.
>
yeah, but there is no prompt or anything, so it will wait indefinitely,
which from a user perspective is "hung". you can handle that with a
timeout and again a helpful (speculative) error message.

> 3. Google reviews are idiots,
>
so is the lore. :'D

>they're likely told an app had to show a "permission prompt" before an
>app is using a particular feature,
>
this obviously makes no sense for privs that were already granted, which
is why i asked what *exactly* they said. but what do i know ...

>so that's what Automate does with the dialog. The checkboxes is shown
>so the user can easily review them.
>
yeah, but what do the _checkboxes_ *do*? maybe you should just show
labels naming the privs that will be requested?

> 4. More specific how?
>
i'm not sure what you're referring to ...
if you mean su detection, you'll need to google that (i'm a bit of a
noob in that area myself).

regards
>To view this discussion on the web visit https://groups.google.com/d/msgid/automate-user/785b8e23-e978-472e-be40-783be39e883an%40googlegroups.com.

Henrik "The Developer" Lindqvist

unread,
Jul 6, 2021, 3:02:27 PM7/6/21
to Automate
  1. The privileges dialog is shown by Automate, not the system. Automate ask you to install the Superuser permission extension app, but since you have two "market" apps installed the system ask you to choose. I'll force it to only use the Google Play Store app.
  2. It would be near impossible to implement, since Android can fail in thousands of way due to a lack of permission. The blocks relying on the accessible and notification listener service used to "fail fast" but that cause problems due to Android not starting them in time or at all due to bug, so now it simply waits for them to start instead. As said, if you don't grant the request privileges, don't expect it to work, the Android API works the same way.
  3. It's always canned responses, so they're not interesting nor informative.
  4. You can click them to grant/revoke the privilege.
  1. "that's fairly obvious to anyone with half a clue. you need to be more specific."

Oswald Buddenhagen

unread,
Jul 6, 2021, 4:48:26 PM7/6/21
to automa...@googlegroups.com
On Tue, Jul 06, 2021 at 12:02:27PM -0700, Henrik "The Developer" Lindqvist wrote:
> 1. The privileges dialog is shown by Automate, not the system.

i wonder how on earth that makes any sense, given that it relies on
google's review catching each instance of the app doing something that
should reasonably ask for permission. ah, well.

> Automate ask you to install the Superuser permission extension app
> <https://play.google.com/store/apps/details?id=com.llamalab.automate.ext.superuser>,
> but since you have two "market" apps installed the system ask you to
> choose.

> I'll force it to only use the Google Play Store app.
>
you don't need to do that. it would be much more helpful (and
trust-evoking) to pop up a dialog that says what is about to happen and
why.

> 2. It would be near impossible to implement, since Android can fail in
> thousands of way due to a lack of permission.
>
it's hard to believe that the system is so badly designed that it's
impossible to detect permission problems. it seems plausible that some
of the weirder things you do have sufficiently many indirections to make
it hard, but then you can probably still explicitly check whether the
permissions you need have been granted.

> 4. You can click them to grant/revoke the privilege.
>
then switching the status should change what happens in the next step.
it didn't, as per my first mail.

> 5. "that's fairly obvious to anyone with half a clue. you need to be
> more specific."
>
reference unclear. use blockquotes instead of arbitrary numbering. back
in the day we knew how to do that, as per
https://www.netmeister.org/news/learn2quote.html ;)

regards
Reply all
Reply to author
Forward
0 new messages