-
Notifications
You must be signed in to change notification settings - Fork 41
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
Datadog experienced a PlatformException - No logger available with handle 919809f1-a502-461e-b7f1-1735b75a1e16 in call to log. #530
Comments
Hi @rohith-alphanso thanks for reporting! 2.1.0 added a finalizer to Loggers to remove them when Dart no longer can reach them. I'm curious why the finalizer is working differently on the iPhone SE simulator.... Is this reproducable with a simple case? Can you give me a simple example project to see if I can figure out why Dart might be finalizing the logger? |
We are facing this exception, with |
@rohith-alphanso That is incredibly strange, as prior to 2.1.0 we didn't remove loggers from the registry. I'll continue looking into this but please let me know if you find a simple repro. |
@rohith-alphanso I can't reproduce here with my simple examples. I'm wondering if there's something weird in your initialization. Are you awaiting |
yes, final datadogConfiguration = DatadogUtils.getDatadogSdkConfiguration();
await DatadogSdk.instance
.initialize(datadogConfiguration, TrackingConsent.granted); |
static final _datadogLogger = DatadogLogger(
InternalLogger(),
DatadogLoggerConfiguration(
networkInfoEnabled: true,
),
);
static DatadogConfiguration getDatadogSdkConfiguration() {
final datadogEnvironment = _getDatadogEnvironment();
return DatadogConfiguration(
service: 'XXXXX',
clientToken: _clientToken,
env: datadogEnvironment,
site: _datadogSite,
nativeCrashReportEnabled: true,
firstPartyHosts: _firstPartyHosts,
uploadFrequency: UploadFrequency.frequent,
rumConfiguration: DatadogRumConfiguration(
applicationId: _applicationId,
viewEventMapper: DatadogSessionIdRetriever.viewEventMapper,
),
)..enableHttpTracking();
};
final datadogConfiguration = getDatadogSdkConfiguration();
await DatadogSdk.instance
.initialize(datadogConfiguration, TrackingConsent.granted);
|
@rohith-alphanso I'll confirm, but my guess is that the static initialization of Hopefully your call to |
Oh, actually, this is improper usage of this API. To create loggers, it's expected you will call |
`DatadogLogger`'s constructor was not properly marked as internal. Add the `internal` attribute and add some clarifying documentation to the class description and constructor refs: #530
yes Future<void> initializeApp() async {
WidgetsFlutterBinding.ensureInitialized();
final datadogConfiguration = DatadogUtils.getDatadogSdkConfiguration();
await DatadogSdk.instance
.initialize(datadogConfiguration, TrackingConsent.granted);
FlutterError.onError = (final details) {
FlutterError.presentError(details);
DatadogSdk.instance.rum?.handleFlutterError(details);
};
PlatformDispatcher.instance.onError = (final error, final stackTrace) {
DatadogSdk.instance.rum?.addErrorInfo(
error.toString(),
RumErrorSource.source,
stackTrace: stackTrace,
);
return true;
};
}
This |
@rohith-alphanso See above though. You cannot create a |
@rohith-alphanso Did you ever get this resolved? |
Yes
…On Wed, 3 Jan 2024, 8:40 pm Jeff Ward, ***@***.***> wrote:
@rohith-alphanso <https://github.com/rohith-alphanso> Did you ever get
this resolved?
—
Reply to this email directly, view it on GitHub
<#530 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BDTQBN2SYX76WFW7LV6TAI3YMVYFTAVCNFSM6AAAAABATJ4BBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZVGUZDIMRZGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks for taking the time for reporting an issue!
Describe what happened
I tried to my app on
Iphone SE 3rd generation simulator
I am getting this exceptionIt doesn't happen with my other simulator (Iphone 15 Pro Max) and real device (Iphone Xs Max)
Steps to reproduce the issue:
Describe what you expected:
Additional context
The text was updated successfully, but these errors were encountered: