Skip to content

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

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No 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? No Sign in to your account

Closed
mikezliu opened this issue Apr 25, 2025 · 4 comments
Closed

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

mikezliu opened this issue Apr 25, 2025 · 4 comments

Comments

@mikezliu
Copy link

Environment

  • Android Studio version: 2024.3.1 Patch 2 Meerkat
  • Firebase Component: Firebase BOM 33.13.0
  • Component version: com.google.firebase:firebase-messaging 24.1.1

The problem

We are seeing a large increase in the following error:
IOException: Invalid argument for the given fid. (stack trace below)

This started happening at around April 15 with no changes to the client side code. Here is a screenshot from Crashlytics:

Image

It only reproduces on a small % of devices and I cannot reproduce locally. The users that have hit this issue say that it doesn't occur on all their devices. On the devices where the issue occurs, re-installing the app does not fix the issue.

Relevant code

FirebaseMessaging.getInstance().token

Stack Trace:

          Non-fatal Exception: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: Invalid argument for the given fid.
       at com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:665)
       at com.google.firebase.messaging.FirebaseMessaging.lambda$getToken$7(FirebaseMessaging.java:420)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
       at java.util.concurrent.FutureTask.run(FutureTask.java:264)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
       at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.5.0:2)
       at java.lang.Thread.run(Thread.java:1012)
          Caused by java.util.concurrent.ExecutionException: java.io.IOException: Invalid argument for the given fid.
       at com.google.android.gms.tasks.Tasks.zza(com.google.android.gms:play-services-tasks@@18.1.0:5)
       at com.google.android.gms.tasks.Tasks.await(com.google.android.gms:play-services-tasks@@18.1.0:9)
       at com.google.firebase.messaging.FirebaseMessaging.blockingGetToken(FirebaseMessaging.java:663)
       at com.google.firebase.messaging.FirebaseMessaging.lambda$getToken$7(FirebaseMessaging.java:420)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
       at java.util.concurrent.FutureTask.run(FutureTask.java:264)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
       at com.google.android.gms.common.util.concurrent.zza.run(com.google.android.gms:play-services-basement@@18.5.0:2)
       at java.lang.Thread.run(Thread.java:1012)
          Caused by java.io.IOException: Invalid argument for the given fid.
       at com.google.firebase.messaging.GmsRpc.handleResponse(GmsRpc.java:309)
       at com.google.firebase.messaging.GmsRpc.lambda$extractResponseWhenComplete$0(GmsRpc.java:320)
       at com.google.android.gms.tasks.zzc.run(com.google.android.gms:play-services-tasks@@18.1.0:3)
       at com.google.android.gms.tasks.zzd.zzd(com.google.android.gms:play-services-tasks@@18.1.0:1)
       at com.google.android.gms.tasks.zzr.zzb(com.google.android.gms:play-services-tasks@@18.1.0:5)
       at com.google.android.gms.tasks.zzw.zzb(com.google.android.gms:play-services-tasks@@18.1.0:3)
       at com.google.android.gms.tasks.zzc.run(com.google.android.gms:play-services-tasks@@18.1.0:8)
       at com.google.android.gms.cloudmessaging.zzy.execute(com.google.android.gms:play-services-cloud-messaging@@17.1.0:1)
       at com.google.android.gms.tasks.zzd.zzd(com.google.android.gms:play-services-tasks@@18.1.0:1)
       at com.google.android.gms.tasks.zzr.zzb(com.google.android.gms:play-services-tasks@@18.1.0:5)
       at com.google.android.gms.tasks.zzw.zzb(com.google.android.gms:play-services-tasks@@18.1.0:3)
       at com.google.android.gms.tasks.TaskCompletionSource.setResult(com.google.android.gms:play-services-tasks@@18.1.0:1)
       at com.google.android.gms.cloudmessaging.zzr.zzd(com.google.android.gms:play-services-cloud-messaging@@17.1.0:3)
       at com.google.android.gms.cloudmessaging.zzt.zza(com.google.android.gms:play-services-cloud-messaging@@17.1.0:2)
       at com.google.android.gms.cloudmessaging.zzk.handleMessage(com.google.android.gms:play-services-cloud-messaging@@17.1.0:14)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8751)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@mikezliu mikezliu changed the title IOException: Invalid argument for the given fid [firebase-messaging] IOException: Invalid argument for the given fid Apr 25, 2025
@lehcar09
Copy link
Contributor

Hi @mikezliu, thank you for reaching out. Does this issue only occur on specific devices or versions?

You mentioned that the issue occurs without any code changes, so I'm thinking if this could be a server side issue. Looking through the graph you shared, it looks like the occurrence is decreasing. Could you confirm?

@mikezliu
Copy link
Author

The issue seems to have been resolved over the weekend with no client side changes. I've confirmed with different users that they don't see the error anymore.

@lehcar09
Copy link
Contributor

Thank you for your update. With that, I'll be closing this issue now. Let me know if there's any misunderstanding so we can reopen the issue. Thanks!

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

No branches or pull requests

3 participants