-
Notifications
You must be signed in to change notification settings - Fork 34
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
Native executable compiled with GraalVM fails to subscribe to Google Pub/Sub topic #494
Comments
This is probably fixed by 0f223ba which updates the google cloud sdk which no longer passes cc @loicmathieu |
I'll check the reproducer with the newly published version. |
Using Google Cloud Services version 2.5.0 which will be part of the very soon to be released Quarkus 3.4 platform the reproducer now compiles to native. |
@loicmathieu well, this was not just about successful compiling the native, the real issue for me was this error message I got running the binary with the workaround |
I create a new Google Pub/Sub project for Quarkus following exactly the tutorial available on https://docs.quarkiverse.io/quarkus-google-cloud-services/main/pubsub.html using 3.2.0 Final as quarkus version. The only small difference was in the subscription name, because I already had one and therefore, I just used it like
ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of(projectId, pubSubSubscription);
Running the project on quarkus works like a charm, the subscriber works and messages are sent/received to/from the Pub/Sub subscription.
My problem comes when I try to build a native executable. I downloaded and installed Oracle GraalVM 20.0.2+9.1 and tried to build a native image.
mvnw --no-transfer-progress -f pom.xml -Pnative clean package -DskipTest
Due to following bug in GraalVM oracle/graal#5868, I had to implement following workaround apache/camel-quarkus#5006 (comment)
Probably precisely because of that GraalVM bug, Google Pub/Sub rejects the subscriber request with invalid argument error.
However, the log entries show no difference between the request sent by the executable binary and the request sent by quarkus.
Is this really just a bug of GraalVM and I have to wait for the fix? Is there any different method/framework else I can use in order to make a PubSub subscriber working under Quarkus with a native build?
How to Reproduce?
Output of java -version
java 20.0.1 2023-04-18
GraalVM version (if different from Java)
20.0.2+9.1
Quarkus version or git rev
3.2.1
Build tool (ie. output of mvnw --version or gradlew --version)
mvnw --version
Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Java version: 20.0.2, vendor: Oracle Corporation, runtime: C:\Program Files\Java\graalvm-jdk-20_windows-x64_bin\graalvm-jdk-20.0.2+9.1
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
The text was updated successfully, but these errors were encountered: