Skip to content

FirebaseAI.getInstance(FirebaseApp) StackOverflowException #6971

Closed
@emilypgoogle

Description

@emilypgoogle

Bug

When calling FirebaseAI.getInstance(FirebaseApp), any app will crash with a StackOverflowException because the method calls itself.

Offending code snippet: https://github.com/firebase/firebase-android-sdk/blob/main/firebase-ai/src/main/kotlin/com/google/firebase/ai/FirebaseAI.kt#L223

Workaround

This can be avoided by simply calling FirebaseAI.getInstance(FirebaseApp, GenerativeBackend) and explicitly specifying the backend, or, if using the default app, FirebaseAI.instance/FirebaseAI.getInstance() will also work fine.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions