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(firebase_dynamic_links): Properly type cast utmParameters coming from native side. #8263

Conversation

odlund
Copy link

@odlund odlund commented Mar 11, 2022

Description

The PendingDynamicLinkData constructs expects the parameter utmParams to be a Map<String, String> but was passed a Map<dynamic,dynamic> this silently fails with a typecast exception and deep links seems to just not show up in the flutter app.

Related Issues

fixes #8261

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@odlund odlund changed the title Fix type cast issue with utmParameters fix: type cast issue with utmParameters Mar 11, 2022
@nilsreichardt
Copy link
Contributor

@russellwheatley It seems so that the current version (4.10.0) of firebase_dynamic_links doesn't work. I'm not able to receive dynamic links with onLink. I haven't tested it yet, but other users complaining that getInitialLink also not working (see #8261).

With the PR of @odlund, it's working again.

It would be nice to have (integration) tests which catch these kinds of issues. Otherwise, almost the entire packing isn't working anymore.

@crushman1
Copy link

this issue is happening on firebase_dynamic_links: ^4.0.7 as well. it says type '_InternalLinkedHashMap<Object?, Object?>' is not a subtype of type 'Map<String, String>' when it gets data in not null in final PendingDynamicLinkData? data = await FirebaseDynamicLinks.instance.getInitialLink();

@scott-the-brewer
Copy link

I can confirm this works for me. Thanks @odlund

@russellwheatley russellwheatley changed the title fix: type cast issue with utmParameters fix(firebase_dynamic_links): Properly type cast utmParameters coming from native side. Mar 15, 2022
Copy link
Member

@russellwheatley russellwheatley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR 🙏.

@russellwheatley
Copy link
Member

@odlund Thank you for PR, but I've opened a new one here given it needs to be merged and released ASAP. I tried to push to your repo but no write permission apparently. Thanks again!

@odlund
Copy link
Author

odlund commented Mar 15, 2022

@russellwheatley Thanks!

@firebase firebase locked and limited conversation to collaborators Apr 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [dynamic_links] getInitialLink() is always returning null (on Android)
5 participants