# SW 6.6.0.0-rc-2 watch-storefront Probleme

**URL:** <https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880>\
**Category:** Shopware 6 (German)\
**Tags:** programming\
**Created:** [8. Februar 2024 um 13:23 UTC](https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880 "2024-02-08T13:23:15Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![TAB10](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@TAB10](https://forum.shopware.com/u/TAB10)\
**Post date:** [8. Februar 2024 um 13:23 UTC](https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880/1 "2024-02-08T13:23:15Z")

</div>

Hallo zusammen.

Ich hab Probleme mit dem watch-storefront.sh Skript und dem 6.6 RC Release (Docker/Dockware).  
Sobald ich das Frontend aufrufe bricht das Skript ab und meldet:

node:events:496  
throw er; // Unhandled ‚error‘ event  
^

Error: connect ECONNREFUSED 127.0.0.1:9999  
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16)  
Emitted ‚error‘ event on ClientRequest instance at:  
at ClientRequest.onerror (node:internal/streams/readable:1026:14)  
at ClientRequest.emit (node:events:518:28)  
at Socket.socketErrorListener (node:\_http\_client:495:9)  
at Socket.emit (node:events:518:28)  
at emitErrorNT (node:internal/streams/destroy:169:8)  
at emitErrorCloseNT (node:internal/streams/destroy:128:3)  
at process.processTicksAndRejections (node:internal/process/task\_queues:82:21) {  
errno: -111,  
code: ‚ECONNREFUSED‘,  
syscall: ‚connect‘,  
address: ‚127.0.0.1‘,  
port: 9999  
}

Hat jemand eine Idee woran das liegen könnte?

---

<div class="post-metadata">

**Author:** ![shopstudio](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shopstudio/32/23014_2.png) [@shopstudio](https://forum.shopware.com/u/shopstudio)\
**Post date:** [12. Februar 2024 um 17:36 UTC](https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880/2 "2024-02-12T17:36:38Z")

</div>

Genau das Problem habe ich leider auch. Suche schon seit 2-3 Stunden nach einer Lösung. Bei SW 6.5 funktionieren die ganzen Projekte.

Vermutlich brauchen wir einen RC3. Ist aber nur ein Bauchgefühl 🙂

---

<div class="post-metadata">

**Author:** ![shopstudio](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shopstudio/32/23014_2.png) [@shopstudio](https://forum.shopware.com/u/shopstudio)\
**Post date:** [12. Februar 2024 um 17:43 UTC](https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880/3 "2024-02-12T17:43:45Z")

</div>

Ich bin auch tiefer in die Webpack-Config gegangen, aber kann keine großen Unterschiede zu SW 6.5 sehen. Via Dockware nutze ich Node 20.11 und PHP 8.2.

Ansonsten geht alles. „Build storefront“, „Build administration“ & „Watch administration“. Nur nicht „Watch storefront“

---

<div class="post-metadata">

**Author:** ![shopstudio](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shopstudio/32/23014_2.png) [@shopstudio](https://forum.shopware.com/u/shopstudio)\
**Post date:** [12. Februar 2024 um 17:45 UTC](https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880/4 "2024-02-12T17:45:57Z")

</div>

Noch eine Info:  
Ich triggere die normalen bin/build-storefront.sh, bin/watch-storefront.sh, bin/build-administration.sh & bin/watch-administration.sh Dateien von Shopware. Keine extra Logik oder so.

Noch ein Hinweis:  
Bei Webpack gibt es unter 127.0.0.1:9999 keine Antwort via „curl 127.0.0.1:9999“, aber in der 6.5 Version gibt es HTML Output.

Bekomme als Fehler: curl: (7) Failed to connect to 127.0.0.1 port 9999 after 0 ms: Connection refused

Vielleicht startet Webpack die Server nicht richtig mit der Config?

---

<div class="post-metadata">

**Author:** ![TAB10](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@TAB10](https://forum.shopware.com/u/TAB10)\
**Post date:** [13. Februar 2024 um 10:14 UTC](https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880/5 "2024-02-13T10:14:01Z")

</div>

RC3 Release wird glaube ich nix bringen.  
Da du auch Dockware verwendest und es reproduzieren kannst, vermute ich es liegt an Dockware.

Im Slack-Channel beschwert sich bisher auch niemand über das Problem.  
Die arbeiten wohl eher mit Devenv was ich bei mir leider nicht zum Laufen bekomme.

Hab bei dockware ein Ticket angelegt.

---

<div class="post-metadata">

**Author:** ![TAB10](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@TAB10](https://forum.shopware.com/u/TAB10)\
**Post date:** [13. Februar 2024 um 16:32 UTC](https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880/6 "2024-02-13T16:32:06Z")

</div>

Das Bauchgefühl war doch richtig.

> <https://github.com/shopware/shopware/commit/e3d57832b02dd584b1a886f9daebe74a35e6cc4a>
>
> NEXT-32786 - Fix storefront watch
> 
> See merge request shopware/6/product/platform…!12849

---

<div class="post-metadata">

**Author:** ![TM184](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@TM184](https://forum.shopware.com/u/TM184)\
**Post date:** [3. April 2024 um 15:25 UTC](https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880/7 "2024-04-03T15:25:54Z")

</div>

Hallo zusammen, das Problem scheint ja behoben zu sein, ich bekomme es bei mir jedoch immer noch nicht zum Laufen und denke, dass es eventuell hiermit zusammen hängt. Ich versuchte es die letzten Tage mit allen 6.6 Version, zuletzt mit der heute erschienenden 6.6.0.2 Dockware dev. Die 6.5. Versionen funktionieren.  
Alles wird über eine docker-compose neu erstellt, ports werden freigegeben. Ähnlich wie: [examples/basic-dev-setup/docker-compose.yml at master · dockware/examples · GitHub](https://github.com/dockware/examples/blob/master/basic-dev-setup/docker-compose.yml)

Als Fehlermeldung bekomme ich folgendes:

```auto
[webpack-dev-server] 
WebSocketClient.js:13 WebSocket connection to 'ws://localhost:9999/ws' failed:

[webpack-dev-server] 
Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …} isTrusted : true bubbles : false cancelBubble : false cancelable : false composed : false currentTarget : WebSocket {url: 'ws://localhost:9999/ws', readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …} defaultPrevented : false eventPhase : 0 returnValue : true srcElement : WebSocket {url: 'ws://localhost:9999/ws', readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …} target : WebSocket {url: 'ws://localhost:9999/ws', readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …} timeStamp : 260967.7000000002 type : "error"

```

Jemand ne Idee?

Viele Dank vorab

---

<div class="post-metadata">

**Author:** ![TM184](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@TM184](https://forum.shopware.com/u/TM184)\
**Post date:** [4. April 2024 um 15:59 UTC](https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880/8 "2024-04-04T15:59:25Z")

</div>

Okay ich hab eine Lösung für mein problem gefunden.  
In der Datei: [shopware/src/Storefront/Resources/app/storefront/build/live-reload-server/index.js at trunk · shopware/shopware · GitHub](https://github.com/shopware/shopware/blob/trunk/src/Storefront/Resources/app/storefront/build/live-reload-server/index.js)  
musste ich in Zeile 25 `server.start` wie in der Vorgängerversion zu ` server.listen` ändern.

---

<div class="post-metadata">

**Author:** ![songworks](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/songworks/32/21761_2.png) [@songworks](https://forum.shopware.com/u/songworks)\
**Post date:** [5. April 2024 um 12:50 UTC](https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880/9 "2024-04-05T12:50:42Z")

</div>

Thank you!!  
The Problem was driving me nuts…

Anyway, if anybody wants to use the TM184 fix as a composer-patch, here’s the diff:  
`./path/to/patches/diffs/shopware-storefront-dev-server-websocket-listen.diff`:

```diff
index bf4cda2..b3703c2 100644
--- a/Resources/app/storefront/build/live-reload-server/index.js
+++ b/Resources/app/storefront/build/live-reload-server/index.js
@@ -22,7 +22,7 @@ module.exports = function createLiveReloadServer() {
         // start the normal webpack dev server for hot reloading the files
         const server = new WebpackDevServer(devServerOptions, compiler);

- server.start(devServerOptions.port, '0.0.0.0', (err) => {
+ server.listen(devServerOptions.port, '0.0.0.0', (err) => {
             if (err) {
                 reject(err);
             }

```

`./path/to/patches/register.json`:

```json
{
    "patches": {
        "shopware/storefront": {
            "Bugfix: New webpack dev server breaks websockets, use old way again": "./path/to/patches/diffs/shopware-storefront-dev-server-websocket-listen.diff"
        }
    }
}

```

Although I’m sure there’s a better way to fix it, as `listen` is deprecated.  
But I didn’t find any documentation on how `start` is supposed to actually work.

---

<div class="post-metadata">

**Author:** ![matheusla2](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/matheusla2/32/23639_2.png) [@matheusla2](https://forum.shopware.com/u/matheusla2)\
**Post date:** [18. April 2024 um 09:24 UTC](https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880/10 "2024-04-18T09:24:00Z")

</div>

Exactly the patch works as a charm. Or you could take a look on the latest modifications from Shopware.

> <https://github.com/shopware/shopware/blob/70527236271c4bb1a256516ee40f59fc399dec19/src/Storefront/Resources/app/storefront/build/live-reload-server/index.js>

---

<div class="post-metadata">

**Author:** ![shopstudio](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shopstudio/32/23014_2.png) [@shopstudio](https://forum.shopware.com/u/shopstudio)\
**Post date:** [30. April 2024 um 19:44 UTC](https://forum.shopware.com/t/sw-6-6-0-0-rc-2-watch-storefront-probleme/102880/11 "2024-04-30T19:44:02Z")

</div>

A fix would be great. I searched about 2 hours for the same issue and it’s not resolved yet with Shopware 6.6.0.2 and 6.6.1.2 (latest versions at the moment).
