Skip to content
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

Plugin output is unparseable #262

Open
SarvarFront opened this issue Jan 12, 2021 · 2 comments
Open

Plugin output is unparseable #262

SarvarFront opened this issue Jan 12, 2021 · 2 comments
Labels

Comments

@SarvarFront
Copy link

SarvarFront commented Jan 12, 2021

Versions of relevant software used
"ts-protoc-gen": "^0.14.1-pre.e680d69"
What happened
Keep getting this error
What you expected to happen

How to reproduce it (as minimally and precisely as possible):
protoc --plugin=protoc-get-ts=C:\Projects\Angular\factory-track-prototype-app\node_modules\ts-protoc-gen\bin\protoc-gen-ts.cmd --js_out=import_style=commonjs,binary:src/app/proto --ts_out=service=grpc-web:src/app/proto -I src/app/proto src/app/proto/geo.proto

Full logs to relevant components
--ts_out: protoc-gen-ts: Plugin output is unparseable: Active code page: 437\r\nz\335\027\n\013geo_pb.d.tsz\315\027// package: geospatial\n// file: geo.proto\n\nimport * as jspb from "google-protobuf";\n\nexport class GetLocationReq
extends jspb.Message {\n getImei(): string;\n setImei(value: string): void;\n\n getFrom(): number;\n setFrom(value: number): void;\n\n getTo(): number;\n setTo(value: number): void;\n\n serializeBinary(): Uint8Array;\n toObject
(includeInstance?: boolean): GetLocationReq.AsObject;\n static toObject(includeInstance: boolean, msg: GetLocationReq): GetLocationReq.AsObject;\n static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n static e
xtensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n static serializeBinaryToWriter(message: GetLocationReq, writer: jspb.BinaryWriter): void;\n static deserializeBinary(bytes: Uint8Array): GetLocationReq;
\n static deserializeBinaryFromReader(message: GetLocationReq, reader: jspb.BinaryReader): GetLocationReq;\n}\n\nexport namespace GetLocationReq {\n export type AsObject = {\n imei: string,\n from: number,\n to: number,\n }
\n}\n\nexport class Location extends jspb.Message {\n getImei(): string;\n setImei(value: string): void;\n\n getLng(): number;\n setLng(value: number): void;\n\n getLat(): number;\n setLat(value: number): void;\n\n getAng(): num
ber;\n setAng(value: number): void;\n\n getSpd(): number;\n setSpd(value: number): void;\n\n getTs(): number;\n setTs(value: number): void;\n\n serializeBinary(): Uint8Array;\n toObject(includeInstance?: boolean): Location.AsObj
ect;\n static toObject(includeInstance: boolean, msg: Location): Location.AsObject;\n static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInf
o<jspb.Message>};\n static serializeBinaryToWriter(message: Location, writer: jspb.BinaryWriter): void;\n static deserializeBinary(bytes: Uint8Array): Location;\n static deserializeBinaryFromReader(message: Location, reader: jspb.Bi
naryReader): Location;\n}\n\nexport namespace Location {\n export type AsObject = {\n imei: string,\n lng: number,\n lat: number,\n ang: number,\n spd: number,\n ts: number,\n }\n}\n\nexport class Locations extends
jspb.Message {\n clearLocsList(): void;\n getLocsList(): Array;\n setLocsList(value: Array): void;\n addLocs(value?: Location, index?: number): Location;\n\n serializeBinary(): Uint8Array;\n toObject(includeIn
stance?: boolean): Locations.AsObject;\n static toObject(includeInstance: boolean, msg: Locations): Locations.AsObject;\n static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};\n static extensionsBinary: {[key: n
umber]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};\n static serializeBinaryToWriter(message: Locations, writer: jspb.BinaryWriter): void;\n static deserializeBinary(bytes: Uint8Array): Locations;\n static deserializeBinaryFromRea
der(message: Locations, reader: jspb.BinaryReader): Locations;\n}\n\nexport namespace Locations {\n export type AsObject = {\n locsList: Array<Location.AsObject>,\n }\n}\n\nz\271\024\n\023geo_pb_service.d.tsz\241\024// package: ge
ospatial\n// file: geo.proto\n\nimport * as geo_pb from "./geo_pb";\nimport {grpc} from "@improbable-eng/grpc-web";\n\ntype GeospatialGetLocations = {\n readonly methodName: string;\n readonly service: typeof Geospatial;\n reado
nly requestStream: false;\n readonly responseStream: false;\n readonly requestType: typeof geo_pb.GetLocationReq;\n readonly responseType: typeof geo_pb.Locations;\n};\n\ntype GeospatialStartLive = {\n readonly methodName: string;
n readonly service: typeof Geospatial;\n readonly requestStream: false;\n readonly responseStream: true;\n readonly requestType: typeof geo_pb.GetLocationReq;\n readonly responseType: typeof geo_pb.Location;\n};\n\nexport class Ge
ospatial {\n static readonly serviceName: string;\n static readonly GetLocations: GeospatialGetLocations;\n static readonly StartLive: GeospatialStartLive;\n}\n\nexport type ServiceError = { message: string, code: number; metadata:
grpc.Metadata }\nexport type Status = { details: string, code: number; metadata: grpc.Metadata }\n\ninterface UnaryResponse {\n cancel(): void;\n}\ninterface ResponseStream {\n cancel(): void;\n on(type: 'data', handler: (messa
ge: T) => void): ResponseStream;\n on(type: 'end', handler: (status?: Status) => void): ResponseStream;\n on(type: 'status', handler: (status: Status) => void): ResponseStream;\n}\ninterface RequestStream {\n write(m
essage: T): RequestStream;\n end(): void;\n cancel(): void;\n on(type: 'end', handler: (status?: Status) => void): RequestStream;\n on(type: 'status', handler: (status: Status) => void): RequestStream;\n}\ninterface Bi
directionalStream<ReqT, ResT> {\n write(message: ReqT): BidirectionalStream<ReqT, ResT>;\n end(): void;\n cancel(): void;\n on(type: 'data', handler: (message: ResT) => void): BidirectionalStream<ReqT, ResT>;\n on(type: 'end',
handler: (status?: Status) => void): BidirectionalStream<ReqT, ResT>;\n on(type: 'status', handler: (status: Status) => void): BidirectionalStream<ReqT, ResT>;\n}\n\nexport class GeospatialClient {\n readonly serviceHost: string;
n\n constructor(serviceHost: string, options?: grpc.RpcOptions);\n getLocations(\n requestMessage: geo_pb.GetLocationReq,\n metadata: grpc.Metadata,\n callback: (error: ServiceError|null, responseMessage: geo_pb.Locations|nu
ll) => void\n ): UnaryResponse;\n getLocations(\n requestMessage: geo_pb.GetLocationReq,\n callback: (error: ServiceError|null, responseMessage: geo_pb.Locations|null) => void\n ): UnaryResponse;\n startLive(requestMessage: g
eo_pb.GetLocationReq, metadata?: grpc.Metadata): ResponseStream<geo_pb.Location>;\n}\n\nz\346\025\n\021geo_pb_service.jsz\320\025// package: geospatial\n// file: geo.proto\n\nvar geo_pb = require("./geo_pb");\nvar grpc = require("@i
mprobable-eng/grpc-web").grpc;\n\nvar Geospatial = (function () {\n function Geospatial() {}\n Geospatial.serviceName = "geospatial.Geospatial";\n return Geospatial;\n}());\n\nGeospatial.GetLocations = {\n methodName: "GetLocat
ions",\n service: Geospatial,\n requestStream: false,\n responseStream: false,\n requestType: geo_pb.GetLocationReq,\n responseType: geo_pb.Locations\n};\n\nGeospatial.StartLive = {\n methodName: "StartLive",\n service: Geosp
atial,\n requestStream: false,\n responseStream: true,\n requestType: geo_pb.GetLocationReq,\n responseType: geo_pb.Location\n};\n\nexports.Geospatial = Geospatial;\n\nfunction GeospatialClient(serviceHost, options) {\n this.servi
ceHost = serviceHost;\n this.options = options || {};\n}\n\nGeospatialClient.prototype.getLocations = function getLocations(requestMessage, metadata, callback) {\n if (arguments.length === 2) {\n callback = arguments[1];\n }\n v
ar client = grpc.unary(Geospatial.GetLocations, {\n request: requestMessage,\n host: this.serviceHost,\n metadata: metadata,\n transport: this.options.transport,\n debug: this.options.debug,\n onEnd: function (respons
e) {\n if (callback) {\n if (response.status !== grpc.Code.OK) {\n var err = new Error(response.statusMessage);\n err.code = response.status;\n err.metadata = response.trailers;\n callbac
k(err, null);\n } else {\n callback(null, response.message);\n }\n }\n }\n });\n return {\n cancel: function () {\n callback = null;\n client.close();\n }\n };\n};\n\nGeospatialClient.p
rototype.startLive = function startLive(requestMessage, metadata) {\n var listeners = {\n data: [],\n end: [],\n status: []\n };\n var client = grpc.invoke(Geospatial.StartLive, {\n request: requestMessage,\n host: th
is.serviceHost,\n metadata: metadata,\n transport: this.options.transport,\n debug: this.options.debug,\n onMessage: function (responseMessage) {\n listeners.data.forEach(function (handler) {\n handler(responseM
essage);\n });\n },\n onEnd: function (status, statusMessage, trailers) {\n listeners.status.forEach(function (handler) {\n handler({ code: status, details: statusMessage, metadata: trailers });\n });\n
listeners.end.forEach(function (handler) {\n handler({ code: status, details: statusMessage, metadata: trailers });\n });\n listeners = null;\n }\n });\n return {\n on: function (type, handler) {\n listen
ers[type].push(handler);\n return this;\n },\n cancel: function () {\n listeners = null;\n client.close();\n }\n };\n};\n\nexports.GeospatialClient = GeospatialClient;\n\n

Anything else we need to know

@SarvarFront
Copy link
Author

@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant