Skip to content
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

fix(mobile): Make price nullable #1897

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Conversation

holzeis
Copy link
Contributor

@holzeis holzeis commented Jan 25, 2024

This was constantly throwing errors in the logs whenever we got a new price as it is not allowed to update a late field multiple times.

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: LateInitializationError: Field '_price@1021144427' has already been initialized.
#0      LateError._throwFieldAlreadyInitialized (dart:_internal-patch/internal_patch.dart:192:5)
#1      TradeValuesChangeNotifier._price= (package:get_10101/features/trade/trade_value_change_notifier.dart:20:20)
#2      TradeValuesChangeNotifier.updatePrice (package:get_10101/features/trade/trade_value_change_notifier.dart:102:5)
#3      TradeValuesChangeNotifier.notify (package:get_10101/features/trade/trade_value_change_notifier.dart:119:7)
#4      new EventService.create.<anonymous closure> (package:get_10101/common/application/event_service.dart:21:20)
#5      _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
#6      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#7      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#8      _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:<…>

This was constantly throwing errors in the logs whenever we got a new price as it is not allowed to update a late field multiple times.

```
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: LateInitializationError: Field '_price@1021144427' has already been initialized.
#0      LateError._throwFieldAlreadyInitialized (dart:_internal-patch/internal_patch.dart:192:5)
#1      TradeValuesChangeNotifier._price= (package:get_10101/features/trade/trade_value_change_notifier.dart:20:20)
#2      TradeValuesChangeNotifier.updatePrice (package:get_10101/features/trade/trade_value_change_notifier.dart:102:5)
#3      TradeValuesChangeNotifier.notify (package:get_10101/features/trade/trade_value_change_notifier.dart:119:7)
#4      new EventService.create.<anonymous closure> (package:get_10101/common/application/event_service.dart:21:20)
#5      _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
#6      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#7      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#8      _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:<…>
``
@holzeis holzeis requested a review from bonomat January 25, 2024 10:51
@holzeis holzeis self-assigned this Jan 25, 2024
@holzeis holzeis added this pull request to the merge queue Jan 25, 2024
Merged via the queue into main with commit 0828eca Jan 25, 2024
10 checks passed
@holzeis holzeis deleted the fix/late-initialization-error branch January 25, 2024 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants