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

Fix prerender #5

Merged
merged 14 commits into from
Jun 26, 2023
Merged

Fix prerender #5

merged 14 commits into from
Jun 26, 2023

Conversation

alberto98fx
Copy link

@alberto98fx alberto98fx commented Jun 23, 2023

This PR is an attempt to bring the pre-render to a semi stable state where we get no more 504

@alberto98fx
Copy link
Author

For some reasons our code is not able to spawn chromium at startup so I had to make it a child process, the code is async that means chromium might take a while to be ready but prerender will keep retrying to connect.

@alberto98fx alberto98fx reopened this Jun 23, 2023
@alberto98fx
Copy link
Author

The setTimeout is commented out because of this error:

/home/node/node_modules/ws/lib/WebSocket.js:359
      if (cb) cb(new Error('not opened'));
                 ^

Error: not opened
    at WebSocket.send (/home/node/node_modules/ws/lib/WebSocket.js:359:18)
    at Chrome.enqueueCommand (/home/node/node_modules/chrome-remote-interface/lib/chrome.js:130:16)
    at /home/node/node_modules/chrome-remote-interface/lib/chrome.js:88:28
    at new Promise (<anonymous>)
    at Chrome.send (/home/node/node_modules/chrome-remote-interface/lib/chrome.js:87:16)
    at Object.handler [as continueInterceptedRequest] (/home/node/node_modules/chrome-remote-interface/lib/api.js:32:23)
    at Chrome.<anonymous> (/home/node/lib/plugins/blockResources.js:62:30)
    at Chrome.emit (node:events:513:28)
    at Chrome.handleMessage (/home/node/node_modules/chrome-remote-interface/lib/chrome.js:311:16)
    at WebSocket.<anonymous> (/home/node/node_modules/chrome-remote-interface/lib/chrome.js:274:27)```

@alberto98fx alberto98fx reopened this Jun 23, 2023
@alberto98fx alberto98fx merged commit a12bd2e into master Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants