You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, when we added the error handling class to log errors we encounter within the package, we failed to consider the case when an error occurs on start up. Specifically, if the ~/.dart-tool/dart-flutter-telemetry-session.json was malformed and was not valid json, we would encounter an error on start up.
And once we encounter this json parsing error, we properly handle it with our try/catch blocks in lib/src/session.dart file. While handling this error, we attempt to send an event that indicates what happened during this error. This error occurs because we have logic that has been placed in the Session class's constructor body.
We should instead move the logic that exists within the Session class's constructor body into a separate method called Session.initialize and only call that once we have ensured that all the necessary fields for Analytics have been initialized already
The text was updated successfully, but these errors were encountered:
Recently, when we added the error handling class to log errors we encounter within the package, we failed to consider the case when an error occurs on start up. Specifically, if the
~/.dart-tool/dart-flutter-telemetry-session.json
was malformed and was not valid json, we would encounter an error on start up.And once we encounter this json parsing error, we properly handle it with our try/catch blocks in
lib/src/session.dart
file. While handling this error, we attempt to send an event that indicates what happened during this error. This error occurs because we have logic that has been placed in theSession
class's constructor body.We should instead move the logic that exists within the
Session
class's constructor body into a separate method calledSession.initialize
and only call that once we have ensured that all the necessary fields forAnalytics
have been initialized alreadyThe text was updated successfully, but these errors were encountered: