React App failed to load and displayed "Aw Snap!" in chrome browser without console error

Viewed 1797

Note: You can download the whole project here. It's basically a practice project following the youtube tutorial from JSMastery here.

Symptoms

  1. It crahsed in chrome browser
  2. It also crashed like this in Microsoft Edge.
  3. I used another profile in chrome, and it resulted the same.
  4. No apprant compile errors.
  5. It was working fine before the holiday, and during holiday I haven't launched it once, when I am back it just failed.
  6. It also crashed in Firefox Browser.

By the way, chrome is up to date: Chrome version

ReactApp

Possible causes of this problem:

  1. I installed league of legends in System drive (I know it doesn't matter, but just in case)
  2. I reinstalled my nodeJS from F disk into C disk, which is the system drive. I did this because when I first launched my ReactApp today, it cannont even use npm since it cannont find the "main" entry. (I don't understand that error so I reinstalled it instead.)
  3. BIOS system started warning me that my hard drive is failing, asking me to press f1 to resume everytime I restart my computer.

I ran my app in vs code, here's what that console in vs code looks like: enter image description here

3 Answers

From documentation:

Fix "Aw, Snap!" page crashes and other page loading errors If you're getting the "Aw, Snap" error or another error code instead of a webpage, Chrome is having problems loading. You might also see the page loading slowly or not opening at all.

Page loading error codes and issues To fix an error, try the fixes below.

Computer AndroidiPhone & iPad Reload the page Usually, you can reload the page to fix the error.

At the top left, click Reload Reload.

If that didn't work... Step 1: Check your internet connection Make sure your computer's connected to Wi-Fi or a wired network.

Try reloading the tab with the error.

Step 2: Clear your cache Chrome might have information stored that's stopping the page from loading.

Open the page in an Incognito window On your computer, open Chrome. At the top right, click More More and then New Incognito window. In the Incognito window, try opening the page. If it opens, clear your cache and cookies. Clear your cache and cookies At the top right, click More More and then More tools and then Clear browsing data. Next to "Time range," select All time. Select Cached images and files and Cookies and other site data. Deselect the other types of data. Click Clear data. Try reloading the tab with the error. Step 3: Close other tabs, extensions, & apps Your device may have run out of memory, and can't load the site while also running your apps, extensions, and programs.

Free up memory: Close every tab except for the one that’s showing the error message. Quit other apps or programs that are running, and pause any app or file downloads. Uninstall unnecessary extensions from Chrome. At the top right, click More More and then More tools and then Extensions. On extensions you don't use, click Remove. Try reloading the tab with the error. Still not working? Step 4: Restart your computer Step 5: Update Chrome Step 6: Check for unwanted software

This was happening to me and ended up being caused by a syntax error in one of my components

An answer for anyone who came up here because was looking for an answer to the question "Why am I getting Aw, snap error in my React app?".

Just a small hint - in my case it was happening because in my custom component I have used a function that was accidentally generating infinite loop :)

So yes, it was a memory problem. Above is just a hint what you can look for in your code.

Related