Error while generating grpc files (--grpc_out: protoc-gen-grpc: Plugin failed with status code 1.)

See original GitHub issue

I’m trying to run the following command to generate grpc files: protoc --proto_path=$PROTO_PATH --plugin=protoc-gen-grpc=$PLUGIN_GRPC --grpc_out=$OUT/grpc $PROTO_FILES

This results in the following error: /Users/MYUSERNAME/Downloads/protoc-gen-grpc-java-1.48.1-osx-aarch_64.exe: program not found or is not executable Please specify a program using absolute path or make sure the program is available in your PATH system variable --grpc_out: protoc-gen-grpc: Plugin failed with status code 1.

I made sure the file from the error message is located at that path and has also the correct permissions.

-rwxrwxrwx@ 1 MYUSERNAME staff 6334176 10 Aug 00:03 protoc-gen-grpc-java-1.48.1-osx-aarch_64.exe

I also tried running the command as sudo.

Generating java or kotlin files with --java_out=$OUT/java --kotlin_out=$OUT/kotlin

works perfectly fine, so the problem is --grpc_out=$OUT/grpc

I also downloaded multiple versions of the protoc-gen-grpc-java-1.48.1-osx-aarch_64.exe file but it always results in the same error. I also tried replacing all path variables (e.g. $PROTO_PATH) with their corresponding values, without any effect. I’m using MacBook with M1Pro chip.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
Phlegethon90commented, Aug 29, 2022

Fixed it by softwareupdate --install-rosetta, because the executable is still x86.

3reactions
ejona86commented, Aug 25, 2022

Call /Users/MYUSERNAME/Downloads/protoc-gen-grpc-java-1.48.1-osx-aarch_64.exe directly in a console. If it hangs, that’s okay, as it is waiting for input from stdin. But if it fails it means something is wrong in your environment, like you need to call chmod +x on it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

grpc_out: protoc-gen-grpc: Plugin failed with status code 1 ...
I made sure the file from the error message is located at that path and has also the correct permissions. -rwxrwxrwx@ 1 MYUSERNAME...
Read more >
protoc-gen-grpc-web: plugin failed with status code 1. - You.com
I'm trying to create react typescript app with grpc, my protoc version is: libprotoc 3.20.1. I'm running this command to compile a proto...
Read more >
Custom compile and install for protobuf and grpc
... grpc gives following error. [GRPC] Generating gRPC's protobuf service CC file from ... --grpc_out: protoc-gen-grpc: Plugin failed with status code 127.
Read more >
Protoc-Gen-Grpc: Plugin Failed With Status Code 1 On Osx ...
The error message is saying: Please either specify an absolute path or don't specify a program name at all and make sure the...
Read more >
Usage - Buf.build
In short, the buf.gen.yaml file is used to easily generate code with protoc ... plugin: go out: gen/go opt: paths=source_relative - plugin: go-grpc...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found