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

Memory leak on com.firebase.ui.auch.KickoffActivity #1101

Closed
viyt opened this issue Jan 9, 2018 · 3 comments
Closed

Memory leak on com.firebase.ui.auch.KickoffActivity #1101

viyt opened this issue Jan 9, 2018 · 3 comments

Comments

@viyt
Copy link

viyt commented Jan 9, 2018

Describe your environment

  • Android device:Nexus 6P
  • Android OS version: 6.0.0
  • Google Play Services version: 3.1.1
  • Firebase/Play Services SDK version: 11.8.0
  • FirebaseUI version: 3.1.3

Describe the problem:

After invoking AuthUI.getInstance().createSignInIntentBuilder() from Activity, LeakCanary reported a leak on the KickoffActivity as it can be seen in the leak canary's report screenshot.

2018-01-09 22 18 01

Steps to reproduce:

  1. Invoke AuthUI.getInstance().createSignInIntentBuilder() from Activity
  2. Wait for LeakCanary to run and report the leak

Observed Results:

Screen of the leak above

Relevant Code:

 private void signIn() {
      startActivityForResult(
              AuthUI.getInstance().createSignInIntentBuilder()
                      .setLogo(R.drawable.logo_sp_mob)
                      .setTheme(R.style.AuthUITheme)
                      .setAvailableProviders(getSelectedProviders())
                      .setIsSmartLockEnabled(false)
                      .setAllowNewEmailAccounts(true)
                      .build(),
              RC_SIGN_IN);
  }

  private List<IdpConfig> getSelectedProviders() {
      Bundle params = new Bundle();
      params.putString(AuthUI.EXTRA_DEFAULT_COUNTRY_CODE, "uk");
      List<IdpConfig> selectedProviders = new ArrayList<>();
      selectedProviders.add(new IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build());
      selectedProviders.add(new IdpConfig.Builder(AuthUI.FACEBOOK_PROVIDER).build());
      selectedProviders.add(new IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build());
      selectedProviders.add(new IdpConfig.Builder(AuthUI.PHONE_VERIFICATION_PROVIDER)
              .setParams(params).build());
      return selectedProviders;
  }
@samtstern
Copy link
Contributor

@viyt thanks for the report! Sounds like a bug, we will investigate.

@yashnagda04
Copy link

any alternate solution?

@samtstern
Copy link
Contributor

This has been fixed and released in version 3.2.0.

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

No branches or pull requests

3 participants