rules_ts icon indicating copy to clipboard operation
rules_ts copied to clipboard

[Bug]: [AssertionError]: Failure: Invalid byte length!

Open matthewjh opened this issue 3 years ago • 1 comments

What happened?

Just got this on our CI - first time I've seen it:

Worker process did not return a WorkResponse:
---8<---8<--- Start of log snippet, file at /root/bazel/762abfc380be15f4878bfa091fdda4af/bazel-workers/worker-8-TsProject.log ---8<---8<---
[... truncated ...]
oog.asserts.DEFAULT_ERROR_HANDLER=function(a){throw a;};goog.asserts.errorHandler_=goog.asserts.DEFAULT_ERROR_HANDLER;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
Error [AssertionError]: Failure: Invalid byte length!
    at new goog.asserts.AssertionError (/root/bazel/762abfc380be15f4878bfa091fdda4af/execroot/web/bazel-out/k8-opt-exec-2B5CBBC6-ST-887e3c1d132f/bin/external/npm_typescript/tsc_worker.sh.runfiles/npm_typescript/node_modules/.aspect_rules_js/[email protected]/node_modules/google-protobuf/google-protobuf.js:87:1065)
    at Object.goog.asserts.fail (/root/bazel/762abfc380be15f4878bfa091fdda4af/execroot/web/bazel-out/k8-opt-exec-2B5CBBC6-ST-887e3c1d132f/bin/external/npm_typescript/tsc_worker.sh.runfiles/npm_typescript/node_modules/.aspect_rules_js/[email protected]/node_modules/google-protobuf/google-protobuf.js:90:89)
    at jspb.BinaryDecoder.readBytes (/root/bazel/762abfc380be15f4878bfa091fdda4af/execroot/web/bazel-out/k8-opt-exec-2B5CBBC6-ST-887e3c1d132f/bin/external/npm_typescript/tsc_worker.sh.runfiles/npm_typescript/node_modules/.aspect_rules_js/[email protected]/node_modules/google-protobuf/google-protobuf.js:369:276)
    at jspb.BinaryReader.readBytes (/root/bazel/762abfc380be15f4878bfa091fdda4af/execroot/web/bazel-out/k8-opt-exec-2B5CBBC6-ST-887e3c1d132f/bin/external/npm_typescript/tsc_worker.sh.runfiles/npm_typescript/node_modules/.aspect_rules_js/[email protected]/node_modules/google-protobuf/google-protobuf.js:395:405)
    at Function.deserialize (/root/bazel/762abfc380be15f4878bfa091fdda4af/execroot/web/bazel-out/k8-opt-exec-2B5CBBC6-ST-887e3c1d132f/bin/external/npm_typescript/tsc_worker.sh.runfiles/npm_typescript/node_modules/.aspect_rules_js/@[email protected]/node_modules/@bazel/worker/src/worker_protocol.js:70:53)
    at /root/bazel/762abfc380be15f4878bfa091fdda4af/execroot/web/bazel-out/k8-opt-exec-2B5CBBC6-ST-887e3c1d132f/bin/external/npm_typescript/tsc_worker.sh.runfiles/npm_typescript/node_modules/.aspect_rules_js/@[email protected]/node_modules/@bazel/worker/src/worker_protocol.js:181:127
    at jspb.BinaryReader.readMessage (/root/bazel/762abfc380be15f4878bfa091fdda4af/execroot/web/bazel-out/k8-opt-exec-2B5CBBC6-ST-887e3c1d132f/bin/external/npm_typescript/tsc_worker.sh.runfiles/npm_typescript/node_modules/.aspect_rules_js/[email protected]/node_modules/google-protobuf/google-protobuf.js:385:329)
    at Function.deserialize (/root/bazel/762abfc380be15f4878bfa091fdda4af/execroot/web/bazel-out/k8-opt-exec-2B5CBBC6-ST-887e3c1d132f/bin/external/npm_typescript/tsc_worker.sh.runfiles/npm_typescript/node_modules/.aspect_rules_js/@[email protected]/node_modules/@bazel/worker/src/worker_protocol.js:181:36)
    at Object.<anonymous> (/root/bazel/762abfc380be15f4878bfa091fdda4af/execroot/web/bazel-out/k8-opt-exec-2B5CBBC6-ST-887e3c1d132f/bin/external/npm_typescript/tsc_worker.sh.runfiles/npm_typescript/node_modules/.aspect_rules_js/@[email protected]/node_modules/@bazel/worker/src/worker.js:96:73)
    at Generator.next (<anonymous>) {
  reportErrorToServer: true,
  messagePattern: 'Failure: Invalid byte length!'
}
---8<---8<--- End of log snippet, 1555 chars omitted ---8<---8<---

Version

Development (host) and target OS/architectures:

Ubuntu, amd 64

Output of bazel --version:

c07d97b61c35a08460cb7c2ebf7851bc68787ad7 (6 pre from a few weeks ago - unsure of the version number)

Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file:

rules_ts-1.0.0-rc5

Language(s) and/or frameworks involved:

How to reproduce

I don't know yet.

Any other information?

No response

Fund our work

  • [ ] Sponsor our open source work by donating a bug bounty

matthewjh avatar Nov 12 '22 12:11 matthewjh

the stack trace is helpful here but this is the first time I am seeing this. Probably something in bazel worker protocol has changed. I'll investigate

thesayyn avatar Nov 17 '22 06:11 thesayyn

@matthewjh neither i was able to reproduce this or see it happen anywhere else. do you still see this issue happening?

thesayyn avatar Jan 25 '23 13:01 thesayyn

We don't have the resources to maintain the persistent worker code, and we're turning it off by default in 2.0. Closing as infeasible.

alexeagle avatar Aug 18 '23 23:08 alexeagle