Skip to content

getToken(senderId, scope) throw IOException: INVALID_TARGET_VERSION. #2030

@vikey89

Description

@vikey89

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 4.0.1 Build #AI-193.6911.18.40.6626763, built on June 25, 2020
  • Firebase Component: Firebase Cloud Messaging
  • Component version: 20.3.0

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

When I compile my app with target 30 (Android 11) the method
FirebaseInstanceId.getInstance().getToken(senderId, scope) throw out the exception java.io.IOException: INVALID_TARGET_VERSION.
If I compile the app for Android Q instead, it works fine.

There is nowhere in the documentation that the method doesn't work with Android 11.

How can I set multi-senderID with an app with target 30?

Relevant Code:

Other Firebase Dependencies:

    implementation "com.google.firebase:firebase-perf:19.0.9"
    implementation "com.google.firebase:firebase-core:17.5.0"
    implementation "com.google.firebase:firebase-messaging:20.3.0"
    implementation "com.google.firebase:firebase-config:19.2.0"
    implementation "com.google.firebase:firebase-analytics:17.5.0"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions