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

Pupeteer not work after upgrade to v1.1 #1103

Closed
huan opened this issue Feb 20, 2018 · 2 comments
Closed

Pupeteer not work after upgrade to v1.1 #1103

huan opened this issue Feb 20, 2018 · 2 comments
Labels

Comments

@huan
Copy link
Member

huan commented Feb 20, 2018

puppeteer v0.13 work without any problem.

with https://github.com/GoogleChrome/puppeteer/releases/tag/v1.1.0, readyAngular will hang because window.angular always be undefined.

# PuppetWebBridge
03:11:59 ERR PuppetWebBridge init() initPage() onLoad() exception: Error: waiting failed: timeout 30000ms exceeded
(node:32211) UnhandledPromiseRejectionWarning: Error: waiting failed: timeout 30000ms exceeded
    at Timeout.WaitTask._timeoutTimer.setTimeout (/home/zixia/chatie/wechaty/node_modules/puppeteer/lib/FrameManager.js:789:58)
    at ontimeout (timers.js:458:11)
    at tryOnTimeout (timers.js:296:5)
    at Timer.listOnTimeout (timers.js:259:5)
(node:32211) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:32211) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@Jiangmx
Copy link

Jiangmx commented Feb 24, 2018

After downgrade and upgrade puppeteer a few times,I got an error of Chromium revision is not downloaded.

My solution is

  1. download app from https://storage.googleapis.com/chromium-browser-snapshots/Mac/526987/chrome-mac.zip 526987 is the chrome version your puppeteer need .Other OS https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html
  2. move the app file into {home}/node_modules/puppeteer/.local-chromium/mac-526987/chrome-mac

rules:

const downloadURLs = {
  linux: '%s/chromium-browser-snapshots/Linux_x64/%d/chrome-linux.zip',
  mac: '%s/chromium-browser-snapshots/Mac/%d/chrome-mac.zip',
  win32: '%s/chromium-browser-snapshots/Win/%d/chrome-win32.zip',
  win64: '%s/chromium-browser-snapshots/Win_x64/%d/chrome-win32.zip',
};
revisionInfo(revision) {
    const folderPath = this._getFolderPath(revision);
    let executablePath = '';
    if (this._platform === 'mac')
      executablePath = path.join(folderPath, 'chrome-mac', 'Chromium.app', 'Contents', 'MacOS', 'Chromium');
    else if (this._platform === 'linux')
      executablePath = path.join(folderPath, 'chrome-linux', 'chrome');
    else if (this._platform === 'win32' || this._platform === 'win64')
      executablePath = path.join(folderPath, 'chrome-win32', 'chrome.exe');
    else
      throw 'Unsupported platform: ' + this._platform;
    let url = downloadURLs[this._platform];
    url = util.format(url, this._downloadHost, revision);
    const local = fs.existsSync(folderPath);
    return {revision, executablePath, folderPath, local, url};
  }

@huan
Copy link
Member Author

huan commented Mar 12, 2018

v1.1.1 passed CI

@huan huan closed this as completed Mar 12, 2018
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

2 participants