"Can't end BackgroundTask" error message on iOS 13.0

I made new project on Xcode 11 beta 7 and just run app on simulator and go back to home screen.

Then debugger shows the message below, although I didn't implement codes related background task.


Can't end BackgroundTask: no background task exists with identifier 1 (0x1), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.


Has anyone else experienced this problem?

Accepted Reply

Confirmed: This has been fixed in iOS 13.4 GM.

Replies

It's not fixed in 13.2.2.

I still get the message each time the app (location service based) goes do background.

On a side note, the app crashed after a couple of hours with either termination due to too much cpu usage (which is nonsense) or due to port leak (I don't start actively any threads). Neither happened in 12.x

Yes I am seeing the same thing on iOS 13.2.2 on iPhone X. I see that it has given an id to the task that I create.

Has anyone see this fixed in iOS 13.2.3? I thought this would be fixed due to their work fixing bugs with background processing, but it hasn't changed anything for my app. I'm still having the same problem of the log printing: "Can't end BackgroundTask: no background task exists with identifier 1 (0x1), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug." and no background processes working after that point.

I see this in iOS 13.2.3 (I just checked) as well as iPadOS 13.3 beta 2. I'm begining to think this is a debug statement accidentally left in production code...

I'm seeing it in 13.2.3 - while downloading files if the app switches to the background (pressing the home button), I see this error in the log. When going back to the foreground, the app fails to resume downloading files from the queue. This used to work in iOS 12.x, where it halted the downloads right away, and resumed when the app came back to the foreground. But now they continue for about 30 seconds in the background before getting canceled and don't resume. I'm not sure if it's a bug, and I can probably make some adjustments to deal with it, but it's new behavior from iOS 13.

I have the same issue as well, but I am taking Xcode 11.2.1 with iOS 13.3.beta 3.

Just one single App view generated by Xcode 10.0, and it works fine, when I am trying to do some new staff on iOS 13.3


then it will crash each time upon push app into background.


I have app enabled all the background feature, Location, fetch, VoIP etc.

I have the same issue, When i put my app in background it generate my CPU sometimes over 100% then kill my app with signl 9.

Any idea how to solve this issue?

Same here. Had this problem in an existing app and tried a new clean project.

Single View App, Objective C, no UI Tests -> run on iPhone 11 Simulator -> 'press Homebutton' -> then this message appears.


In my app it causes the app to crash when going to background and getting restarted instead of resumed when directly returning to it.


Any help / solution / fixes is highly appreciated.

Fortunately I've never had this crash my app - I'm lucky in that it just litters the debug console with messages. I've reported this to Apple via their new feedback tool but haven't heard anything...

Is there any way to temporarily fix this or get around it? I've been waiting on this to be fixed since iOS 13 came out. I've been trying to release my app since then and I can't work on it at all. I'm running authorization through a different app so it renders my application useless. I'm on Xcode 11.2.1, iPhone 6s 13.2.1.

Is this fixed for ios 13.3?

Nope still there.

Hi All,


I'm also facing this same problem and this issue still exists in iOS 13.3..

as a result my Airprint feature that I use within my APP ....

  • Works fine for the first print,
  • but fails to print the 2nd Time and the logs that get populated are as below :


2019-12-19 17:34:41.757 MYAPP[550:37909] Can't end BackgroundTask: no background task exists with identifier 16 (0x10), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.

===================


Any help will be appreciated.

no not yet

still experience this issue. any fixes?