# Instant Reload detecting changes, but console error happens and no reload

**URL:** <https://community.localwp.com/t/instant-reload-detecting-changes-but-console-error-happens-and-no-reload/49188>\
**Category:** Support\
**Created:** [March 25, 2025, 6:38am UTC](https://community.localwp.com/t/instant-reload-detecting-changes-but-console-error-happens-and-no-reload/49188 "2025-03-25T06:38:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![redblue](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/redblue/32/165_2.png) [@redblue](https://community.localwp.com/u/redblue)\
**Post date:** [March 25, 2025, 6:38am UTC](https://community.localwp.com/t/instant-reload-detecting-changes-but-console-error-happens-and-no-reload/49188/1 "2025-03-25T06:38:59Z")

</div>

### What issue or error are you experiencing?

Instant Reload is detecting changes, but this error happens in the console and the page doesn’t reload. I get the same behavior with a brand new site running a default theme, whether I’m compiling css or editing a vanilla css file (style.css in twentytwenty, for example).

I also get the behavior in local router mode. I’m loading over http. I get the same error with apache or nginx, with Xdebug on or off.

Here’s the error:

## browser-sync-client.js?v=2.26.9:9 Uncaught TypeError: Cannot read properties of null (reading ‘indexOf’) at e.splitUrl (browser-sync-client.js?v=2.26.9:9:27645) at e.pathFromUrl (browser-sync-client.js?v=2.26.9:9:27829) at browser-sync-client.js?v=2.26.9:18:24553 at browser-sync-client.js?v=2.26.9:9:28120 at Array.forEach () at e.pickBestMatch (browser-sync-client.js?v=2.26.9:9:28067) at x (browser-sync-client.js?v=2.26.9:18:24513) at browser-sync-client.js?v=2.26.9:18:21265 at e.project (browser-sync-client.js?v=2.26.9:16:46445) at e.\_tryNext (browser-sync-client.js?v=2.26.9:9:19341)

I should note: I _always_ have gotten an error when instant reload loads, but it’s worked before while this other error was present:

browser-sync-client.js?v=2.26.9:18 WebSocket connection to ‘ws://biolime-2025.local/browser-sync/socket.io/?EIO=3&transport=websocket&sid=PRXpqlEiVmK7iihIAAAA’ failed:

### What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

* * *

### System Details

- **Local Version:**  
Version 9.2.3+6776

- **Operating System (OS) and OS version:**  
MacOS 15.3.1 (24D70)

* * *

### Local Logs

Attach your Local Logs here ([Help Doc - Retrieving Local’s Log](https://localwp.com/help-docs/troubleshooting/retrieving-locals-log-file/))

I have a lot of logs, maybe 20 files, but can’t tell what’s recent and what’s not.

 ![Screenshot 2025-03-25 at 1.38.17 AM](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/3/3/333f9cfe8ad536e6e186cb287422e8875292a68a.jpeg)

* * *

_ **Security Reminder** _  
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

---

<div class="post-metadata">

**Author:** ![nickc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nickc/32/21209_2.png) [@nickc](https://community.localwp.com/u/nickc)\
**Post date:** [March 25, 2025, 7:57am UTC](https://community.localwp.com/t/instant-reload-detecting-changes-but-console-error-happens-and-no-reload/49188/2 "2025-03-25T07:57:23Z")

</div>

Hi, @redblue! Thanks for the report.

I couldn’t reproduce this with macOS 15, Local 9.2.3 and Instant Reload 1.1.4. Are you running the latest version of Instant Reload (currently 1.1.4)?

If so, and if you’re not running any security software or network filters that could be blocking the connection (like Little Snitch or similar) please could you share your logs? `local-lightning-verbose0.log` is the latest.

---

<div class="post-metadata">

**Author:** ![redblue](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/redblue/32/165_2.png) [@redblue](https://community.localwp.com/u/redblue)\
**Post date:** [March 25, 2025, 1:20pm UTC](https://community.localwp.com/t/instant-reload-detecting-changes-but-console-error-happens-and-no-reload/49188/3 "2025-03-25T13:20:20Z")

</div>

Here’s the log!  
[local-lightning-verbose0.log](https://community.localwp.com/uploads/short-url/lbytCVJBUZqkYN6Vbjhsj2l1WCM.log) (947.7 KB)

Not running any network software to my knowledge, and Instant Reload is 1.1.4.

I do think that something’s changed in the recent past – and it could be something else on my computer, as it doesn’t look like IR has updated all that recently.

I should also mention that I’ve tried it in a number of browsers after it wasn’t working in Chrome, but seeing the same error in those as well.

---

<div class="post-metadata">

**Author:** ![nickc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nickc/32/21209_2.png) [@nickc](https://community.localwp.com/u/nickc)\
**Post date:** [March 25, 2025, 3:36pm UTC](https://community.localwp.com/t/instant-reload-detecting-changes-but-console-error-happens-and-no-reload/49188/4 "2025-03-25T15:36:53Z")

</div>

Thanks for the logs, @redblue!

I don’t see anything there that would cause Instant Reload to fail with the connection error you saw.

I did find this post in the browser-sync repo that matches your error, though: [Uncaught TypeError: Cannot read property 'indexOf' of null · Issue #1504 · BrowserSync/browser-sync · GitHub](https://github.com/BrowserSync/browser-sync/issues/1504#issuecomment-565851835)

It suggests that invalid HTML markup could cause the issue:

> I had the same error. Only by debugging I found, that having empty “link” tag is crashing browsersync:
> 
> `<link rel="stylesheet">`

One user notes that browser extensions like Dark Mode can inject invalid HTML content in a page that would otherwise run fine. I know you’ve tried a fresh site and multiple browsers, but sharing in case this is helpful to you. You could perhaps try:

- Opening the site in an incognito/private browser window (which normally doesn’t use extensions unless you’ve explicitly allowed them).
- Validating the page’s HTML in case an active theme/plugin is outputting invalid markup.

All my tests running locally work fine, suggesting it could be browser configuration or environment -specific.

---

<div class="post-metadata">

**Author:** ![redblue](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/redblue/32/165_2.png) [@redblue](https://community.localwp.com/u/redblue)\
**Post date:** [March 25, 2025, 9:16pm UTC](https://community.localwp.com/t/instant-reload-detecting-changes-but-console-error-happens-and-no-reload/49188/5 "2025-03-25T21:16:06Z")

</div>

That’s interesting. ChatGPT also suggested that a global node.js installation of a different version than a bundled one might crash it. Is that remotely plausible?

I’ll look into the invalid markup thing – though I’d think that trying the combination of different browsers on a blank site with no plugins probably would have caught that one.

---

<div class="post-metadata">

**Author:** ![redblue](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/redblue/32/165_2.png) [@redblue](https://community.localwp.com/u/redblue)\
**Post date:** [March 25, 2025, 9:20pm UTC](https://community.localwp.com/t/instant-reload-detecting-changes-but-console-error-happens-and-no-reload/49188/6 "2025-03-25T21:20:19Z")

</div>

OH MY GOODNESS. I looked manually through my code and it was the dark mode extension. I have no idea how this could have broken things in other browsers (maybe I had chrome open at the same time?). Probably it was also enabled in incognito.

Dark mode extension inserts two stylesheets without href parameters.

THANK YOU SO MUCH!!! It’s been driving me nuts and slowing everything down for a couple of weeks now.

---

<div class="post-metadata">

**Author:** ![nickc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nickc/32/21209_2.png) [@nickc](https://community.localwp.com/u/nickc)\
**Post date:** [March 26, 2025, 7:06am UTC](https://community.localwp.com/t/instant-reload-detecting-changes-but-console-error-happens-and-no-reload/49188/7 "2025-03-26T07:06:23Z")

</div>

Glad you figured it out, @redblue! Thank you for persevering and letting us know.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [March 27, 2025, 7:06pm UTC](https://community.localwp.com/t/instant-reload-detecting-changes-but-console-error-happens-and-no-reload/49188/8 "2025-03-27T19:06:47Z")

</div>

Closed on March 27, 2025, 7:06pm UTC

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
