AutoInput UI Update event no long triggers

Discussion in 'AutoApps' started by Roughy, Jun 1, 2015.

  1. Roughy

    Roughy New Member

    Joined:
    May 9, 2015
    Messages:
    7
    Likes Received:
    0
    Oneplus One running stock Lollipop 5.0.2

    Frustrated with Tasker (and Google voice search for that matter) requiring user interaction when the Get Voice action fails (Tap to retry), I set AutoInput up to detect a failure and automatically tap the screen to retry.

    This worked wonderfully, and I as everything was working correctly I handed the phone over to the end user.

    When returning to add more profiles two days later, I am seemingly unable to get anything to trigger on a UI Update event. Neither new nor existing events will trigger.
    Working through the usual culprits of the accessibility integration being disabled and trying any and all combinations of priorities in Tasker, I finally enable system logs and check the logcat output:
    Code (Text):
    06-01 03:18:47.501: V/BLEJoaomgcd(1918): Is eventSatisfiedAll:false
    This bit is repeated over and over while idling on the screen that should trigger the event.

    For demonstration purposes I created a profile to trigger on opening the bluetooth settings panel, linked to a "Hello" dialog action. This fails to trigger.
    Video of profile creation and trigger attempts:


    Repeating the exact same steps on my second phone (unfortunately running KitKat instead of Lollipop) results in the "Hello" dialog appearing as expected, not to mention it also working on the now broken phone two days earlier.
    Here is the complete logcat output starting immediately before I click "bluetooth" to bring up the screen that should trigger the profile (Relevant bits indented): http://hastebin.com/jatodukise.coffee

    I did, however, manage to make one type of UI Update events trigger correctly: Crash dialogs.
    I attempted to create working events for any and all types of dialogs in any number of apps, but the only one that triggers is the Report/Close crash dialog.
    Profile creation and triggering:


    Actual input events continue to work fine (Click, cut, paste, long press etc).

    So to summarize: UI Update events were working perfectly, but ceased to function after two days of the phone being out of my hands. It is very unlikely that the user tinkered with any settings or performed any actions beyond calls and messaging. I was attempting to create a new profile when I realized things were not working, which may also have triggered the problem.

    The "Is eventSatisfiedAll:false" tibit in logcat would suggest that it is indeed AutoInput that is getting stuck somewhere, and not just Tasker failing to launch the task.
    Unless I am overseeing something very obvious, I do indeed believe something buggy is going on here.
    Wiping the phone and starting over would likely fix the problem, but who's to say it wouldn't just reappear.

    Any help getting to the bottom of things would be greatly appreciated.

    Cheers
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Thanks for the detailed report.
    If you stop tasker and restart it on the phone that's not working, does it start working?
     
  3. Roughy

    Roughy New Member

    Joined:
    May 9, 2015
    Messages:
    7
    Likes Received:
    0
    See next post
    _________________

    Thanks for the reply.

    I had tried restarting Tasker, restarting the phone, clearing AutoInput data, and completely removing and reinstalling AutoInput.

    ...and just to be extra thorough I went ahead and completely removed and reinstalled Tasker too before posting this, which has miraculously resolved the problem.

    So it would appear Tasker had gone haywire somehow, which comes as a bit of a surprise.


    In any case, it appears to be working again. Sorry for wasting your time.

    Thanks!
     
    Last edited: Jun 1, 2015
  4. Roughy

    Roughy New Member

    Joined:
    May 9, 2015
    Messages:
    7
    Likes Received:
    0
    Or so I thought.

    While the basic bluetooth exampled worked, my other events to tap the voice retry button were not triggering, and after creating another profile the bluetooth example didn't work anymore either.

    It turns out that creating the event to trigger on the app crash dialog is the root cause of the problem.
    A profile created to trigger on the crash dialog will not work immediately upon creation, but it will after a reboot.
    However, this will cause all other UI update profiles to cease to function.
    Creating a standard UI Update profile and rebooting will restore normal function, but then the crash dialog profile will no longer trigger.

    Steps to reproduce:
    1. Create a normal UI Update to show that the profile is triggering on opening the bluetooth options panel.
    2. Create a UI Update profile that triggers on the app crash dialog. Note that this profile does not work.
    3. Reboot.


    4. After the reboot note that the app crash dialog now triggers the expected action.
    5. Confirm that normal UI Update profiles do not trigger by deleting the crash dialog profile and creating a normal UI Update event, in my case triggering on entering the Bluetooth.


    Rebooting at this point will restore normal function (Normal UI Update profiles will work, crash dialog profile will not). This holds true even if you do not remove the app crash dialog profile, just as long as the bluetooth profile was created afterwards.

    Creating yet another crash dialog profile and rebooting does break normal UI Update profiles again. Looks like whatever profile was created last and is not a duplicate is the one that will work after a reboot.

    In short, only normal UI updates or the crash dialog profile will trigger, requiring a reboot to switch between them. This behavior is consistent on both my Lollipop and my Kitkat phone.

    This does not explain why UI Update events will not trigger on the voice search retry dialogs anymore, so presumably that is a separate problem.
    Edit: Hang on now those are working again. Probably somehow related after all.

    Edit2: It appears to be app specific. If the last UI Update profile I create before rebooting is for, say, the messaging app, only UI Update events for that app will trigger. Same the bluetooth example, where it will only work for any of the android settings menus. The one exception to this is Voice Search, where both the standard voice search and Get Voice in tasker share the same app (I think?), yet they will not work at the same time.
     
    Last edited: Jun 2, 2015
  5. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Did you by any chance clone the profiles to create the other ones?
     
  6. Roughy

    Roughy New Member

    Joined:
    May 9, 2015
    Messages:
    7
    Likes Received:
    0
    Negative, as shown in the above videos profiles were always created from scratch.

    Additionally, if I completely wipe tasker and autoInput from the phone, reinstall them and create two profiles that react to two separate apps, without rebooting it will react to the last one that was created if neither has been triggered, or the first one if triggered once before creating the second one.

    Basically, on a clean install whatever decides what app UI Update will trigger on has not been set, but the first time a profile attempts to trigger, it will lock it to the app used in the last profile created. Once it has been set you need to do a clean install or reboot completely, at which point it will lock it to whatever happens to be the latest profile created, and the cycle repeats.
     
    Last edited: Jun 3, 2015
  7. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Thank you for the detailed report. I'll check it out, thanks!
     

Share This Page