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

Android (PlayStore) : Branch SDK Params empty on background state #264

Closed
SkilyFrance opened this issue Nov 21, 2023 · 12 comments
Closed

Android (PlayStore) : Branch SDK Params empty on background state #264

SkilyFrance opened this issue Nov 21, 2023 · 12 comments
Labels
bug Something isn't working

Comments

@SkilyFrance
Copy link

SkilyFrance commented Nov 21, 2023

Hello,
I have implemented this package on my production app.

Works fine on iOS (Debug/Prod) and only in Android (Debug).
My issue is about the Android Playstore version : When my app is in background , and I click on the Deeplink, the app opens successfully but receives an empty data from the link.

Info : This test has been done with the same link (App killed and on background). So, it contains all datas.

The background state works fine on debug but not on production (Playstore).

I have added the SHA256, from PlayStore on AppLinks Cert Fingerprints, and check my AndroidManifest but no fix seems to work.

Could you help me to find a way to fix it ?

Best regards,
Guillaume

@SkilyFrance SkilyFrance added the bug Something isn't working label Nov 21, 2023
@SkilyFrance SkilyFrance changed the title Android : Branch SDK Params empty on background state Android (PlayStore) : Branch SDK Params empty on background state Nov 21, 2023
@andrehmarcilio
Copy link

I'm experiencing a similar issue. When the application is killed, and I open it by clicking the link, all data is available. However, if the application is in the background, and I click the link, I only receive the following two pieces of information: {+clicked_branch_link: false, +is_first_session: false}.

@RodrigoSMarques
Copy link
Owner

Can you tell me which version of the package and which version of Android?

Is this problem only with the play store version?

@SkilyFrance
Copy link
Author

@andrehmarcilio thanks for your comment, exactly the same for me.


@RodrigoSMarques ,Yes this issue appears only on playstore when app is in background. The behavior is :

  1. Click on link
  2. Open app (previously on background)
  3. Logs show the same empty data as @andrehmarcilio

Package version
flutter_branch_sdk 7.0.1

Build gradle
minSdkVersion : 21
compileSdkVersion : 33

Do you need more informations ?

As reminder, there is no problem with this version on debug.

@andrehmarcilio
Copy link

I'm using the latest package version (7.0.1) and testing on Android 13 (API 33). The Gradle configurations are as follows:

compileSdkVersion 33
minSdkVersion 23
targetSdkVersion 33

I'm currently running the app in release mode (on a physical device); the version with the DeepLink implementation is not yet available on the Play Store.

@SkilyFrance
Copy link
Author

Hello @RodrigoSMarques ,
Do you need more informations to reproduce this issue ?

Thanks for help.

@RodrigoSMarques
Copy link
Owner

Hello @RodrigoSMarques , Do you need more informations to reproduce this issue ?

Thanks for help.

At the moment I don't have any applications published on the Play store so I can't analyze them.

I searched the Branch for Android repository for this issue and didn't find any similar issues.

Did this problem start with version 7.0.x?

Did you use previous versions of the package (6.9.0)?

As it is a problem that only occurs in the play store release version, I cannot identify any problems with the package. It could be something in the native SDK layer.

Maybe I'm missing some rules in R8.

I have no way to analyze it.

@RodrigoSMarques
Copy link
Owner

I'm experiencing a similar issue. When the application is killed, and I open it by clicking the link, all data is available. However, if the application is in the background, and I click the link, I only receive the following two pieces of information: {+clicked_branch_link: false, +is_first_session: false}.

Is this problem only with version 7? Does it happen in version 6.x.x?

@SkilyFrance
Copy link
Author

SkilyFrance commented Nov 25, 2023

Hello @RodrigoSMarques , Do you need more informations to reproduce this issue ?
Thanks for help.

At the moment I don't have any applications published on the Play store so I can't analyze them.

I searched the Branch for Android repository for this issue and didn't find any similar issues.

Did this problem start with version 7.0.x?

Did you use previous versions of the package (6.9.0)?

As it is a problem that only occurs in the play store release version, I cannot identify any problems with the package. It could be something in the native SDK layer.

Maybe I'm missing some rules in R8.

I have no way to analyze it.

Hi @RodrigoSMarques ,
I just tried my production app (PlayStore) downgrading to 6.9.0 : This bug has gone away 👍

The listener retrieves successfully data on background with the version 6.9.0 contrary to last one.

@andrehmarcilio
Copy link

I'm experiencing a similar issue. When the application is killed, and I open it by clicking the link, all data is available. However, if the application is in the background, and I click the link, I only receive the following two pieces of information: {+clicked_branch_link: false, +is_first_session: false}.

Is this problem only with version 7? Does it happen in version 6.x.x?

Hello @RodrigoSMarques ,

I echo @SkilyFrance observation. The issue resolves when reverting to version 6.9.0. I conducted local testing in release mode. Appreciate your assistance.

RodrigoSMarques added a commit that referenced this issue Dec 7, 2023
* Fix issue #261 / #266 / #268: Calling startActivity() from outside of an Activity
* Fix issue #265: New release 7.0.0+ not getting a deeplink data on first launch, when app is on resume
* Fix issue #264: Android (PlayStore) : Branch SDK Params empty on background state
* Removing unused code
@RodrigoSMarques
Copy link
Owner

hi @SkilyFrance and @andrehmarcilio

I fixed the bug, but I need help testing the changes in different scenarios.

Can you help me with testing the new version before publishing it on pub.dev?

Update pubspec.yaml, according to the example below:

#flutter_branch_sdk: ^7.0.1
flutter_branch_sdk:
     git:
       url: https://github.com/RodrigoSMarques/flutter_branch_sdk.git
       ref: v7.0.2-dev

I'm waiting for the test results.

Thanks.

@RodrigoSMarques
Copy link
Owner

Hi @SkilyFrance and @andrehmarcilio .

Did you take the test?

@RodrigoSMarques
Copy link
Owner

Fixed in version 7.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants