Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

No background check within 24 hours or much longer... #916

Closed
Tho-Mat opened this issue Jul 17, 2020 · 339 comments
Closed

No background check within 24 hours or much longer... #916

Tho-Mat opened this issue Jul 17, 2020 · 339 comments
Assignees
Labels
bug Something isn't working mirrored-to-jira This item is also tracked internally in JIRA question Further information is requested

Comments

@Tho-Mat
Copy link

Tho-Mat commented Jul 17, 2020

Your Question

I have a strange problem. After updating to 13.6. I did the following:

  1. Start the app (looks fine, 14 of 14 days)
  2. End the app as i always did before.
  3. Today in the morning i looked in the ios "COVID-19-Bewedungsaufzeichnungen" and it says: there was no check in the last 24 hours. The "Bewegungsüberprüfungen" showed "vorgestern 19:48".
  4. I then opened the app and it, downloaded the data and send it to the ios COVID checker.
    The "Bewegungsüberprüfungen" now contains "today 3:48".

The days before there was always a check after 25hours, even i did not open the CWA.
I'm not sure what's the reason now. I had 1.0.2 installed most of the days and switched to 1.0.7 two days ago.
But did not noticed an issue. So this is at least not expected.

I will continue to lock on this in the next days.

If somebody has the same behavior please post here.


Internal Tracking ID: EXPOSUREAPP-1832
Internal Tracking ID: EXPOSUREAPP-3821

@Tho-Mat Tho-Mat added the question Further information is requested label Jul 17, 2020
@Tho-Mat
Copy link
Author

Tho-Mat commented Jul 17, 2020

#911 (comment)
I also did this, that may be a reason, also.
But I would expect, that the background process period(24h) does not restart after that.
It should start 24h after the last update.

@HeiDasGri
Copy link

HeiDasGri commented Jul 17, 2020

I made the same observation:

  1. Update iphone 7plus to IOS 13.6
  2. Start Corona Warn App - everything is fine!
  3. Don't start App any more and periodically check "Begegnungsüberprüfung" - No updates!
  4. Manually starting the App today at 08:30

Before update to 13.6 , everything works fine. I have made Screenshot of Battery Status, no background activity shown for the App

Img1
Img2

@tkowark
Copy link
Member

tkowark commented Jul 17, 2020

@Tho-Mat to clarify:

  • You updated the OS yesterday? around which time?
  • What do you mean by "end the app"? Swiping up?

@HeiDasGri
Copy link

* You updated the OS yesterday? around which time?

Update to IOS 13.6 was at 15.7. 20:00 (Germany)

* What do you mean by "end the app"? Swiping up?

App still was in Task-List. After I recognised, that background Update dont work, I have Swiping it for test. This was about yesterday evening

Aditional Remark: I am using two iPhones and I don't know for sure, that Background activity has been woked on both. On this iPhone updates always was during daytime.

@Flocksserver
Copy link

Maybe a hint or starting point :) #911 (comment)

@HeiDasGri
Copy link

On my other phone (iPhone 8) the same behaviour after update to IOS 13.6 (Update at 15.7. befor bedtime).

No background check within 30 hours. I intenionally did not start the App up to now. So if I should perform some test please let me know.

Here I am sure, that this has worked befor!

IMG3

@SebastianWolf-SAP SebastianWolf-SAP changed the title after 13.6, there was 0 Background check in the last 24 hours. [iOS 13.6] No background check within 24 hours or much longer... Jul 17, 2020
@SebastianWolf-SAP SebastianWolf-SAP added the bug Something isn't working label Jul 17, 2020
@jwildeboer
Copy link

jwildeboer commented Jul 17, 2020

My data as FYI. sometimes more than 30 hours.

This problem is IMHO NOT specific to iOS 13.6. I had these time jumps since keys were being distributed. I mentioned this before in #763, which I will now close.

The iPhone 11 is my "daily driver" and I frequently start the app to check. At least 2-3 times per day. The SE 1st Gen is my corporate phone where especially on the weekend i might not open the app for several days.

iPhone SE 1st Gen

Date Time Time between updates (h:mm)
2020-07-17 14:49 24:10
2020-07-17 14:39 28:12
2020-07-16 10:27 37:42
2020-07-15 - No Check performed
2020-07-14 21:45 32:40
2020-07-13 13:05 39:55
2020-07-12 - No Check performed
2020-07-11 21:10 24:21
2020-07-10 20:49 24:30
2020-07-09 20:19 24:53
2020-07-08 19:26 24:39
2020-07-07 18:47 -

iPhone 11

Date Time Time between updates (hh:mm)
2020-07-18 10:57 24:05
2020-07-17 10:52 24:26
2020-07-16 10:26 24:05
2020-07-15 10:21 24:16
2020-07-14 10:05 24:12
2020-07-13 09:53 24:00
2020-07-12 09:53 24:20
2020-07-11 09:33 28:40
2020-07-10 05:53 24:49
2020-07-09 05:04 -

@Ein-Tim
Copy link
Contributor

Ein-Tim commented Jul 17, 2020

I've got the same problem.
Background App Refresh is activated for Corona-Warn (see Screenshot 1), but the App never really did an Exposure Check on it's own, I always had/have to open the App once a day.

Screenshot 1

IMG_8112

I have no idea why this is happening but for normal users, who won't open the App once a day it's really bad.

I've also attached a screenshot that was taken before I opend the App (Screenshot 2) and one which was taken after I opend the App (Screenshot 3).

Screenshot 2

IMG_8113

Screenshot 3

IMG_8115

iPhone XR/iOS 13.6

@HeiDasGri
Copy link

I checked my wife's iphone (iPhone 11). Same problem here. the following conditions apply here:

  • Update to IOS 13.6 was NOT installed
  • She never had opened the App manually
  • Screenshot was taken at 18.07. so last background check nearly 3 days ago

Bildschirmfoto 2020-07-18 um 08 48 36

@HeiDasGri
Copy link

Please take a look at this article. It seems to me that the same problem is addressed and the reply of Kevin Elliott give some good hints.

BGProcessingTaskRequest.earliestBeginDate prevents Task from being run

@databus23
Copy link

databus23 commented Jul 18, 2020

I have not upgraded to 13.6 yet but I noticed that the background check is not working on my phone (iPhone 8 Plus) and my wife's phone (iPhone XS) for at least a week. I'm pretty sure it worked in the early days after the initial release at least on my phone.
Background app refresh is enabled for wifi+celluar and the corona-warn app specifically and never has been disabled.
I tried rebooting the phone and made sure the app is at least started once after a reboot. Also opening the app shortly before the 24 hour check window is approaching does not help. The (automatic) background refresh is just not working at all on both phones. Only opening the app triggers a check against the recorded ids.

screenshots from my iPhone 8 Plus:
image
image
image
image

As you can see the interval is greater then 24 hours and in all cases the update was trigged by me opening the app.
The contact protocol history on my wife's phone has even bigger holes in it as she is not opening the app is often as I am apparently...

I'm not ware of anything that I could have done that could have caused it and so far I have not been able to get it do any automatic checks anymore. The only thing I have not done so far is uninstalling and reinstalling the Corona Warn App.

@ndegendogo
Copy link
Contributor

I see similar behaviour, but I have iOS 13.5.1, so I have submitted a separate ticket #920
I have the suspicion that it might be related to Corona app Version 1.0.7(0), or to bad / interrupted internet connection.

@HeiDasGri
Copy link

I have made an additional test and maybe its getting us a bit closer to the problem. I have opened the app today at 8:30 (shortly before the next update should perform) and than the background task did its job within 2 hour delay, which is ok! This fits to my observation before:

  • If you periodically check the app status manually, the background task did its job within appropriate delay (2 hours).

  • If you didn't open your app any more, the background task is delayed for multiple hours, days, or will not be performed at all.

Thus I propose not to focus on the first update intervals but keep an eye on the background task for a longer period of time. Maybe it is somehow stopped or is not appropriate rescheduled.
Bildschirmfoto 2020-07-19 um 12 19 32
Lets see, if tomorrow the update will be performed before 12:40.

Please note, that an update interval of 26 hours is not good at all, but is not related to this aditional problem. This needs to be solved here:
corona-warn-app/cwa-backlog#2

@HeiDasGri
Copy link

HeiDasGri commented Jul 20, 2020

Unfortunately the background update did not perform within a 34 hour time range. For test purpose I have made the following steps:

  • 19.07. 07:09
    -- Open the App manually
    -- Exposure state updating performs immediately
    -- Close app (press home button, not swipe)
  • 20.07. 18:30
    -- No background check detected.
    -- Setting Flight modus
    -- Open App, screen shows correct "no network connection detected"
    -- Close app (press home button, not swipe)
    -- Deactivate Flight modus
  • 20.07. 20:31
    -- Background check occurs

Thus let me summarize my experience (Based on App version 1.0.7):

  • 2 hours after having the App open, a pending background check occurs
  • 4 hours after having the App open, a pending background check isn't performed
  • 24 hours after having the App open, a pending background check isn't performed
  • It is not related to IOS 13.6 it also occurs with with the previous IOS version
  • When the app was new, I often check their state. So maybe I did not see this behaviour in the beginning but it was always there

Hope it helps!

@jwildeboer
Copy link

So I didn't open the app yesterday on my iPhone SE. No background check happened.

Today I opened the app and check was done immediately.

Last check was Sunday at 15:29. New check was today at 09:05.

That's 41 hours without a check.

Definitely not even close to the 24 hours the app promises. And FTR, the iPhone was charged, online and used for other things during that time.

image

@pozoo
Copy link

pozoo commented Jul 21, 2020

I have the same problem. I use an iPhoneX, iOS13.6, CWA 1.07. App is installed since it was first published. Background checks used to work. Now after I have updated to iOS13.6 the check never done in the background and is only performed in the moment when I open the app. I verified this behavior a couple of times. A reboot of the whole phone did not change anything.
Now I did not open the app intentionally for 3 days and no background check occurred at all. Today is 21/07/2020 and the last background check was done on 18/07/2020, see attached screenshot.
IMG_5E67242143FD-1

This makes me think a lot of CWA installations on iPhones might not do any checks at all. Please work on a fix.

@irieger
Copy link

irieger commented Jul 21, 2020

I have to report the same problem. Before and after 13.6 the exposure checks aren't performed if I don't open the app. What good is the app when it doesn't check? It is already a scandal to only generally check once a day instead of hourly. (Why not do hourly key releases anyway kind of like anti virus signature updates?)

I exported the json of the exposure logs from the settings and pushed it through grep '"Timestamp"' ExposureChecks-2020-07-21.json | uniq -c:

     13       "Timestamp" : "2020-07-07 20:13:32 +0200"
      1       "Timestamp" : "2020-07-14 16:50:32 +0200"
     13       "Timestamp" : "2020-07-14 16:50:33 +0200"
     14       "Timestamp" : "2020-07-15 19:22:21 +0200"
     14       "Timestamp" : "2020-07-18 13:50:05 +0200"

iOS 13.6 and the latest app update installed.

@danielvonmitschke
Copy link

danielvonmitschke commented Jul 21, 2020

Same here (App Version 1.0.7). iPhone XS but on iOS 13.5 (17F75).
Checks are only made when the App is opened manually.
All background tasks are allowed in the settings (WIFI + Mobile).

I always have flight mode turned on at night. But that shouldn't make any difference.

IMG_9930

@HeiDasGri
Copy link

This seems to be a general issue with a severe impact.

Designed process (as I understand it):

  • A check should be made every two hours to determine whether a background check should be carried out

Implemented process:

  • Only two hours after the app has been used, a one-time check is carried out to determine whether a background check is necessary. No further background checks occurs

@SebastianWolf-SAP : Until this bug is fixed, it should be recommended in the FAQ to check the App status daily.

@ABCMoNa
Copy link

ABCMoNa commented Jul 22, 2020

I've had almost full weeks without encounter checks taking place on an IPhone XR running iOS 13.5.1. The app states that everything's fine, and regular checks are taking place.

This provides users with a false sense of security, should be a high priority issue (if it isn't already).

Does fixing this depend on changes in iOS? If so, is the iOS target release set, yet?

@ndegendogo
Copy link
Contributor

What exactly is the status of this issue? Are you able to reproduce it?
If not: any ideas how we can support you to achieve this?

In my case it lost the ability to check in background ~ 1-2 weeks ago.
I can confirm that it worked in the beginning, and can confirm that it does not work since at least a week.
I am on iOS 13.5.1, from the beginning.
No iOS upgrade in all these days. iPhone 8.
App is in version 1.1.1(3) since recently. I watched the issue for sure with version 1.0.7, not sure about 1.0.6 and 1.0.5.

Maybe an interesting detail, not sure if related:
I commute daily and cross a region with no network coverage. Can it be that such a condition kicks me out of thebackground check?

@tkowark
Copy link
Member

tkowark commented Jul 22, 2020

Hi @ndegendogo , yes, we are able to reproduce the issue, are currently collecting system diagnosis files and analyze them jointly with apple to determine the root causes.

@HeiDasGri could you point to the code file/line where you think the process is implemented as described by you?

@sin-azucar
Copy link

I will look tomorrow but I thought every 6 hours there will be a download.

FWIW, in my experience it can vary anywhere between 4 and 8 hours, even when having constant WiFi.
Still not 100% predictable, but it looks like it will average to ~4 checks per day which should be fine. I hope it stays that way. 👍
ec1

@alanrick
Copy link

Still not 100% predictable, but it looks like it will average to ~4 checks per day which should be fine.

To me it's a no-brainer. About 1/3 of my data syncs exceeded 30 hours (25% reasonable delay), so 2/3 where within 25% reasonable delay. With a 4 hour sync instead of 24 hour refresh you'd need 6 syncs in a row to fail... about 2/3 to the power of 6 ... 2/729 about 1 day every year it fails. to update in a day, and the chance of failing for 2 days is about once in a 1000 years.

Can't understand why the RKI took so long to allow this seemingly trivial modification.

*** Apologies to the developers as I'm sure I've underestimated the complexity of the code-change moving from 24 hours to 4 hour update.... but nevertheless it's surely one of the least significant efforts compared to other functional changes assuming a well thought out architecture.

@dsarkar
Copy link
Member

dsarkar commented Nov 27, 2020

Dear community,

Thanks again for contributing and detailed feedback. Be aware of the following:

  • Using WIFI: Updates about every 4 h
  • Using mobile data network: Update once per day

Please, continue reporting your observations here.

Best wishes,
DS


Corona-Warn-App Open Source Team

@achisto
Copy link

achisto commented Nov 27, 2020

@dsarkar is there a specific reason why the 4h-updates only happen over wifi? I know quite a lot people who are on unlimited data plans and use their mobile data as an alternative to wifi, especially when being underway. If I'm informed correctly the mobile providers also promised that data used by CWA is not counted towards a data cap so this shouldn't be a problem either for users with small plans.

@dsarkar
Copy link
Member

dsarkar commented Nov 27, 2020

@achisto, my understanding is that the current agreement includes one update per day in the so-called zero rating.

@Ein-Tim
Copy link
Contributor

Ein-Tim commented Nov 29, 2020

I've got some great news:
With 1.7.1 the background checks are 100% reliable (for me).
I deactivate WLAN & Bluetooth over night, and in the morning, as soon as I switch them both on again, a check always happens!
The 4h checks are often shifted back ca. 1h, but that's ok 👍

Thanks for all your work! 1.7.1 is a really great improvement!

@ouboub
Copy link

ouboub commented Nov 29, 2020

I've got some great news:
With 1.7.1 the background checks are 100% reliable (for me).
I deactivate WLAN & Bluetooth over night, and in the morning, as soon as I switch them both on again, a check always happens!
The 4h checks are often shifted back ca. 1h, but that's ok

Thanks for all your work! 1.7.1 is a really great improvement!

Hi, I can confirm this, 1.7.1 does check very regularly and is a great improvement over earlier releases, finally!

@ndegendogo
Copy link
Contributor

Also for me. I am on 1.7.1 since 4 days, and during this time I got nice regular checks.

Long-time reliability and robustness under exceptional conditions like bad internet or power saving modes still to be proven.

@dsarkar
Copy link
Member

dsarkar commented Nov 30, 2020

Dear community, thanks for the feedback. We monitor a few more days, before closing this issue. Best wishes,
DS


Corona-Warn-App Open Source Team

@achisto
Copy link

achisto commented Nov 30, 2020

Another positive experience: after waking up and turning off "airplane mode" the CWA almost instantly requests new keys. Even when low power mode is active the requests happen regularly (although they are sometimes delayed by up to one hour). I had huge problems with background refresh in 1.6 but with 1.7 they are completely gone. Thanks for your work!

@dsarkar
Copy link
Member

dsarkar commented Dec 1, 2020

Hi @achisto, thanks for the feedback. Best wishes,
DS


Corona-Warn-App Open Source Team

@dsarkar
Copy link
Member

dsarkar commented Dec 9, 2020

Dear @achisto, @Tho-Mat, @ndegendogo. @ouboub, @sin-azucar, @Ein-Tim, @HeiDasGri, @alanrick, @sin-azucar, @ABCMoNa, @jwildeboer, @pozoo, and community,

Thank you for all your contributions here. We consider this issue solved now and will close this ticket. We will keep another ticket #1631 open, in order to monitor irregularities and robustness. Thanks again for all the feedback!

Best wishes,
DS


Corona-Warn-App Open Source Team

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working mirrored-to-jira This item is also tracked internally in JIRA question Further information is requested
Projects
None yet
Development

No branches or pull requests