Mailpit is not starting and has to be ‘installed’ every other time. If the links becomes available it is not clickable and the console shows the following error:
app.js:288 Uncaught (in promise) TypeError: Cannot read properties of null (reading ‘ports’)
at f. (app.js:288:207083)
at Generator.next ()
at o (app.js:288:206440)
and
client.js:446 WebSocket connection to ‘ws://127.0.0.1:4000/graphql’ failed: Error during WebSocket handshake: Sent non-empty ‘Sec-WebSocket-Protocol’ header but no response was received
Summarize the issue in one to two sentences.
Steps to reproduce
As precisely as you can, list the steps it takes to reliably reproduce the issue.
Environment Info
Describe your environment.
What Operating System are you using?
OSX
What versions of site software (Nginx, Apache, PHP, MySQL) is used?
NginX
What version of Local is installed?
8.3.2 +66xx
Supporting info
Please provide your Local Log. See this Community Forum post for instructions on how to do so:
If you haven’t restarted Local since upgrading, it would be worth doing that — Local should copy the mailpit binary when it first starts to prevent that installation warning.
If you’ve already tried that, does this happen for newly-created sites, or just existing ones?
If it’s just existing ones, please can you share your sites.json file? On macOS you’ll find it at ~/Library/Application\ Support/Local/.
Hi Nick,
thanks for following up. First to answer you previous question: It does not work 100% of the time, but only shows it clickable 50% of the time. Clicking on the link (when it does show as clickable) however does not result in a new window or any action.
This holds true for ALL sites even though it shows it ‘installed’ (aka clickable). One site (I believe now called ‘client1’) this appears all of the time.
I hopefully properly sanitized the json file (I only changed client names and my username in the URL). And attached that below as well.
Thanks for sharing your sites.json, @sebastian. It looks correct to me.
One thing you can try is to force Local to recopy the mailpit binary on startup (steps below assume macOS, Windows users reading this should follow these instructions instead).
Stop any running sites.
Quit Local.
Open the Finder and choose Go → Go To Folder…
Enter ~/Library/Application Support/Local/lightning-services and press Enter.
Delete the folder named ‘mailpit-1.12.1+0’, but leave the Finder window open.
Make sure any antivirus or security software is either disabled or allows Local to run unrestricted. (This is rarer on Mac than on Windows, but mentioning it just in case.)
Start Local.
Local should recreate the folder named ‘mailpit-1.12.1+0’ which should be visible in the Finder window you left open. The contents of the mailpit folder should look like this:
├── bin
│ └── darwin
│ └── mailpit
├── lib
│ ├── MailpitService.js
│ └── main.js
└── package.json
If Local does not recreate the folder as described, or if you still see “missing mailpit” when starting Local, please share your Local logs so that we can investigate further.
Hi @nickc
thanks for the reply and I can report back that did the trick! Mailpit reinstalled (as you outlined) and now the error messages is gone. I can also launch mailpit when clicking the link.
Thanks for the help