Skip to content

(ANDROID SDK)FirebaseAnalytics..getAppInstanceId generated an ID with a length of 64. Under what circumstances would an ID of length 64 be generated? #6986

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

Open
wangtengyuty opened this issue May 23, 2025 · 2 comments

Comments

@wangtengyuty
Copy link

In the past year, the IDs generated by FirebaseAnalytics.getAppInstanceId() have consistently been 32 characters long. However, I recently observed that it generated an ID with a length of 64. Under what circumstances would a 64-character ID be generated? Is this expected behavior, or could it indicate an issue?

@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.

@lehcar09
Copy link
Contributor

Hi @wangtengyuty, thank you for reaching out. Per documentation,

The app-instance ID value must be a 32 hexadecimal without dashes or RFC 4122 version-4 UUID without the dashes.

I tried retrieving the Google Analytics app instance id on an emulator (Medium Phone and Pixel 8a) and I got 32 characters.

FirebaseAnalytics.getInstance(this).appInstanceId.addOnCompleteListener { task ->
            if (task.isSuccessful) {
                val appInstanceId = task.result
                Log.d("Analytics", "App Instance ID: $appInstanceId")
            } else {
                Log.e("Analytics", "Error getting app instance ID", task.exception)
            }
        }

And, I'm using the dependencies below:

// build.gradle.kts
plugins {
    id("com.android.application") version "8.10.0" apply false
    id("com.android.library") version "8.10.0" apply false
    id("org.jetbrains.kotlin.android") version "2.1.20" apply false
    id("com.google.gms.google-services") version "4.4.2" apply false
}

// app/build.gradle.kts
dependencies {
    ...
    implementation(platform("com.google.firebase:firebase-bom:33.14.0"))
}

Does the behavior reproducible? or does it occur on specific device?

Can you share the dependencies you're using?

Thanks!

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

No branches or pull requests

3 participants