Thanks for the additional details. If you notice any other circumstances about the patterns, I’d love to know so I could try to reproduce it.
I’m suspicious that it could be something happening when the main SharpTools app hasn’t been opened in a while as I recall another user having that problem with their device. They worked around it by having a recurring Task which occasionally launched the main SharpTools app and then put it in the background. I don’t recall how often they had this run, but you could give it a try on maybe a daily schedule and see if the problem persists.
I just sent my Nexus 6P back to Google a few weeks ago, so unfortunately I don’t have that device to test with anymore, but I’ll see if I can setup a test device and only use Tasker (without opening the main app) and see if I can reproduce it.
Also, do you reboot your phone ever? I don’t think it would play into this, but since we are riding blind here I’m just trying to collect any data we can!
I’ll try setting up an app to run SharpTools to see if that helps but when I was testing I was working in SharpTools and then switching to Tasker so not sure how opening the app would help but I’ll try it. Also, my phone reboots every night (using Tasker and another plugin). Thanks.
That’s good info. I agree that automating the opening SharpTools wouldn’t help in that case.
Can you run through some sample Tasker tasks and pull logs from Tasker and SharpTools? For Tasker, you’ll need to enable the logs before running the test. For SharpTools, you’ll need to send the logs relatively soon after running the tests (eg. if you send the logs the next day, they might have been overwritten by then).
For test purposes, you might pick a single device for the test and then run the following steps - a light switch makes a good test:
Start with the light physically turned off
Ensure Tasker logging is enabled
Create a Task for turning the light on
Create a Task for turning the light off
Create a SharpTools widget for turning the light on
Create a SharpTools widget for turning the light off
(PM me if you don’t have the widgets IAP unlocked and I can take care of it for you)
Open the main SharpTools app, find your thing in the list, and turn it on
Wait 5 seconds and turn the light back off
Open Tasker and run the task to turn the light on
Wait 5 seconds and run the task to turn the light back off
I created tasks and widgets. All four worked just fine (although the widgets were a little delayed in updating that the lights were on or off). I sent you the logs by email.
By the way, I did set up a profile/task that runs SharpTools now and then. When I’m at the office during the week, I display my calendar on my phone (because the office blocks google calendar). So I added a line to the task to run SharpTools and then display the calendar. I don’t know if this is a factor or not.
Also, and obviously, I ran SharpTools to test the widgets and tasks, so it had been activated before sending the logs. Maybe if my garage door routine fails I’ll send all logs again (although it worked the last two times I drove home – go figure ).
This is exactly problem I’ve been having and have been in contract with you through email. I thought it was fixed after hard resetting my phone, but it is still intermittent. Tasker just hangs occasionally when using your plugin. Always ends in a timeout. Only thing I saw weird looking through the logs from your app were “location DB match failed. Falling back to using the first location in the DB”
I’ve received a couple of log files and I’m trying to track down what’s happening. I still can’t reproduce it on any of my devices. Nothing has changed from the SharpTools side of things, so my suspicion is it’s something blocking or delaying the handoffs with Tasker and SharpTools.
You mentioned that you are on a Pixel 2 XL with the latest software patches (which I am too)… have you tried whitelisting SharpTools and Tasker in any battery management (and VPN, Task Killer) features?
For example, on a vanilla Android install:
Go to Android Settings
Tap the ... overflow and select Battery optimization
Make sure “All Apps” is selected from the drop-down
Find SharpTools, tap it, then select “Don’t optimize”
Started working perfectly a few days ago. Nothing changed, just boom, back to working. I did talk to the Tasker developer though, he said non-ordered broadcasts are sent if the command timeout is set to zero. I was trying all different things, so the log I sent you, the timeout was set to zero for that particular fault.
I rolled out a beta version of SharpTools (3.9) which includes support for the new service integration model available in the Tasker beta 5.1.5b. The new integration uses a model wherein Tasker calls a service on the SharpTools plugin which should bring SharpTools to the foreground and cause Android to temporarily exempt it from Doze Mode and App Standby.
Note that the recommendation is still to whitelist SharpTools and Tasker in battery optimization features. Even when an app is whitelisted, some battery restrictions are still applied to the application if it is not active / in the foreground. Hence the desire to test this approach and see if it improves the situation.
Also make sure to follow the battery optimization suggestions from the Tasker website which includes whitelisting Tasker as well as enabling the Run in Foreground preference.
You’ll need to make sure you are on SharpTools 3.9b and Tasker 5.1.5b in order to use the new feature.
For more details on the SharpTools beta release, check out the release thread.
Edit: The reliability enhancements that come from the new Tasker service integration are targeted to Android 8.x+ devices. I’m also looking at adding an optional foreground service (eg. fixed notification) that you could choose to enable and would help for Android 6.x-7.x if they are experiencing issues from Doze / App Standby.
I’ve implemented the service integration for all Actions in Tasker and I’ll work on adding this for the Event plugins shortly.
So far, this has resolved the problems I’ve been having as of late! I have not had a single failure or timeout. I’ve had continuous issues for the last month or so, and Josh has been amazing addressing them!