Skip to content

[firebase-messaging] IOException: Invalid argument for the given fid #7025

Open
@jparkrr

Description

@jparkrr
  • Firebase Component: firebase-messaging
  • Component version: 24.0.1

Describe the problem

Steps to reproduce:

For some users, attempting to get the token returns this error:

Fetching the token failed: java.util.concurrent.ExecutionException: java.io.IOException: Invalid argument for the given fid.

Here's a related issue that shows a full stack trace: #6914

Relevant Code:

FirebaseMessaging.getInstance().token
        .addOnCompleteListener { task ->
          if (!task.isSuccessful) {
            val exception = task.exception
            promise.reject(REGISTRATION_FAIL_CODE, "Fetching the token failed: ${exception?.message ?: "unknown"}", exception)
            return@addOnCompleteListener
          }
         // ...
        }

Note: I am using this through a library called expo-notifications, so you can see all the code here: https://github.com/expo/expo/blob/c46aeff68ecf6747d792b530482f2c88111cff39/packages/expo-notifications/android/src/main/java/expo/modules/notifications/tokens/PushTokenModule.kt#L51

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