Instabug/Instabug-iOS

Noisy logs from Method Swizzling with error-level logging enabled: `IBGCore: Coultn't find network log with task Id`

johntmcintosh opened this issue · 6 comments

Steps to Reproduce the Problem

Integrate Instabug, and launch the app with error-level logging enabled.

Expected Behavior

With .error level logging, I would expect to only see console logs that a consumer of the SDK should care about.

Actual Behavior

When launching our app with Instabug enabled and logs configured for error-level only, we receive approx 70 of these log statements, and continue to receive similar logs frequently through the usage of the app.

[Instabug] - IBGCore: Coultn't find network log with task Id (LocalDataTask <87149BA9-3655-41B1-9E3C-6106261BEC34>.<1>) in CoreData
[Instabug] - IBGCore: Coultn't find network log with task Id (LocalDataTask <87149BA9-3655-41B1-9E3C-6106261BEC34>.<1>) in CoreData
[Instabug] - IBGCore: Coultn't find network log with task Id (LocalDataTask <ECE6A59E-2906-4FB9-890D-61DC89DB2CD7>.<2>) in CoreData
[Instabug] - IBGCore: Coultn't find network log with task Id (LocalDataTask <ECE6A59E-2906-4FB9-890D-61DC89DB2CD7>.<2>) in CoreData
[Instabug] - IBGCore: Coultn't find network log with task Id (LocalUploadTask <23E20AA3-5921-4D67-9FF7-0B51A8B663F6>.<3>) in CoreData
[Instabug] - IBGCore: Coultn't find network log with task Id (LocalUploadTask <23E20AA3-5921-4D67-9FF7-0B51A8B663F6>.<3>) in CoreData
[Instabug] - IBGCore: Coultn't find network log with task Id (LocalUploadTask <A23528AD-346F-4F02-92F9-23908968A6C5>.<4>) in CoreData
[Instabug] - IBGCore: Coultn't find network log with task Id (LocalUploadTask <A23528AD-346F-4F02-92F9-23908968A6C5>.<4>) in CoreData
[Instabug] - IBGCore: Coultn't find network log with task Id (LocalDataTask <BE01EE72-4BAD-48AC-A572-1050E5476FDA>.<7>) in CoreData
[Instabug] - IBGCore: Coultn't find network log with task Id (LocalDataTask <BE01EE72-4BAD-48AC-A572-1050E5476FDA>.<7>) in CoreData
[Instabug] - IBGCore: Coultn't find network log with task Id (LocalDataTask <6D1E9D7B-71FC-4777-A4E1-4C6CC32F51FA>.<8>) in CoreData

We would like to keep error-level logs enabled to have visibility into anything that we should take action on, but the level of noise in these logs makes our other logging almost unusable. We need to disable Instabug logs entirely to have a usable console, but then we don't have visibility into anything Instabug is trying to tell us about that we actually should be aware of.

If I include Instabug.disableMethodSwizzling() in our integration code, we no longer receive these error logs at startup or while running the app.

Instabug integration code

CrashReporting.enabled = false
Instabug.start(withToken: configuration.instabugKey, invocationEvents: [.screenshot])
Instabug.welcomeMessageMode = .disabled
Instabug.setReproStepsFor(.bug, with: .enabledWithNoScreenshots)
Instabug.sdkDebugLogsLevel = .error
NetworkLogger.enabled = false

SDK Version

12.9.2

iOS Version

17.4

Device Model

iPad

This issue has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Thank you for your contributions.

Hello @johntmcintosh,
I am more concerned about why these logs are logged in the first place.
Those logs mean that the SDK is not able to capture the whole network log which will result in dropping it. Do you think you're firing some network request before initializing Instabug?

In the integration snippet we're also setting NetworkLogger.enabled = false, so we've been expecting that our network traffic would be irrelevant.

Hello @johntmcintosh
we are working on it and it will be released soon

I see this as well. Following this thread.

Fixed in v13.1.1.