Cannot convert undefined or null to object

Bug Summary

When trying to start a site lately I get “Unable to start site” error.
If I Force Quit to restart Local I can then start the site, but then try starting another site and it might happen again. It is also not specific to a singular site

Steps to reproduce

I do not know how someone else to reproduce?

I will say, I am using a M1 Mac Mini and my sites are on an external SSD over Thunderbolt/USB4

Environment Info

Describe your environment.

  • What Operating System are you using? Mac Tahoe 26.3
  • What versions of site software (Nginx, Apache, PHP, MySQL) is used?
  • What version of Local is installed? Version 9.2.9+6887

Supporting info

Screenshot and local log attached

local-lightning.log (70.4 KB)

Hey @jon_stormbox! I requested this in your other post as well but could you share your complete log here for us? It will be under the Support tab in Local, if you scroll down a little you’ll see a Download widget that bundles everything into a zip. Keep us posted and we’d be happy to help further!

Here is the full zip, also in other topic. Figured easier to keep topics seperate rather than mix issues

local-logs.zip (1.5 MB)

Also will add, this setup has been the same for 3 years and this issue has only been the last ~2 months. I raised a ticket around storing temp files on WPE a while back and that update I know was working without issues, so I am hoping it has been triggered by either a OS or Local update

Hey @jon_stormbox!

I’m seeing a lot of errors in your logs referencing potential Port Conflicts:

2026/02/12 16:30:40 [emerg] 3706#0: bind() to [::]:443 failed (48: Address already in use)
2026/02/12 16:30:40 [emerg] 3706#0: still could not bind()
2026/02/12 16:30:43 [emerg] 3711#0: bind() to 0.0.0.0:80 failed (48: Address already in use)
2026/02/12 16:30:43 [emerg] 3711#0: bind() to [::]:80 failed (48: Address already in use)
2026/02/12 16:30:43 [emerg] 3711#0: bind() to 0.0.0.0:443 failed (48: Address already in use)
2026/02/12 16:30:43 [emerg] 3711#0: bind() to [::]:443 failed (48: Address already in use) 
{"class":"Process","level":"warn","message":"2026-02-17T00:09:15.497178Z 0 [ERROR] [MY-010259] [Server] Another process with pid 1737 is using unix socket file.","process":"mysql","thread":"main","timestamp":"2026-02-17T00:09:15.497Z"}
{"class":"Process","level":"warn","message":"2026-02-17T00:09:15.497188Z 0 [ERROR] [MY-010268] [Server] Unable to setup unix socket lock file.","process":"mysql","thread":"main","timestamp":"2026-02-17T00:09:15.497Z"}
{"class":"Process","level":"warn","message":"2026-02-17T00:09:15.497193Z 0 [ERROR] [MY-010119] [Server] Aborting","process":"mysql","thread":"main","timestamp":"2026-02-17T00:09:15.497Z"}
{"level":"info","message":"Database connection attempt 3 over socket","service":"mysql","serviceBinVersion":"8.0.35","thread":"main","timestamp":"2026-02-17T00:09:16.216Z"}
{"error":"Command failed: %%userDataPath%%/lightning-services/mysql-8.0.35+4/bin/darwin-arm64/bin/mysqladmin ping\n\u0007mysqladmin: connect to server at 'localhost' failed\nerror: 'Can't connect to local MySQL server through socket '%%site.runData%%/mysql/mysqld.sock' (61)'\nCheck that mysqld is running and that the socket: '%%site.runData%%/mysql/mysqld.sock' exists!\n","level":"debug","message":"Connection failed over 

Is there anything that could be interfering with Local like another dev application? Would you be able to work in Localhost if you tried changing your Router Mode?

I have double checked and cannot see any dev tools installed in apps, brew services shows

dnsmasq nonephp nonephp@7.4 nonephp@8.0 nonephp@8.1 none

When i run the following commands I can see duplicates nginx PID’s

sudo lsof -i :80
sudo lsof -i :443

:80 returns the following

COMMAND   PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
nginx   74828  jon    5u  IPv4 0x465cbc5ff0ebec9a      0t0  TCP \*:http (LISTEN)
nginx   74828  jon    6u  IPv6 0xf26d743acde1bcc3      0t0  TCP \*:http (LISTEN)
nginx   74830  jon    5u  IPv4 0x465cbc5ff0ebec9a      0t0  TCP \*:http (LISTEN)
nginx   74830  jon    6u  IPv6 0xf26d743acde1bcc3      0t0  TCP \*:http (LISTEN)

:443 returns the following

COMMAND     PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
Gorelo.Rm   793 root  189u  IPv6 0xb5af65525846fa79      0t0  TCP jonsmacmini.localdomain:55024->20.9.155.145:https (ESTABLISHED)
GoreloCon  1497  jon    3u  IPv4 0xb95b658e6ecbabf7      0t0  TCP jonsmacmini.localdomain:55236->172.179.240.232:https (SYN_SENT)
Slack\\x20 29873  jon   23u  IPv4 0xf66bc6e375a56578      0t0  TCP jonsmacmini.localdomain:53442->ec2-54-79-215-244.ap-southeast-2.compute.amazonaws.com:https (ESTABLISHED)
Slack\\x20 29873  jon   26u  IPv4 0x492cdbbe918e5248      0t0  UDP jonsmacmini.localdomain:58804->ec2-54-66-51-231.ap-southeast-2.compute.amazonaws.com:https
Google    30018  jon   26u  IPv4 0xb6a1a6f268242496      0t0  UDP jonsmacmini.localdomain:58085->142.251.153.119:https
Google    30018  jon   29u  IPv4 0x5215b0572a4422de      0t0  UDP jonsmacmini.localdomain:54984->tzsyda-af-in-f14.1e100.net:https
Google    30018  jon   31u  IPv4 0xbac841e7c1836511      0t0  UDP jonsmacmini.localdomain:60558->104.18.32.47:https
Google    30018  jon   32u  IPv4 0xe24bec96f77a0fab      0t0  UDP jonsmacmini.localdomain:51435->104.18.32.47:https
Google    30018  jon   33u  IPv4 0xde74726cd6038f89      0t0  UDP jonsmacmini.localdomain:55982->yb-in-f94.1e100.net:https
Google    30018  jon   34u  IPv4 0xb4e27d922ba035a4      0t0  UDP jonsmacmini.localdomain:60509->lcbomp-in-f92.1e100.net:https
Google    30018  jon   35u  IPv4 0x6e352ccb9c82a8f3      0t0  TCP jonsmacmini.localdomain:55135->184.105.99.43:https (ESTABLISHED)
Google    30018  jon   41u  IPv4 0x113ea7e8d68c8f4f      0t0  TCP jonsmacmini.localdomain:64697->172.64.148.235:https (ESTABLISHED)
Google    30018  jon   60u  IPv4 0xf6b37ec185eb254d      0t0  TCP jonsmacmini.localdomain:50786->ec2-34-246-221-150.eu-west-1.compute.amazonaws.com:https (ESTABLISHED)
Google    30018  jon   94u  IPv4 0x723bbd20856d8929      0t0  TCP jonsmacmini.localdomain:57857->ec2-18-97-36-61.compute-1.amazonaws.com:https (ESTABLISHED)
Code\\x20H 67124  jon   21u  IPv4 0xaceadf193c755840      0t0  TCP jonsmacmini.localdomain:55280->13.67.9.5:https (ESTABLISHED)
nginx     74828  jon    7u  IPv4 0xe11604600de63829      0t0  TCP \*:https (LISTEN)
nginx     74828  jon    8u  IPv6 0x83ecbf871eb5839e      0t0  TCP \*:https (LISTEN)
nginx     74830  jon    7u  IPv4 0xe11604600de63829      0t0  TCP \*:https (LISTEN)
nginx     74830  jon    8u  IPv6 0x83ecbf871eb5839e      0t0  TCP \*:https (LISTEN)

Thank you for your patience here @jon_stormbox

This issue has been tough to nail down. It’s possible that your sites.json has been corrupted, but there might also be something strange happening within the workflow of using the external drive as well. I did some searching and found a similar topic and issue from you back in 2024.

Is that something that you’ve tested again?