Skip to content

"failed stated PuppetWeChatBridge" #78

Closed
@lprintf

Description

@lprintf

Failed to Start PuppetWeChatBridge with the Envirenment X64.

Self-Diagnosis

  • I have reviewed the documentation.
  • I have reviewed the Wiki.
  • I have tried to use the latest version.
  • I have searched the issues for an answer to my question.
  • I have searched the web for an answer to my question.

Environment(for bug reports)

My configuration/Related code

WECHATY_PUPPET=wechaty-puppet-wechat

Steps to Reproduce the Issue

run WECHATY_PUPPET=wechaty-puppet-wechat LOG_LEVEL=silly ts-node bin/matrix-appservice-wechaty.ts --config config/config.yaml --file wechaty-registration.yaml directly in centos7 x64

Current Result (Include screenshots where appropriate.)

23:12:53 VERB PuppetWeChatBridge initBrowser() with options={"args":["--audio-output-channels=0","--disable-default-apps","--disable-translate","--disable-gpu","--disable-setuid-sandbox","--disable-sync","--hide-scrollbars","--mute-audio","--no-sandbox"],"headless":true}
23:12:53 ERR PuppetWeChatBridge start() exception: Error: Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (848005).
23:12:53 SILL StateSwitch <PuppetWeChatBridge> off() is false
23:12:53 VERB StateSwitch <PuppetWeChatBridge> off(true) <- (false)
23:12:53 ERR PuppetWeChat initBridge() exception: Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (848005).
23:12:53 VERB PuppetWeChatBridge stop()
23:12:53 ERR PuppetWeChat initBridge() this.bridge.stop() rejection: Error: no page
23:12:53 ERR PuppetWeChat start() exception: Error
Error: 
    at PuppetWeChat.<anonymous> (/home/ylin/Documents/matrix-appservice-wechaty/node_modules/wechaty/src/wechaty.ts:444:32)
    at PuppetWeChat.emit (events.js:315:20)
    at PuppetWeChat.EventEmitter.emit (domain.js:467:12)
    at PuppetWeChat.start (/home/ylin/Documents/matrix-appservice-wechaty/node_modules/wechaty/node_modules/wechaty-puppet-wechat/src/puppet-wechat.ts:201:12)
    at Wechaty.start (/home/ylin/Documents/matrix-appservice-wechaty/node_modules/wechaty/src/wechaty.ts:726:7)
    at async Promise.all (index 0)
    at Object.run (/home/ylin/Documents/matrix-appservice-wechaty/src/cli/run.ts:57:3)
...

Expected Result

I will propose a pull request after my last pull request haved been deal if appropriate. If it is not appropriate, please stop me and point my faults.

Further explanation:

It seem a bug about puppeteer, and similliar to berstend/puppeteer-extra#471 and
https://stackoverflow.com/questions/53997175/puppeteer-error-chromium-revision-is-not-downloaded.

I have avoid it by install chrome and add some modifications in a commit such as follow:

  if(process.env.SIMULATED){
    // XXX This is aim to use the chrome referred by /usr/bin/chromium-browser as dependency of wechaty.node_modules.puppeteer module.
    Object.defineProperty(process, 'arch', {
      value: process.env.SIMULATED,
    });
  }

I am not familiar with the open source project contribution process. I will propose a pull request after my last pull request haved been deal if appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions