GithubHelp home page GithubHelp logo

Comments (2)

Adven27 avatar Adven27 commented on August 23, 2024

I've placed test.proto file with content from your comment to example/proto dir:

$ cat example/proto/test.proto 
package test.v1
import "google/protobuf/timestamp.proto";

option java_multiple_files = true;
option go_package = "testv1";
option java_package = "com.test.v1";
option java_outer_classname = "V1Proto";

message Employee {
  string name = 1;
  string id = 2;
  google.protobuf.Timestamp time_stamp = 3;
}

And run the container:

$ docker run -p 8888:8888 -p 50000:50000 -v $(pwd)/example/proto:/proto adven27/grpc-wiremock
Initialized native services in: /home/gradle/.gradle/native

...omitted for brevity...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':generateProto'.
> protoc: stdout: . stderr: [libprotobuf WARNING ../../../../../src/google/protobuf/compiler/parser.cc:648] No syntax specified for the proto file: test.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
  test.proto:2:1: Expected ";".
  test.proto:10:3: Expected "required", "optional", or "repeated".
  test.proto:11:3: Expected "required", "optional", or "repeated".
  test.proto:12:3: Expected "required", "optional", or "repeated".


* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 18s
3 actionable tasks: 3 executed

Here are the errors from proto compiler:

> protoc: stdout: . stderr: [libprotobuf WARNING ../../../../../src/google/protobuf/compiler/parser.cc:648] No syntax specified for the proto file: test.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
  test.proto:2:1: Expected ";".
  test.proto:10:3: Expected "required", "optional", or "repeated".
  test.proto:11:3: Expected "required", "optional", or "repeated".
  test.proto:12:3: Expected "required", "optional", or "repeated".

@deepnirmal do you sure your proto is valid?

After fixing this message Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. and this one test.proto:2:1: Expected ";". file looks like this:

$ cat example/proto/test.proto 
syntax = "proto3";
package test.v1;
import "google/protobuf/timestamp.proto";

option java_multiple_files = true;
option go_package = "testv1";
option java_package = "com.test.v1";
option java_outer_classname = "V1Proto";

message Employee {
  string name = 1;
  string id = 2;
  google.protobuf.Timestamp time_stamp = 3;
}

and container has started:

$ docker run -p 8888:8888 -p 50000:50000 -v $(pwd)/example/proto:/proto adven27/grpc-wiremock
Initialized native services in: /home/gradle/.gradle/native

...omitted for brevity...

2021-05-10 09:45:23.546  INFO 109 --- [           main] io.adven.grpc.wiremock.GrpcWiremock      : Started ServerImpl{logId=2, transportServers=[NettyServer{logId=1, address=0.0.0.0/0.0.0.0:50000}]}
Registered services:
 * grpc.reflection.v1alpha.ServerReflection
 * api.wallet.WalletService
 * api.wallet.BalanceService

from grpc-wiremock.

Adven27 avatar Adven27 commented on August 23, 2024

Please, reopen if the issue persists

from grpc-wiremock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.