Skip to content

Fix 'Continuation returned null' error when there is no previous activity #4377

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

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

lfkellogg
Copy link
Contributor

@lfkellogg lfkellogg commented Nov 29, 2022

The continuation method needs to return a non-null Task. This change doesn't have any practical effect: either way no screenshot is captured and the feedback flow opens without a screenshot attached. But right now this prints an NPE and stack trace to the logs.

Failed to take screenshot for feedback
java.lang.NullPointerException: Continuation returned null
	at com.google.android.gms.tasks.zzo.run(com.google.android.gms:play-services-tasks@@18.0.2:7)
	at com.google.firebase.appdistribution.impl.FirebaseAppDistributionLifecycleNotifier$$ExternalSyntheticLambda5.execute(Unknown Source:0)
	at com.google.android.gms.tasks.zzp.zzd(com.google.android.gms:play-services-tasks@@18.0.2:1)
	at com.google.android.gms.tasks.zzr.zzb(com.google.android.gms:play-services-tasks@@18.0.2:5)
	at com.google.android.gms.tasks.zzw.zzi(com.google.android.gms:play-services-tasks@@18.0.2:3)
	at com.google.android.gms.tasks.zzw.onSuccessTask(com.google.android.gms:play-services-tasks@@18.0.2:7)
	at com.google.firebase.appdistribution.impl.FirebaseAppDistributionLifecycleNotifier.applyToNullableForegroundActivityTask(FirebaseAppDistributionLifecycleNotifier.java:178)
	at com.google.firebase.appdistribution.impl.ScreenshotTaker.captureScreenshot(ScreenshotTaker.java:93)
        ...

@google-oss-bot
Copy link
Contributor

1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

@google-oss-bot
Copy link
Contributor

Coverage Report 1

Affected Products

  • firebase-appdistribution

    Overall coverage changed from ? (a98b78e) to 75.49% (5342850) by ?.

    40 individual files with coverage change

    FilenameBase (a98b78e)Merge (5342850)Diff
    AabUpdater.java?98.67%?
    ApkInstaller.java?96.88%?
    ApkUpdater.java?93.70%?
    AppDistributionReleaseImpl.java?100.00%?
    AppDistributionReleaseInternal.java?100.00%?
    AppIconSource.java?85.71%?
    AutoValue_AppDistributionReleaseImpl.java?65.45%?
    AutoValue_AppDistributionReleaseInternal.java?66.67%?
    AutoValue_ImageUtils_ImageSize.java?35.00%?
    AutoValue_TesterApiDisabledErrorDetails.java?29.41%?
    AutoValue_TesterApiDisabledErrorDetails_HelpLink.java?54.17%?
    AutoValue_UpdateProgressImpl.java?65.96%?
    ErrorMessages.java?0.00%?
    FeedbackActivity.java?1.12%?
    FeedbackSender.java?84.62%?
    FirebaseAppDistributionExceptions.java?80.00%?
    FirebaseAppDistributionFileProvider.java?0.00%?
    FirebaseAppDistributionImpl.java?89.86%?
    FirebaseAppDistributionLifecycleNotifier.java?92.80%?
    FirebaseAppDistributionNotificationsManager.java?85.00%?
    FirebaseAppDistributionRegistrar.java?81.40%?
    FirebaseAppDistributionTesterApiClient.java?87.63%?
    HttpsUrlConnectionFactory.java?50.00%?
    ImageUtils.java?100.00%?
    InstallActivity.java?2.53%?
    LogWrapper.java?68.75%?
    NewReleaseFetcher.java?77.55%?
    PackageInfoUtils.java?42.86%?
    ReleaseIdentifier.java?85.06%?
    ReleaseUtils.java?83.33%?
    ScreenshotTaker.java?43.40%?
    SignInResultActivity.java?0.00%?
    SignInStorage.java?42.86%?
    TakeScreenshotAndStartFeedbackActivity.java?0.00%?
    TaskUtils.java?96.30%?
    TesterApiDisabledErrorDetails.java?93.75%?
    TesterApiHttpClient.java?89.47%?
    TesterSignInManager.java?93.62%?
    UpdateProgressImpl.java?100.00%?
    UpdateTaskImpl.java?75.71%?

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/BLqZLPPSvw.html

@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • firebase-appdistribution

    TypeBase (a98b78e)Merge (5342850)Diff
    aar145 kB145 kB-2 B (-0.0%)
    apk (aggressive)831 kB831 kB-12 B (-0.0%)
    apk (release)2.01 MB2.01 MB+36 B (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/Y886mEyagc.html

@lfkellogg lfkellogg merged commit 18a488f into fad/in-app-feedback Nov 29, 2022
@lfkellogg lfkellogg deleted the lk/fix-screenshot-npe branch November 29, 2022 20:12
@firebase firebase locked and limited conversation to collaborators Dec 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants