New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Push Events Not Completing Successfully #291
Comments
Thanks for reporting the issue. It looks to me like you are able to sync when the app is open ... but not when the app is running in the background. Most likely the app is not able to access data while running in the background. Check that you have background data enabled for the app. See the wiki post here: Let me know if this does not resolve the issue. |
Background data is enabled. It's kind of an intermittent issue so I'm not
sure what the problem is. I'm also not sure why it runs when there are zero
changes to make. Sync Frequency is set to 'Push'. See attached.
What other logs do you need, if any?
Thanks.
…On Fri, Sep 7, 2018, 8:39 PM Sean McKeon ***@***.***> wrote:
Thanks for reporting the issue. It looks to me like you are able to sync
when the app is open ... but not when the app is running in the background.
Most likely the app is not able to access data while running in the
background. Check that you have background data enabled for the app. See
the wiki post here:
https://github.com/TeamsiteDesign/TeamCalendarSync-Public/wiki/Background-Sync-Errors
Let me know if this does not resolve the issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#291 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AmUZOaBFdAYZyPGvmdCIm8PrZKZWcpdnks5uYxHHgaJpZM4WbpAd>
.
|
My application is not performing push sync at all. It sits dormant for days, and has done nothing despite new events being added to my Exchange calendar. THe app is enable in the background, and I have battery optimisation turned off. |
Same issue over here unfortunately. Running Marsh 6.0 on HTC 10 |
Thanks for reporting this issue. A couple other users have sent me emails about this over the past few weeks. It seems like "Push" works for a while and then stops working. As far as I know, this is not impacting everyone. My guess is that the Exchange server gets rebooted (perhaps after routine maintenance) and when it restarts it needs to be "reminded" about all the clients waiting for push notifications. In the past I addressed this issue by designing the app so that it would "restart Push" automatically if it stopped. I don't think this feature is working anymore -- seems like Push is stopping and not restarting automatically. As a short term workaround you can try the following:
This is a manual way of "restarting" Push notifications. This should get Push going again for you ... but it could crop up again if your Exchange server is rebooted. It will probably work for a couple months and then stop (just a guess). In the meantime I will work on a long term solution. |
Any progress on this Sean? I'm a Software Engineer, and if your schedule is like mine there's been a big push to get things out before the holiday so I can understand not having much time to work on side projects. Sadly, your trick above doesn't work for me, and neither does dropping the account entirely and adding; only manually starting sync updates my calendar. I think you're the only solution in town for this unfortunately. Anyway, good luck! |
Hi Saabdeep, The new version is 4.5. After installing the update please open Team Calendar Sync. Opening the app triggers the automatically switch from PHP -> Firebase notifications. You can testing push notifications by creating / updating / or deleting an event on your Outlook calendar. You should see a sync run a few seconds after making a change to your Outlook calendar. If you aren't seeing push notifications for some reason ... you might need to do the following steps to setup Firebase push notifications.:
Hopefully you don't have to do the extra setup steps ... but I've only tried it on my own device so far and it worked. So this rollout will be the big test! Please let me know if you have any issues. |
Just tested. It works!!! Many thanks for this! My director likes to schedule last-minute meetings over the lunch hour for directly after lunch :-/ so keeping the calendar up-to-date is a necessity! Cheers and happy holidays, J. |
So I have an update: While events do seem to be updating fairly quickly, I'm not so sure that this is a result of actual push sync, but rather a very frequent polling that is happening in duplicate, and every 3-4 minutes. Unfortunately the result is that Team Cal Sync is using quite a bit of battery due to this: I've attached some screenshots of the sync behaviour which is continuous, and a screenshot of the battery usage I'm experiencing. Perhaps some weirdness with Firebase and certain versions of Android? I'm curious as to the other members of this thread... Cheers, J. |
Thanks for the info Saabdeep. Are you syncing more than 1 calendar by any chance? My device does not seem to be syncing as much as yours -- but I'm going to keep watching it. Also interested to hear if others are experiencing the same issue. |
Only the one outlook 365 calendar, which is my main work calendar. Weird issue. |
Push is definitely not working correctly. I'ts polling less than before, but there doesn't seem to be any rhyme or reason with respect to time or to changes to the calendar, as illustrated below. The most recent sync at the top I had to manually kick off. Any ideas whether this is an issue with Team Calendar sync, Firebase settings, or the marriage of the two? As it stands I have to open up the OWA to reliably check to see if I have any meetings, or manually sync every 15 minutes, which defeats the whole purpose of push :-/ |
Hi Saabdeep. Thanks for the continued info. I'll spend some time this weekend testing to see if I can find a pattern. I haven't had any trouble -- but I don't think I have as many events as you. Sounds like your calendar is updated pretty frequently (hence the need for very reliable push). I'll need to hit my app hard and see how it responds. Will post an update by Monday at the latest. |
Thanks Sean. Before this issue was originally reported, push worked flawlessly, only when a change was detected. Currently it seems to be polling in ~30 minute intervals. I don't have that many events, it's just that my director likes to constantly change meeting times last-minute or throw stuff on our calendar the day of (sometimes with < 1 hour notice, during lunch) so yeah, I relied pretty heavily on the push. Should I consider installing a previous build from a few months back? Are any of those builds backwards compatible with respect to Firebase? Cheers, J. |
The old (pre firebase) push service is still running. I'd like to shut it down though once I know for sure the Firebase version is working properly. The problems started when Google announced that all developers had to updated their apps to be compatible with at least Android 26. My app was working great (as you said), but it was targeting Android 23. Once I updated to a newer version of Android ... I found that Google had deprecated all their old push notifications in favor of Firebase. They also changed the way background services worked. So I had to make a number of changes to align myself with Google requirements. https://developer.android.com/distribute/best-practices/develop/target-sdk So it's been a bit of a rabbit hole. Usually I encounter "breaking changes" with Apple ... not Google. So hopefully once this is settled things will be stable again for quite some time. |
Ahh, makes sense now. Thanks for the info. It wouldn't be that much of a hassle, except for the polling is using between 5%-9% of my battery as a background app. It's usually second in the list after whatever foreground app I've been on recently. In the meantime, I'm using Tasker to run a shell command to disable the Team Calendar app package outside of working hours and re-enable during. It seems to work OK as an interim solution. Best of luck on sorting it properly! |
Hi Saabdeep, I might have found the issue. Root cause: bugs in my new push server code ... ugh. First, the push server was not handling bad push configs properly. This might impact existing users (new users avoid the issue). If you are like me you change between "Manual" and "Push" quite a bit for testing purposes. Well... those "old" push configs are supposed to get cleared out from my push server. It seems this was not always happening. So when you were trying to use push my push server was blowing up on the old configs and not always sending you messages (was happening to me ... probably you too). The second bug I found was the push server was sending notifications at random (sort of). If another user had a similar device ID (Android device ids are generated randomly) then an update to their calendar could have triggered a push notification to your device. This probably explains the craziness you were seeing with lots of random pushes. I had some bad comparison logic that was to blame. So, for example, if your device id was 5 and another user was 2 my (bad) logic was sending push notifications to users with device id greater than or equal to 2 ... lots of notifications being sent unintentionally. The side effect was ... users calendars were more or less up to date due to all the notifications haha ... but ... not the right behavior... and also probably battery drain. I've corrected this so that the notifications are now targeting the correct users. Logic is if device id EQUALS (not greater than equal ... not sure how I fat-fingered that one). Please do the following when you have a chance:
Fingers crossed! |
Just to make it clear on my previous comment: |
Yes -- no app update needed. The code bugs were found and fixed in the push server code. I just deployed a new version (4.5.1), but the only thing I added was some additional logging to help debug some crashes I've seen. No logic or functionality changes. I wonder ... maybe you had scheduled syncs running (like every 15 minutes) ... and those are still running somehow even though you switched to push? Rebooting your Android device might clear those out. Worth a try. Perhaps I'm not "cleaning up" scheduled syncs properly when you switch to push or manual. |
Indeed you could be onto something, because I switched to manual sync over 30 mins ago, and it's synced almost 10 times since! I will reboot and report back.. |
So! I removed the account completely, rebooted, and re-added from scratch. So far so good! Only one initial sync when it set up the push. I need to add an event from an external source to see if it updates correctly,but this is promising! |
Hi Saabdeep, I'll see if I can add some more info to that history screen. It would be nice to know "what" triggered each sync. Perhaps I will add a third line to each item in the Sync History ... so it will look something like:
vs.
vs.
That might help us determine what is causing all this noise. I'll try and get something published tonight or tomorrow at the latest. |
That extra bit would definitely help for tracking down the issue. I've since tried deleting my account/dumping the app cache/force closing/re-adding the account/changing sync to manual/push/every x minutes and in every different configuration I can come think of, with the same result. Push definitely doesn't work i.e. events are not updated until the random yet frequent polling starts up again. Maybe the extra info would tell us more about why the syncs were occurring so frequently, but even more perplexing is why a sync isn't triggered shortly after the calendar is modified when push is actually specified. I feel like I'm spamming you Sean, but really I'm just trying to offer as much info as possible. Cheers for your time and effort! |
Hi Sean - I have the latest 4.5.1 update, but I don't see any extra logging in the history with respect to what triggered the sync. Just FYI. Also, I've included some screenshots with notes that will hopefully assist. They are in reverse chronological order. Around 11 a.m. this morning, I completely uninstalled Team Cal Sync, rebooted, and re-added my Outlook 365 account to start from a fresh slate. Here's the results so far: |
Hi Saabdeep, Thanks for the info. Version 4.5.2 will have the trigger info for you. I've just published it (5 min ago as I'm writing this). Sorry it took me an extra day to get it out. Hopefully 4.5.2 will help identify what is causing all the syncs. |
Sean, Me again 😝 I’ve been super-slammed at work until recently, so I’m chasing this again. It’s become an issue because TCS uses anywhere from 6%-19% of my battery with all this pinging. The interim solution I’m attempting is this: Use Tasker and Greenify (rooted, Xposed version) to set up a schedule so that the Team Calendar Sync service only runs during business hours at 15-minute intervals. This would save me a lot of battery. The issue is that I can hibernate the service, but the ‘wake up’ command doesn’t seem to respond reliably. What I’m trying as a proposed solution is to run a shell command, but I don’t know which service(s) to hibernate/wake up. Here’s the command(s): am startservice com.teamsite.android.calendar.generated/.service.CalendarSyncService a. I can hibernate the entire app without issue, but would it be sufficient to only wake up the first CalendarSyncService listed here, or would I need to wake up others listed above? Many thanks, Jason Womack P.S. I see the teamcalendarsync.com site domain and the associated mailbox over there bounces back, so that's why I posted here. Hope all is ok. |
Push events are not completing without errors.
Entry from log shows 'Error: No Internet Connection'
A manual Sync works just fine.
The text was updated successfully, but these errors were encountered: