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

[Dynamic links] Shortlink is not handled in 8.8.0 #8786

Closed
eiskalt opened this issue Oct 11, 2021 · 10 comments
Closed

[Dynamic links] Shortlink is not handled in 8.8.0 #8786

eiskalt opened this issue Oct 11, 2021 · 10 comments
Assignees

Comments

@eiskalt
Copy link

eiskalt commented Oct 11, 2021

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 13.0
  • Firebase SDK version: 8.8.0
  • Installation method: CocoaPods
  • Firebase Component: DynamicLinks

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

Try to use DynamicLinks.dynamicLinks().handleUniversalLink(url) on a shortlink for a Firebase generated DynamicLink.

Links of the format https://*.page.link/test do not match the new regex that was implemented in this commit 85864c6

Full links of the format https://*.page.link/?link=https://google.com/test do work correctly.

They are working correctly in 8.7.0.

@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.
@eldhosembabu
Copy link
Contributor

taking a look...will keep you posted

@eldhosembabu
Copy link
Contributor

I was not able to reproduce this issue. Do you mind providing a sample url that you are using for testing?

I've tried reproducing this issue on a sample app and it was working as expected.

I've added a unit test to check this specifically in PR : #8793 and the unit tests are green.

Also we already have a unit test in place to check the link format whether it will match the regex here : https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseDynamicLinks/Tests/Unit/FIRDynamicLinksTest.m#L1109

If this issue is still reproducible on your end, would be great if you can provide us a sample app (use the Dynamic Links Quick Start App : https://github.com/firebase/quickstart-ios/tree/master/dynamiclinks) along with a video on reproducing the issue as it will help us to reproduce the issue on our end and to come up with a fix if required.

@eiskalt
Copy link
Author

eiskalt commented Oct 13, 2021

I did a little more investigation and it appears to be failing when the link includes a - (which I didn't include in my example as I assumed it was just failing for all) for example https://*.page.link/test-test.

I have tested the regex using the above example and it is failing when the- is included.

@paulb777
Copy link
Member

The test in #8793 still passes for me if I change line 1378 to NSString *urlString = @"https://foo.page.link/?link=https://google.com/test-test";

@paulb777
Copy link
Member

Could the issue be related to a non-ASCII -(dash)?

@eldhosembabu
Copy link
Contributor

@paulb777 in the above comment, we tried with the long link...we need to try with short link ie. https://foo.page.link/test-test which going to be failing since the regex is not expecting '-' and/or '_' in the short FDL identifier. This happens when user manually creates the short link with the above characters. I'll do a quick fix and update the PR here.

@eldhosembabu
Copy link
Contributor

Added support for '_' and '-' in PR : #8793

Also added unit test cases for the same.

@eiskalt
Copy link
Author

eiskalt commented Oct 13, 2021

Thanks for looking into it 😄

@eldhosembabu
Copy link
Contributor

The PR is merged and the fix should be available in 8.9.0.

Closing this bug for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
5 participants