Skip to content

Firebase Java Admin SDK does not support GraalVM Native Image #1171

@bhargavs153

Description

@bhargavs153

Description

We are trying to build a GraalVM native image for a Java application that uses the Firebase Java Admin SDK, but native-image compilation fails due to missing configuration and unsupported runtime features.

This limitation makes it difficult to use Firebase Admin SDK in serverless / containerized environments (e.g., Cloud Run, AWS Lambda, KnIs your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise descriptiIs your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.
on of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.
ative) where fast startup time and low memory usage are critical.

Environment

Java version: 17 (also reproducible with 11)

GraalVM: 22.x / 23.x

Native-image: enabled

Framework: Quarkus / Micronaut / plain Java (issue is framework-independent)

Firebase Admin SDK version: latest (reproducible across multiple versions)

Problem Details

During native-image build or runtime, the following issues occur:

Heavy use of reflection without proper reflect-config.json

Dynamic class loading not compatible with GraalVM native image

Security providers / SSL initialization failing at build or runtime

JSON parsing / protobuf initialization failing due to missing metadata

Firebase internally relies on libraries that are not GraalVM-friendly by default

As a result:

Native image build fails OR

Application builds but crashes at runtime

Expected Behavior

The Firebase Java Admin SDK should:

Either officially support GraalVM native image

Or provide official documentation/configuration:

Reflection configuration

Resource configuration

JNI configuration (if required)

Or clearly state that GraalVM native image is not supported

Why This Matters

Java developers increasingly rely on GraalVM native images for:

Faster cold starts

Lower memory usage

Cost-efficient serverless workloads

Competing ecosystems (Go, Node.js) already perform well in these environments

Lack of GraalVM support makes Firebase Admin SDK hard to use in modern cloud-native Java stacks

Possible Improvements / Suggestions

Provide official GraalVM metadata (META-INF/native-image)

Publish a compatibility guide for GraalVM

Test Firebase Admin SDK with Quarkus / Micronaut native builds

Clearly document unsupported features if full support is not feasible

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