question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Synthesis failed for nodejs-pubsub

See original GitHub issue

Hello! Autosynth couldn’t regenerate nodejs-pubsub. 💔

Here’s the output from running synth.py:

..

> @google-cloud/pubsub@2.3.0 compile /home/kbuilder/.cache/synthtool/nodejs-pubsub
> tsc -p . && cp -r protos build/

node_modules/google-gax/build/src/fallback.d.ts:119:10 - error TS1005: 'from' expected.

119 export * as protobufMinimal from 'protobufjs/minimal';
             ~~

node_modules/google-gax/build/src/fallback.d.ts:119:10 - error TS1141: String literal expected.

119 export * as protobufMinimal from 'protobufjs/minimal';
             ~~

node_modules/google-gax/build/src/fallback.d.ts:119:13 - error TS1005: ';' expected.

119 export * as protobufMinimal from 'protobufjs/minimal';
                ~~~~~~~~~~~~~~~

node_modules/google-gax/build/src/fallback.d.ts:119:13 - error TS2304: Cannot find name 'protobufMinimal'.

119 export * as protobufMinimal from 'protobufjs/minimal';
                ~~~~~~~~~~~~~~~

node_modules/google-gax/build/src/fallback.d.ts:119:29 - error TS1005: ';' expected.

119 export * as protobufMinimal from 'protobufjs/minimal';
                                ~~~~

node_modules/google-gax/build/src/fallback.d.ts:119:29 - error TS2304: Cannot find name 'from'.

119 export * as protobufMinimal from 'protobufjs/minimal';
                                ~~~~

node_modules/google-gax/build/src/fallback.d.ts:119:34 - error TS1005: ';' expected.

119 export * as protobufMinimal from 'protobufjs/minimal';
                                     ~~~~~~~~~~~~~~~~~~~~

node_modules/google-gax/build/src/index.d.ts:47:10 - error TS1005: 'from' expected.

47 export * as protobufMinimal from 'protobufjs/minimal';
            ~~

node_modules/google-gax/build/src/index.d.ts:47:10 - error TS1141: String literal expected.

47 export * as protobufMinimal from 'protobufjs/minimal';
            ~~

node_modules/google-gax/build/src/index.d.ts:47:13 - error TS1005: ';' expected.

47 export * as protobufMinimal from 'protobufjs/minimal';
               ~~~~~~~~~~~~~~~

node_modules/google-gax/build/src/index.d.ts:47:13 - error TS2304: Cannot find name 'protobufMinimal'.

47 export * as protobufMinimal from 'protobufjs/minimal';
               ~~~~~~~~~~~~~~~

node_modules/google-gax/build/src/index.d.ts:47:29 - error TS1005: ';' expected.

47 export * as protobufMinimal from 'protobufjs/minimal';
                               ~~~~

node_modules/google-gax/build/src/index.d.ts:47:29 - error TS2304: Cannot find name 'from'.

47 export * as protobufMinimal from 'protobufjs/minimal';
                               ~~~~

node_modules/google-gax/build/src/index.d.ts:47:34 - error TS1005: ';' expected.

47 export * as protobufMinimal from 'protobufjs/minimal';
                                    ~~~~~~~~~~~~~~~~~~~~


Found 22 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @google-cloud/pubsub@2.3.0 compile: `tsc -p . && cp -r protos build/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @google-cloud/pubsub@2.3.0 compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kbuilder/.npm/_logs/2020-07-30T17_42_45_281Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @google-cloud/pubsub@2.3.0 prepare: `npm run compile-protos && npm run compile`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @google-cloud/pubsub@2.3.0 prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kbuilder/.npm/_logs/2020-07-30T17_42_45_304Z-debug.log
2020-07-30 10:42:45,320 synthtool [ERROR] > Failed executing npm install:

None
ERROR:synthtool:Failed executing npm install:

None
2020-07-30 10:42:45,339 synthtool [DEBUG] > Wrote metadata to synth.metadata.
DEBUG:synthtool:Wrote metadata to synth.metadata.
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/nodejs-pubsub/synth.py", line 25, in <module>
    node.postprocess_gapic_library()
  File "/tmpfs/src/github/synthtool/synthtool/languages/node.py", line 193, in postprocess_gapic_library
    install(hide_output=hide_output)
  File "/tmpfs/src/github/synthtool/synthtool/languages/node.py", line 167, in install
    shell.run(["npm", "install"], hide_output=hide_output)
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
    raise exc
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
    encoding="utf-8",
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['npm', 'install']' returned non-zero exit status 1.
2020-07-30 10:42:45,381 autosynth [ERROR] > Synthesis failed
2020-07-30 10:42:45,381 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 901b355 chore(node): fix kokoro build path for cloud-rad (#1073)
2020-07-30 10:42:45,405 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-07-30 10:42:45,425 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Removing node_modules/
Traceback (most recent call last):
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 367, in synthesize_loop
    synthesize_inner_loop(fork, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 657, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 506, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 637, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 375, in synthesize_loop
    synthesize_loop_single_pr(toolbox, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 401, in synthesize_loop_single_pr
    synthesize_inner_loop(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
alanchrtcommented, Aug 6, 2020

This is from the latest minor version of google-gax. I was able to resolve temporarily on my end for now by always resolving to google-gax@2.6.3.

  "resolutions": {
    "@google-cloud/pubsub/**/google-gax": "2.6.3"
  },

0reactions
yoshi-automationcommented, Aug 7, 2020

Autosynth is still having trouble generating nodejs-pubsub. 😭

Here’s the output from running synth.py:

r:in-event <InotifyEvent: src_path=b'./node_modules/protobufjs/cli/package-lock.json.3080646590', wd=1375, mask=IN_MOVED_FROM, cookie=196422, name=package-lock.json.3080646590>
DEBUG:watchdog.observers.inotify_buffer:in-event <InotifyEvent: src_path=b'./node_modules/protobufjs/cli/package-lock.json', wd=1375, mask=IN_MOVED_TO, cookie=196422, name=package-lock.json>
DEBUG:watchdog.observers.inotify_buffer:in-event <InotifyEvent: src_path=b'./protos/protos.json', wd=5, mask=IN_MODIFY, cookie=0, name=protos.json>
DEBUG:watchdog.observers.inotify_buffer:in-event <InotifyEvent: src_path=b'./protos/protos.js', wd=5, mask=IN_MODIFY, cookie=0, name=protos.js>
DEBUG:watchdog.observers.inotify_buffer:in-event <InotifyEvent: src_path=b'./protos/protos.d.ts', wd=5, mask=IN_MODIFY, cookie=0, name=protos.d.ts>
DEBUG:watchdog.observers.inotify_buffer:in-event <InotifyEvent: src_path=b'./protos/protos.d.ts', wd=5, mask=IN_MODIFY, cookie=0, name=protos.d.ts>
DEBUG:watchdog.observers.inotify_buffer:in-event <InotifyEvent: src_path=b'./protos/protos.d.ts', wd=5, mask=IN_MODIFY, cookie=0, name=protos.d.ts>
DEBUG:watchdog.observers.inotify_buffer:in-event <InotifyEvent: src_path=b'./protos/protos.d.ts', wd=5, mask=IN_MODIFY, cookie=0, name=protos.d.ts>

> @google-cloud/pubsub@2.3.0 precompile /home/kbuilder/.cache/synthtool/nodejs-pubsub
> gts clean

version: 12
Removing build ...

> @google-cloud/pubsub@2.3.0 compile /home/kbuilder/.cache/synthtool/nodejs-pubsub
> tsc -p . && cp -r protos build/

node_modules/google-gax/build/src/fallback.d.ts:119:10 - error TS1005: 'from' expected.

119 export * as protobufMinimal from 'protobufjs/minimal';
             ~~

node_modules/google-gax/build/src/fallback.d.ts:119:10 - error TS1141: String literal expected.

119 export * as protobufMinimal from 'protobufjs/minimal';
             ~~

node_modules/google-gax/build/src/fallback.d.ts:119:13 - error TS1005: ';' expected.

119 export * as protobufMinimal from 'protobufjs/minimal';
                ~~~~~~~~~~~~~~~

node_modules/google-gax/build/src/fallback.d.ts:119:13 - error TS2304: Cannot find name 'protobufMinimal'.

119 export * as protobufMinimal from 'protobufjs/minimal';
                ~~~~~~~~~~~~~~~

node_modules/google-gax/build/src/fallback.d.ts:119:29 - error TS1005: ';' expected.

119 export * as protobufMinimal from 'protobufjs/minimal';
                                ~~~~

node_modules/google-gax/build/src/fallback.d.ts:119:29 - error TS2304: Cannot find name 'from'.

119 export * as protobufMinimal from 'protobufjs/minimal';
                                ~~~~

node_modules/google-gax/build/src/fallback.d.ts:119:34 - error TS1005: ';' expected.

119 export * as protobufMinimal from 'protobufjs/minimal';
                                     ~~~~~~~~~~~~~~~~~~~~

node_modules/google-gax/build/src/index.d.ts:47:10 - error TS1005: 'from' expected.

47 export * as protobufMinimal from 'protobufjs/minimal';
            ~~

node_modules/google-gax/build/src/index.d.ts:47:10 - error TS1141: String literal expected.

47 export * as protobufMinimal from 'protobufjs/minimal';
            ~~

node_modules/google-gax/build/src/index.d.ts:47:13 - error TS1005: ';' expected.

47 export * as protobufMinimal from 'protobufjs/minimal';
               ~~~~~~~~~~~~~~~

node_modules/google-gax/build/src/index.d.ts:47:13 - error TS2304: Cannot find name 'protobufMinimal'.

47 export * as protobufMinimal from 'protobufjs/minimal';
               ~~~~~~~~~~~~~~~

node_modules/google-gax/build/src/index.d.ts:47:29 - error TS1005: ';' expected.

47 export * as protobufMinimal from 'protobufjs/minimal';
                               ~~~~

node_modules/google-gax/build/src/index.d.ts:47:29 - error TS2304: Cannot find name 'from'.

47 export * as protobufMinimal from 'protobufjs/minimal';
                               ~~~~

node_modules/google-gax/build/src/index.d.ts:47:34 - error TS1005: ';' expected.

47 export * as protobufMinimal from 'protobufjs/minimal';
                                    ~~~~~~~~~~~~~~~~~~~~


Found 22 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @google-cloud/pubsub@2.3.0 compile: `tsc -p . && cp -r protos build/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @google-cloud/pubsub@2.3.0 compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kbuilder/.npm/_logs/2020-08-07T12_49_51_467Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @google-cloud/pubsub@2.3.0 prepare: `npm run compile-protos && npm run compile`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @google-cloud/pubsub@2.3.0 prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/kbuilder/.npm/_logs/2020-08-07T12_49_51_536Z-debug.log
2020-08-07 05:49:51,565 synthtool [ERROR] > Failed executing npm install:

None
ERROR:synthtool:Failed executing npm install:

None
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/nodejs-pubsub/synth.py", line 25, in <module>
    node.postprocess_gapic_library()
  File "/tmpfs/src/github/synthtool/synthtool/languages/node.py", line 193, in postprocess_gapic_library
    install(hide_output=hide_output)
  File "/tmpfs/src/github/synthtool/synthtool/languages/node.py", line 167, in install
    shell.run(["npm", "install"], hide_output=hide_output)
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 39, in run
    raise exc
  File "/tmpfs/src/github/synthtool/synthtool/shell.py", line 33, in run
    encoding="utf-8",
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['npm', 'install']' returned non-zero exit status 1.
2020-08-07 05:49:51,638 autosynth [ERROR] > Synthesis failed
2020-08-07 05:49:51,639 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at 901b355 chore(node): fix kokoro build path for cloud-rad (#1073)
2020-08-07 05:49:51,663 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-08-07 05:49:51,683 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Removing node_modules/
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 690, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 539, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 670, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 375, in synthesize_loop
    has_changes = toolbox.synthesize_version_in_new_branch(synthesizer, youngest)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 273, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Synthesis failed for nodejs-pubsub · Issue #919 · googleapis/nodejs ...
Hello! Autosynth couldn't regenerate nodejs-pubsub. Here's the output from running synth.py: Cloning into 'working_repo'... Switched to a new branch ...
Read more >
Google Cloud Pub/Sub: Node.js Client
Cloud Pub/Sub is a fully-managed real-time messaging service that allows you to send and receive messages between independent applications.
Read more >
Firebase Pubsub Schedule cant be deployed - Stack Overflow
I too just received this error. I think from the message it is either one of two options. You're internet connection dropped at...
Read more >
Internal Error Handling | Pub/Sub Node.js Framework
To handle any internal error that might occur on pubsub side, a the method handleError can be declared either in Subscriber Object or...
Read more >
Pull subscriptions | Cloud Pub/Sub Documentation | Google Cloud
C++ C# Go Java Node.js Python Ruby Lisää. Before trying this sample, follow the C++ setup instructions in Quickstart: Using Client Libraries.
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