Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase crashlytics posting hundreds of "cancelled" messages in log when iPhone Simulator(and macbook) is on tethered 4G

When debugging my app today (in Simulator) I noticed that I got several hundreds of these messages outputted in my log, over the span of a few minutes:

Task <86E3C73C-E007-4D21-9EE5-C7F9F86EC1C4>.<251> load failed with error Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://reports.crashlytics.com/sdk-api/v1/platforms/ios/apps/my.bundle.id/reports, NSErrorFailingURLKey=https://reports.crashlytics.com/sdk-api/v1/platforms/ios/apps/my.bundle.id/reports, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "BackgroundUploadTask <86E3D75C-E017-4D31-9EE5-C7F9F86EC9C4>.<251>",
    "LocalUploadTask <86E3C35C-E007-4D21-9EE5-C4F9F86EC1C4>.<251>"
), _NSURLErrorFailingURLSessionTaskErrorKey=BackgroundUploadTask <86E3C75C-E017-4D21-9EE5-C7A9F86FC4C4>.<251>, NSLocalizedDescription=cancelled} [-999]

They keep coming even when I'm not touching anything in the app.

The error is saying that the requests are being cancelled. But why are they being cancelled? I know that I can call task.cancel() on my own URLSessionTasks to produce the same error, but I have no control over what Firebase Crashlytics does in the background of my app.

These logs are coming every 2 seconds whenever I do nothing. If I start clicking around in the app, they are flooding in.

It's an increment in each log. Where it says <251> in my pasted error message, this number is incremented every message. This is the 251st cancel-message I have received in a short period. It seems it keeps retrying forever.

I do have internet connection, as the rest of my app is dependent on it (and works). When debugging the network traffic, it seems like these crashlytics requests aren't being fired at all. I only see traffic from my own network calls, so I think I can safely assume that it's not a bug that will drain the user of their mobile data.

The only thing I can think of that can be related to this is the fact that WiFi in our office is currently down, so I am sharing internet from my own iPhone X's 4G-network. But keep in mind that I'm actually debugging a Simulator on my Mac. So the simulator is essentially using 4G-network.

Any idea why this is happening or how it can be fixed? Very annoying output. This does not happen when debugging my actual device when on 4G, and I don't think it happens when debugging a simulator when the Mac is on WiFi (though I can't try it now, because of reasons).

Edit: The weirdest part is that I stumbled on a crash in my dev-app while doing this, and I actually received an email from Firebase saying they detected the crash a few minutes later. So.. what..? The crash reporting evidently works, even though I receive these cancelled-messages..

like image 603
Sti Avatar asked Feb 01 '19 09:02

Sti


1 Answers

Are/were you using a proxy with a custom ssl root certificate? I was using a proxy tool with a custom ssl root certificate to log my https requests but apparently Crashlytics doesn't like that...

like image 61
Mark Avatar answered Nov 15 '22 03:11

Mark