Error while trying to send an account verification email with a dynamic link attached

Error while trying to send an account verification email with a dynamic link attached. Appeared after updating Google Services to version 14.3.66

  1. Register in firebase auth with email and password:

firebaseAuth.createUserWithEmailAndPassword(login, pass)

  1. Send email verification for firebase user with deep link:

val settings = ActionCodeSettings.newBuilder() .setHandleCodeInApp(false) .setUrl(BuildConfig.DEEP_LINK) .build() user.sendEmailVerification(settings)

  1. Catch the error in addOnFailureListener with message:

An internal error has occurred. [ MISSING_ANDROID_PACKAGE_NAME:Cannot install Android app without providing package name ]

Upvotes: 1

Views: 319

Answers (1)

Rob Lyndon
Rob Lyndon

Reputation: 12681

You need to set the Android package name in code:

val settings = ActionCodeSettings.newBuilder()
    .setHandleCodeInApp(false)
    .setAndroidPackageName("com.package.my", true, "1")
    .setUrl(BuildConfig.DEEP_LINK)
    .build();

Upvotes: 0

Related Questions