-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Unable to run a native image on GCP (Cloud Run) #3042
Comments
@gbhojak to narrow down a little bit: looking at your stacktrace it seems this error is related to gRPC (which is what the library uses underneath). |
Hi @renannprado , thank you for responding back. It is related to use of gRPC. Looking at 2516, it does look like micronaut app should compile in native mode while using Cloud Firestore sdk. I am not sure if I am missing anything. Would appreciate any help with it. Thank you. |
@gbhojak - Hey did you ever figure this out? I am encountering the same error. |
Hi @dzou , I ended up not using micronaut coz of this issue. I developed the microservice in Go language instead. |
I ran into the same issue, and it is related to the included version of grpc-netty-shaded. What I wound up doing, at least for now, was to exclude that transitive artifact and instead use grpc-okhttp. So, my pom.xml looks like this:
|
@emilvberglind does it work for you with exclusion? It compiles, but FCM always returns 400 at cloud Run, running in JVM works fine. I'm having same error as here GoogleCloudPlatform/native-image-support-java#116 <!-- FCM -->
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>9.2.0</version>
<exclusions>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--Using OkHttp over netty because the shaded netty included in grpc does not work with native image-->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-okhttp</artifactId>
<version>1.51.1</version>
</dependency> |
Hi everyone,
I am trying to compile a simple hello-world application to a native image on GCP.
I have added firebase-admin sdk provided by GCP to access their cloud firestore database.
Would really appreciate any help here. We are trying to use micronaut to create at least 4-5 microservices to run on Cloud Run, hence would like to leverage the fast startup times and reduced memory footprint.
Steps to Reproduce
mn create-app hello-world --features graal-native-image
Added the dependency for firebase-admin sdk to pom.xml
I tried to follow the recommendations mentioned here and here
Here are the contents of native-image.properties:
and reflect-config.json
Expected Behaviour
Should be able to invoke the 'hello world' api
Actual Behaviour
Environment Information
The text was updated successfully, but these errors were encountered: