"Aw, snap!" messages on any action in Google Chrome on macOS

I've started Chrome with --enable-logging --v=1 and these two errors occur on every "Aw, snap!":

2017-02-04 18:36:19.660 Google Chrome Helper[12718:237106] Couldn't set selectedTextBackgroundColor from default ()
[11128:41731:0204/183653.850096:ERROR:upload_data_presenter.cc(77)] Not implemented reached in virtual void extensions::RawDataPresenter::FeedNext(const net::UploadElementReader &)

This message occurs in following scenarios:

  • when opening a new tab
  • when loading a new page
  • when I open Chrome and it loads previously closed pages
  • when I open Chrome settings

I have also noticed that Chrome became somewhat unresponsive:

  • I need to click 3 times on the inspect button to open the dev tools
  • Sometimes I need to press enter multiple times to go to the website, when the website address is already typed in
  • Press multiple times on bookmarked page in order to proceed to the page

What has been done already:

  • cleared cache from the beginning of time
  • disabled all extensions
  • reinstalled Chrome
  • updated Chrome
  • tried different networks
  • unchecked Use hardware acceleration when available

I'm running on macOS Sierra 10.12.3 with Google Chrome v. 56.0.2924.87 (64-bit). I don't have any problems with my MBA keyboard - works flawless in all other applications.


UPDATE:

As suggested in comments I have logged out of my Google account in Chrome, restarted my MBA and logged in again. I didn't use "vanilla" account and I did not tweak any additional settings. For now everything seems to be working fine, but I am not sure what exactly have solved the issue.


Is there something else I can do to fix this issue?


Considering the crash start happening on any action and that restart of macOS somehow helped, most likely you've reached the limit of maximum files allowed to open in the system. It's known issue and likely it won't be fixed anytime soon as "Chrome can't really do anything about it".

To verify that, run the following sysctl command:

sysctl -a | grep files

and compare kern.num_files with the limit of kern.maxfiles.

If the number is near to the limit, that definitely could be the cause.

To check why you've so many files opened, analyse the output of sudo lsof and find the application causing the issue.

If you believe everything is in reasonable state, to fix the problem, run the following commands:

launchctl limit maxfiles 65536 unlimited
sysctl -w kern.maxfiles=20480
ulimit -c unlimited

To make the changes permanent, you need to add it to some global startup scripts (such as /etc/rc.local).

Related: How to determine what is causing Chrome to show the "Aw, Snap" dialogue.