"There has been an error processing your request" is the message you can receive when working with Magento 2. Here is the example of this message:
What are the most common reasons for "There has been an error processing your request" message to appear?
- Installation of the new Magento 2 theme or extension.
- Updating Magento 2 or Magento 2 extension.
- Changes in the template code.
- Setting configuration.
- Overloading of the server memory.
So, if any of the above-mentioned points are due you will see the default Magento error message "There has been an error processing your request". After that exception printing is disabled by default for security reasons.
How to fix the "There has been an error processing your request" issue in Magento 2?
Though you see this message you don't know what error is there to be fixed. So in order to find out the source of the problem and fix the "There has been an error processing your request" issue take the following steps:
- Connect to your Magento 2 server via SSH or FTP.
- Navigate to the var/report folder where all Magento 2 error reports are stored.
- Open a file maned the same as the "Error log record number". On the screenshot about it is "dbf06a3ee1921fad851b368c0b...". So you need to open the file var/report/dbf06a3ee1921fad851b368c0b... .
Note: In your case the log report number is different, and can be sorted.
- Check the Log File Content. It contains the full error message and detailed information about where it happened (error backtrace).
Once you have the information from the log file you have an idea of what is going wrong, where it appears, and what needs to be fixed.
Pro Tip: If you are a programmer making development and it could be annoying you to go var/report folder and check it every time the error appears, you can enable the direct error displaying on the screen putting your Magento instance into the developer mode. Run this command to switch Magento into the developer mode:
bin/magento deploy:mode:set developer