Description
When using Wiredash.trackEvent() on Flutter Web, we intermittently get the following error:
TypeError: Instance of 'LegacyJavaScriptObject': type 'LegacyJavaScriptObject' is not a subtype of type 'DateTime'
Stack Trace
DartError: TypeError: Instance of 'LegacyJavaScriptObject': type 'LegacyJavaScriptObject' is not a subtype of type 'FlutterErrorDetails'
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 274:3 throw_
dart-sdk/lib/_internal/js_shared/lib/rti.dart 1503:3 _generalAsCheckImplementation
package:wiredash/src/an4lytics/an4lytics.dart 175:39 <fn>
package:wiredash/src/core/wuid_generator.dart 99:3 <fn>
Environment
- Wiredash version: 2.6.0
- Flutter version: 3.38.5
- Dart SDK: >=3.10.0
- Platform: Flutter Web (Chrome)
Steps to Reproduce
- Initialize Wiredash in a Flutter Web app
- Call
Wiredash.trackEvent('event_name', data: {...})
- Error occurs intermittently
Workaround
Currently wrapping trackEvent in a try-catch to suppress the error:
try {
Wiredash.trackEvent(name, data: logBody);
} catch (_) {
// Wiredash has known issues on Flutter web - silently ignore
}
Expected Behavior
trackEvent should work without errors on Flutter Web.
Description
When using
Wiredash.trackEvent()on Flutter Web, we intermittently get the following error:Stack Trace
Environment
Steps to Reproduce
Wiredash.trackEvent('event_name', data: {...})Workaround
Currently wrapping
trackEventin a try-catch to suppress the error:Expected Behavior
trackEventshould work without errors on Flutter Web.