A Magento 2 module which captures JavaScript errors for later review by website administrators. JavaScript errors are kept for up to 90 days and available via Magento's administration back-end.
- JavaScript errors on the front-end are recorded for later review
- JavaScript error message
- File (URL), line number, column number of exception if available
- Stack trace of exception if available
- Limited browser information which might be useful for debugging (but hopefully not for fingerprinting / identifying individual users) is recorded
- Current URL when error occurred
- User agent
- Viewport width & height
- Errors are kept for up to 90 days and automatically deleted after this period
- Errors are available for review in Magento's back-end
- Admin -> Reports -> JavaScript Error Reporting
- Module can be enabled / disabled via configuration
- Admin -> Stores -> Settings -> Configuration -> Advanced -> System -> JavaScript Error Reporting
This module is available on packagist.org and installable via composer:
composer require fredden/magento2-module-javascript-error-reporting
This module uses semantic versioning (semver).
Version | Magento Open Source | Magento Commerce Edition |
---|---|---|
2.0.x | ❌ unsupported | ❌ unsupported |
2.1.x | ❌ unsupported | ❌ unsupported |
2.2.x | ✅ Yes ^0.1 |
✅ Yes ^0.1 |
2.3.x | ✅ Yes ^1.2.2 |
✅ Yes ^1.2.2 |
2.4.x | ✅ Yes ^1.0.1 |
✅ Yes ^1.0.1 |
2.5.x | ❓ unknown | ❓ unknown |
PHP version 7.1 or better is required.
No third-party libraries nor services are required.
Community contributions are welcome. Please open a pull request on GitHub if you have a code suggestion, or an issue on GitHub if you are encountering a problem with this module. Please note that issues relating to the problems that this module highlights in others' code are out of scope for support here.
- Ability to change how long errors are kept for (including option for 'forever')
- Record errors encountered in adminhtml area