Headful chrome randomly crashing
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: 1.20.0
- Platform / OS version: WSL Ubuntu 16.04
- Node.js version: 10.16.3
Trying executing using the following commands
xvfb-run -a --server-args="-screen 0 1280x800x24 -ac -nolisten tcp -dpi 96 +extension RANDR" node test.js
xvfb-run -a --server-args="-screen 0 1024x1024x24" node test.js
What steps will reproduce the problem? Using non-headless chrome causes the page to randomly crash, I can’t find where the error is.
Code that is being used.
const puppeteer = require('puppeteer');
(async() => {
let browser = await puppeteer.launch({
dumpio: true,
headless: false,
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
]
});
console.log('browser starting');
const page = await browser.newPage();
console.log('browser started');
await page.goto('https://example.com/', {waitUntil:'domcontentloaded'});
console.log('page connected');
await page.waitFor(5000);
await page.screenshot({path: require('path').resolve(__dirname, 'example.png')});
console.log('page saved');
await browser.close();
})();
What is the expected result? Just open an headful chrome, go to example page and take a screenshot
What happens instead? Randomly crashes
Crash dump
[14476:14490:1002/124150.834379:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[14501:14501:1002/124151.142442:ERROR:sandbox_linux.cc(369)] InitializeSandbox() called with multiple threads in process gpu-process.
DevTools listening on ws://127.0.0.1:51716/devtools/browser/e3563569-5abc-43b0-a46f-c1e877393852
[14476:14575:1002/124151.251373:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[14476:14575:1002/124151.269548:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[14476:14575:1002/124151.269592:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[14476:14602:1002/124151.355549:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[14476:14602:1002/124151.355703:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[14476:14602:1002/124151.355850:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[14476:14602:1002/124151.355978:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[14476:14602:1002/124151.356135:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
browser starting
[14598:14609:1002/124151.432279:ERROR:command_buffer_proxy_impl.cc(124)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
[14592:14605:1002/124151.440710:ERROR:command_buffer_proxy_impl.cc(124)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
browser started
page connected
[14592:14592:1002/124152.355046:ERROR:platform_shared_memory_region_posix.cc(53)] Descriptor access mode (0) differs from expected (2)
[14592:14592:1002/124152.355706:FATAL:platform_shared_memory_region_posix.cc(106)] Check failed: CheckPlatformHandlePermissionsCorrespondToMode(handle.get(), mode, size).
#0 0x7ff34a636879 <unknown>
#1 0x7ff34a593c63 <unknown>
#2 0x7ff34a5a8013 <unknown>
#3 0x7ff34a64e04b <unknown>
#4 0x7ff34888b0ae <unknown>
#5 0x7ff34888cb29 <unknown>
#6 0x7ff34889cfa3 <unknown>
#7 0x7ff348885b2f <unknown>
#8 0x7ff34888cd0a <unknown>
#9 0x7ff34a75f421 <unknown>
#10 0x7ff34a74fd09 <unknown>
#11 0x7ff34a7508cd <unknown>
#12 0x7ff34a76635e <unknown>
#13 0x7ff34a5de96f <unknown>
#14 0x7ff34a5ef41c <unknown>
#15 0x7ff34a5ef108 <unknown>
#16 0x7ff34a5abe1a <unknown>
#17 0x7ff34a5efd49 <unknown>
#18 0x7ff34a5c7c27 <unknown>
#19 0x7ff34e9cf6f7 <unknown>
#20 0x7ff34a1d6b2e <unknown>
#21 0x7ff34a1d7d94 <unknown>
#22 0x7ff34a223a8d <unknown>
#23 0x7ff34a1d60b1 <unknown>
#24 0x7ff347fb31bf <unknown>
#25 0x7ff33ed50830 <unknown>
#26 0x7ff347fb302a <unknown>
Task trace:
#0 0x7ff34a766596 <unknown>
Received signal 6
#0 0x7ff34a636879 <unknown>
#1 0x7ff34a593c63 <unknown>
#2 0x7ff34a636401 <unknown>
#3 0x7ff344fe1390 <unknown>
#4 0x7ff33ed65428 <unknown>
#5 0x7ff33ed6702a <unknown>
#6 0x7ff34a635265 <unknown>
#7 0x7ff34a5a8461 <unknown>
#8 0x7ff34a64e04b <unknown>
#9 0x7ff34888b0ae <unknown>
#10 0x7ff34888cb29 <unknown>
#11 0x7ff34889cfa3 <unknown>
#12 0x7ff348885b2f <unknown>
#13 0x7ff34888cd0a <unknown>
#14 0x7ff34a75f421 <unknown>
#15 0x7ff34a74fd09 <unknown>
#16 0x7ff34a7508cd <unknown>
#17 0x7ff34a76635e <unknown>
#18 0x7ff34a5de96f <unknown>
#19 0x7ff34a5ef41c <unknown>
#20 0x7ff34a5ef108 <unknown>
#21 0x7ff34a5abe1a <unknown>
#22 0x7ff34a5efd49 <unknown>
#23 0x7ff34a5c7c27 <unknown>
#24 0x7ff34e9cf6f7 <unknown>
#25 0x7ff34a1d6b2e <unknown>
#26 0x7ff34a1d7d94 <unknown>
#27 0x7ff34a223a8d <unknown>
#28 0x7ff34a1d60b1 <unknown>
#29 0x7ff347fb31bf <unknown>
#30 0x7ff33ed50830 <unknown>
#31 0x7ff347fb302a <unknown>
r8: 0000000000000000 r9: 0000000000000000 r10: 0000000000000008 r11: 0000000000000008
r12: 00007fffe766d6c8 r13: 00007fffe766c688 r14: 00007fffe766c688 r15: 00007fffe766c6a0
di: 0000000000003900 si: 0000000000003900 bp: 00007fffe766c630 bx: 00007ff33f0f5700
dx: 0000000000000006 ax: 0000000000000000 cx: 0000000000000008 sp: 00007fffe766c4f8
ip: 00007ff33ed65428 efl: 0000000000000206 cgf: 00000053002b0033 erf: 0000000000000000
trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.
(node:14465) UnhandledPromiseRejectionWarning: Error: Page crashed!
at Page._onTargetCrashed (/mnt/c/Users/PatriciaPC/Downloads/poop/node_modules/puppeteer/lib/Page.js:215:24)
at CDPSession.Page.client.on.event (/mnt/c/Users/PatriciaPC/Downloads/poop/node_modules/puppeteer/lib/Page.js:123:56)
at CDPSession.emit (events.js:198:13)
at CDPSession._onMessage (/mnt/c/Users/PatriciaPC/Downloads/poop/node_modules/puppeteer/lib/Connection.js:200:12)
at Connection._onMessage (/mnt/c/Users/PatriciaPC/Downloads/poop/node_modules/puppeteer/lib/Connection.js:112:17)
at WebSocketTransport._ws.addEventListener.event (/mnt/c/Users/PatriciaPC/Downloads/poop/node_modules/puppeteer/lib/WebSocketTransport.js:44:24)
at WebSocket.onMessage (/mnt/c/Users/PatriciaPC/Downloads/poop/node_modules/ws/lib/event-target.js:120:16)
at WebSocket.emit (events.js:198:13)
at Receiver.receiverOnMessage (/mnt/c/Users/PatriciaPC/Downloads/poop/node_modules/ws/lib/websocket.js:789:20)
at Receiver.emit (events.js:198:13)
(node:14465) 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:14465) [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.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:16
- Comments:5
Top Results From Across the Web
Troubleshoot Chrome crashes - Google Support
Crashing issues with Chrome or a ChromeOS device can be caused a number of things. Here are some potential issues you might encounter:...
Read more >9 Ways to Get Chrome to Stop Crashing - Nira
Chrome is normally a very stable browser, but sometimes you'll get a frustrating run of crashes. We'll walk you through how to find...
Read more >Why Does Google Chrome Keep Crashing, Freezing, or Not ...
We'll show you fixes for common Chrome crashes, hangs, and freezes so you can get your browser back to a stable state. Google...
Read more >Nick Nolte Head Full of Honey Interview - OtelVip.com is for sale
He applies those memories to the Head Full of Honey role of Amadeus, ... Man who crashed drone on to White House lawn...
Read more >Likely district championship on the line at Abshier Stadium ...
... Nick Nolte Head Full of Honey Interview ... Awesome Amazon Shopping Extensions for Chrome · Random Counting The Screws In NES Cartridges ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Solved my problem by running my node script as sudo
Note: This was no issue in the past for me but started appearing a few weeks ago, now I have the same problem, also with these errors:
EDIT: The following chromium argument fixed it for me:
--single-process