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

UnsupportedError (Unsupported operation: Cannot modify unmodifiable map) when calling Event.exception #1195

Closed
andrewkolos opened this issue Nov 13, 2024 · 1 comment · Fixed by #1200

Comments

@andrewkolos
Copy link
Contributor

The flutter tool pubroll is blocked on unified_analytics 6.1.5. See flutter/flutter#158347, where I documented my findings.

Consider the Event.exception constructor:

Event.exception({
required String exception,
Map<String, Object?> data = const <String, Object?>{},
}) : eventName = DashEvent.exception,
eventData = {
'exception': exception,
...data..removeWhere((key, value) => value == null),
};

Notice that the default argument for data is a const map literal, for which I assume removeWhere is not permitted.

@andrewkolos
Copy link
Contributor Author

Assigning to @kenzieschmoll since they 1) have more context on the change that introduced this and 2) from talking to Ben, it sounds like the fix would need to be propagated to places other than the flutter tool that I am not aware of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants