Akka-grpc-maven-plugin throwing error of "Unsupported platform: protoc-3.19.1-osx-x86_64.exe"

I have been using MacBook Pro of 1.4GHz Quad-Core Intel Core i5 laptop . Below is my system configuration

Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
Maven home: /usr/local/Cellar/maven/3.8.5/libexec
Java version: 11.0.11, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "11.3", arch: "x86_64", family: "mac"

Now when I ran the command mvn clean install on my project it is throwing following error:

[ERROR] Failed to execute goal com.lightbend.akka.grpc:akka-grpc-maven-plugin:2.1.2:generate (default) on project my-test-project: Execution default of goal com.lightbend.akka.grpc:akka-grpc-maven-plugin:2.1.2:generate failed: error occurred while compiling protobuf files: Unsupported platform: protoc-3.19.1-osx-x86_64.exe → [Help 1]

This issue occurring only on my laptop (Mac with intel i5) but the others also having the same type of laptop but they are not getting this issue.

I really do not understood what I am missing on my laptop.

Kindly provide your inputs.

I don’t think we have heard of problems with x86_64 before, does the problem persist if you upgrade to the latest release of akka-grpc-maven-plugin (2.1.4)?

I see that there was a couple of bumps of the transitive protobuf-java version since 2.1.2.

Hi John,

Thanks for your inputs. I will try and get back on this asap.

If you don’t mind kindly describe more about what is this bumps of transitive prtobuf-java issue.

BTW do you think am I missing anything in my local system hence it is causing this issue? because my other team members are not having this issue with the same 2.1.2 version.

Thanks,
Baji

hi John,

I just tried by upgrading the version from 2.1.2. to 2.1.4 but still ended up with same issue.

[ ERROR ] Failed to execute goal com.lightbend.akka.grpc:akka-grpc-maven-plugin:2.1.4:generate (default) on project my-test-project: Execution default of goal com.lightbend.akka.grpc:akka-grpc-maven-plugin:2.1.4:generate failed: error occurred while compiling protobuf files: Unsupported platform: protoc-3.19.4-osx-x86_64.exe[Help 1]

Below is output when ran maven with -X

[ERROR] Failed to execute goal com.lightbend.akka.grpc:akka-grpc-maven-plugin:2.1.4:generate (default) on project my-test-project: Execution default of goal com.lightbend.akka.grpc:akka-grpc-maven-plugin:2.1.4:generate failed: error occurred while compiling protobuf files: Unsupported platform: protoc-3.19.4-osx-x86_64.exe -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.lightbend.akka.grpc:akka-grpc-maven-plugin:2.1.4:generate (default) on project my-test-project: Execution default of goal com.lightbend.akka.grpc:akka-grpc-maven-plugin:2.1.4:generate failed: error occurred while compiling protobuf files: Unsupported platform: protoc-3.19.4-osx-x86_64.exe
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:306)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal com.lightbend.akka.grpc:akka-grpc-maven-plugin:2.1.4:generate failed: error occurred while compiling protobuf files: Unsupported platform: protoc-3.19.4-osx-x86_64.exe
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:301)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.RuntimeException: error occurred while compiling protobuf files: Unsupported platform: protoc-3.19.4-osx-x86_64.exe
    at akka.grpc.maven.AbstractGenerateMojo.executeProtoc (AbstractGenerateMojo.scala:230)
    at akka.grpc.maven.AbstractGenerateMojo.$anonfun$compile$6 (AbstractGenerateMojo.scala:259)
    at scala.runtime.java8.JFunction0$mcI$sp.apply (JFunction0$mcI$sp.java:23)
    at akka.grpc.maven.AbstractGenerateMojo$.akka$grpc$maven$AbstractGenerateMojo$$captureStdOutAnderr (AbstractGenerateMojo.scala:46)
    at akka.grpc.maven.AbstractGenerateMojo.compile (AbstractGenerateMojo.scala:259)
    at akka.grpc.maven.AbstractGenerateMojo.generate (AbstractGenerateMojo.scala:209)
    at akka.grpc.maven.AbstractGenerateMojo.$anonfun$execute$1 (AbstractGenerateMojo.scala:156)
    at java.util.ArrayList.forEach (ArrayList.java:1541)
    at akka.grpc.maven.AbstractGenerateMojo.execute (AbstractGenerateMojo.scala:132)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:301)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.io.FileNotFoundException: Unsupported platform: protoc-3.19.4-osx-x86_64.exe
    at com.github.os72.protocjar.Protoc.extractProtoc (Protoc.java:223)
    at com.github.os72.protocjar.Protoc.extractProtoc (Protoc.java:184)
    at com.github.os72.protocjar.Protoc.runProtoc (Protoc.java:68)
    at com.github.os72.protocjar.Protoc.runProtoc (Protoc.java:55)
    at akka.grpc.maven.AbstractGenerateMojo.$anonfun$generate$6 (AbstractGenerateMojo.scala:206)
    at akka.grpc.maven.AbstractGenerateMojo.$anonfun$generate$6$adapted (AbstractGenerateMojo.scala:205)
    at akka.grpc.maven.AbstractGenerateMojo.$anonfun$executeProtoc$1 (AbstractGenerateMojo.scala:222)
    at akka.grpc.maven.AbstractGenerateMojo.$anonfun$executeProtoc$1$adapted (AbstractGenerateMojo.scala:222)
    at protocbridge.ProtocRunner$$anon$2.run (ProtocRunner.scala:44)
    at protocbridge.ProtocBridge$.runWithGenerators (ProtocBridge.scala:161)
    at protocbridge.ProtocBridge$.execute (ProtocBridge.scala:85)
    at protocbridge.ProtocBridge$.execute (ProtocBridge.scala:34)
    at akka.grpc.maven.AbstractGenerateMojo.executeProtoc (AbstractGenerateMojo.scala:225)
    at akka.grpc.maven.AbstractGenerateMojo.$anonfun$compile$6 (AbstractGenerateMojo.scala:259)
    at scala.runtime.java8.JFunction0$mcI$sp.apply (JFunction0$mcI$sp.java:23)
    at akka.grpc.maven.AbstractGenerateMojo$.akka$grpc$maven$AbstractGenerateMojo$$captureStdOutAnderr (AbstractGenerateMojo.scala:46)
    at akka.grpc.maven.AbstractGenerateMojo.compile (AbstractGenerateMojo.scala:259)
    at akka.grpc.maven.AbstractGenerateMojo.generate (AbstractGenerateMojo.scala:209)
    at akka.grpc.maven.AbstractGenerateMojo.$anonfun$execute$1 (AbstractGenerateMojo.scala:156)
    at java.util.ArrayList.forEach (ArrayList.java:1541)
    at akka.grpc.maven.AbstractGenerateMojo.execute (AbstractGenerateMojo.scala:132)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:301)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:211)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:165)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:157)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:121)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:127)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Thanks,
Baji

Curious that it is failing like that because that file is in maven central: https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.19.4/

John,

Do think am I missing anything in local mac? hence this issue causing.

BTW why it is using exe file on Mac os?

No, as long as you have a JDK and maven, maven should download all that is needed. I don’t have a good idea about what could be wrong.

The .exe is just a file name extension (I think it might be required for publishing files on maven central), the binary is a MacOS native executable, not a windows .exe-file.

I was getting a similar error on my machine. It says in the logs FileNotFoundException which means it couldn’t able to download the required akka grpc maven plugin from where you are downloading it. In my case, I was downloading it from an internal nexus. I cleared my m2 repository and started the build again. The build failed again at the beginning, saying it couldn’t able to download anything from the nexus. I fixed the connectivity with nexus by setting IP instead of host name because it was a DNS issue on my machine.

@johanandren - BTW it was fixed after complete reformat my MAC OS.