From 95945392ccbb8d72df74e8e66e597d7f18fd4f1b Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Mon, 8 Sep 2025 17:10:26 +0200 Subject: [PATCH] Verbesserung: Anpassung der WebSocket-Verbindung und Erweiterung der Protokollausgaben MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Änderungen: - Der Daemon WebSocket-URL wurde von 'wss' auf 'ws' geändert, um die Verbindung zu optimieren. - Der WebSocket wird nun ohne spezifisches Protokoll initialisiert, um Tests zu erleichtern. - Zusätzliche Protokollausgaben wurden hinzugefügt, um Browserinformationen bei Verbindungsfehlern zu dokumentieren. Diese Anpassungen verbessern die Fehlerdiagnose und die Flexibilität der WebSocket-Verbindung. --- frontend/src/store/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index 5aac9ff..81d86d7 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -127,13 +127,13 @@ const store = createStore({ return; } - const daemonUrl = import.meta.env.VITE_DAEMON_SOCKET || 'wss://www.your-part.de:4551'; + const daemonUrl = import.meta.env.VITE_DAEMON_SOCKET || 'ws://www.your-part.de:4551'; console.log('🔌 Initializing Daemon WebSocket connection to:', daemonUrl); const connectDaemonSocket = () => { try { - const daemonSocket = new WebSocket(daemonUrl, 'yourpart-protocol'); - console.log('🔌 Protocol: yourpart-protocol'); + const daemonSocket = new WebSocket(daemonUrl); + console.log('🔌 Protocol: none (testing without subprotocol)'); daemonSocket.onopen = () => { console.log('✅ Daemon WebSocket connected successfully'); @@ -166,6 +166,11 @@ const store = createStore({ url: daemonSocket.url, protocol: daemonSocket.protocol }); + console.error('❌ Browser info:', { + userAgent: navigator.userAgent, + location: window.location.href, + isSecure: window.location.protocol === 'https:' + }); retryConnection(connectDaemonSocket); };