ninjasa
September 17, 2026, 9:31am
1
Invoice Ninja v5.13.40, self hosted
I was busy setting up emails settings on a new install via the settings/ emails settings page and then the page seem to bug out and when I try and go in to that page it gives a blank screen, tried on different browsers. The strange thing is that it was opening up ok on the iPad at a different location, could it be blocking the page or be a cache thing, IP blocking? I can access other sections no problem just not the emails settings section. Also I have not entered any email details in the env. file yet?
Ran the following commands which did not help
php artisan cache:clear
php artisan view:clear
php artisan config:clear
php artisan optimize:clear
hillel
September 17, 2026, 9:37am
2
Hi,
I believe the issue is being tracked here:
opened 03:29AM - 17 Sep 26 UTC
closed 03:35AM - 17 Sep 26 UTC
duplicate
### Invoice Ninja version
Invoice Ninja: 5.13.40
### Environment
Docker
### … Interface
React
### Can you reproduce the issue on one of our demo sites?
Not applicable
### Pre-flight checks
- [x] I have reviewed the troubleshooting documentation.
- [x] I have searched existing issues for duplicates.
### Have you reported this issue on Slack or the forum?
No
### Have you inspected the application logs?
Unable to inspect the logs
### Describe the bug
I will preface this by saying that I am NOT a programmer. I used Ai to figure this issue out for me. I'm just dangerous enough to get in trouble messing with this stuff it seems. Anywho, after entering all of the required settings under e-mail settings, I clicked save and the screen went blank. NOTHING at all. Refresh, hard refresh, reboot, etc would not bring the page back when I clicked on it. I used Ai to figure out what is described below was the issue. At present, I have the port set to NULL (per Ai help) and the screen is back up. I hope this helps and hopefully it will get the issue resolved for lots of folks.
Woody
### Version
- Invoice Ninja: 5.13.40
- Environment: Self-hosted Docker
- Database: MariaDB 10.11
- Web UI: React
- Browser: Firefox
- Access: local LAN URL
### Description
The React Email Settings page turns blank/black after saving SMTP settings.
It worked before configuring SMTP. After saving valid Gmail SMTP settings,
the page crashes every time I open Settings > Email Settings.
Other Invoice Ninja pages continue to work normally.
### Steps to reproduce
1. Install Invoice Ninja 5.13.40 using Docker.
2. Open Settings > Email Settings.
3. Select SMTP.
4. Enter SMTP settings, for example:
- Host: smtp.gmail.com
- Port: 587
- Encryption: tls
- Username: Gmail address
- Password: Google App Password
5. Save.
6. Open Settings > Email Settings again.
### Actual result
The Email Settings page becomes blank/black.
Browser console reports:
```text
TypeError: (intermediate value).trim is not a function
```
### Expected result
Email Settings should render normally after saving SMTP settings.
### Evidence / suspected cause
The minified React bundle contains:
```javascript
lj = e => (e || '').trim()
```
The SMTP validation path calls:
```javascript
lj(e.smtp_host)
lj(e.smtp_port)
lj(e.smtp_username)
lj(e.smtp_password)
```
The database schema defines `companies.smtp_port` as:
```text
int unsigned
```
The saved database value is:
```text
smtp_port = 587
```
Therefore the UI appears to execute the equivalent of:
```javascript
(587 || '').trim()
```
which throws because `587` is a number, not a string.
Suggested correction: coerce values before trimming, for example:
```javascript
const clean = value => String(value ?? '').trim();
```
or validate `smtp_port` as a numeric field rather than calling `.trim()` on it.
### Additional diagnostics
- Docker application, web, scheduler, and MariaDB containers are healthy.
- Backend requests return HTTP 200 when the page crashes.
- No Laravel/PHP/SQL errors appear in application logs.
- Saved SMTP fields are structurally valid:
- smtp_host: smtp.gmail.com
- smtp_port: 587
- smtp_encryption: tls
- smtp_username: set
- smtp_password: set
- smtp_verify_peer: 1
- Relevant Email Settings and template JSON fields are stored with correct JSON types.
- Browser cache reset, hard refresh, private window, and retrying in a new session did not resolve it.
### Workaround
Setting `companies.smtp_port` to NULL has prevented the `.trim()` crash, but it leaves SMTP unusable because the required port is empty.
### Steps to reproduce
### Steps to reproduce
1. Install Invoice Ninja 5.13.40 using Docker.
2. Open Settings > Email Settings.
3. Select SMTP.
4. Enter SMTP settings, for example:
- Host: smtp.gmail.com
- Port: 587
- Encryption: tls
- Username: Gmail address
- Password: Google App Password
5. Save.
6. Open Settings > Email Settings again.
### Expected behavior
### Expected result
Email Settings should render normally after saving SMTP settings.
### Additional context
_No response_
### Screenshots or screen recordings
_No response_
### Relevant log output
```shell
```
ninjasa
September 17, 2026, 9:52am
3
hillel
September 17, 2026, 10:11am
4
The fix should be included in the next version of the React web app.
ninjasa
September 17, 2026, 10:18am
5
Any Idea when that would be, is there a work around for now?
hillel
September 17, 2026, 10:25am
6
It should be available within a few days. You can access the settings in the desktop/mobile app: Mobile & Desktop Apps - Invoice Ninja