From 9c701632c587bb97e7c569bb5042e9bad4ea722f Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Thu, 12 Sep 2024 16:11:54 +0200 Subject: [PATCH 01/22] adding additional logging and running a patched testkit --- packages/bolt-connection/src/channel/browser/browser-channel.js | 2 ++ testkit/testkit.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/bolt-connection/src/channel/browser/browser-channel.js b/packages/bolt-connection/src/channel/browser/browser-channel.js index 4d7fed9e8..06f096cd6 100644 --- a/packages/bolt-connection/src/channel/browser/browser-channel.js +++ b/packages/bolt-connection/src/channel/browser/browser-channel.js @@ -62,6 +62,7 @@ export default class WebSocketChannel { return } + console.log('Config.Address:', this._config.address) this._ws = createWebSocket(scheme, config.address, socketFactory) this._ws.binaryType = 'arraybuffer' @@ -140,6 +141,7 @@ export default class WebSocketChannel { write (buffer) { // If there is a pending queue, push this on that queue. This means // we are not yet connected, so we queue things locally. + console.log('Config.Address:', this._config.address) if (this._pending !== null) { this._pending.push(buffer) } else if (buffer instanceof ChannelBuffer) { diff --git a/testkit/testkit.json b/testkit/testkit.json index 931900356..0a883ba6c 100644 --- a/testkit/testkit.json +++ b/testkit/testkit.json @@ -1,6 +1,6 @@ { "testkit": { "uri": "https://github.com/neo4j-drivers/testkit.git", - "ref": "5.0" + "ref": "72ce150f4fecc255f5ca12fe86658a6ae3bdd8ec" } } From 34cb97bb4d44ffb0d3cb4fa126018b64dd97914a Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Fri, 13 Sep 2024 09:05:11 +0200 Subject: [PATCH 02/22] Update testkit.json --- testkit/testkit.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testkit/testkit.json b/testkit/testkit.json index 0a883ba6c..a406b343c 100644 --- a/testkit/testkit.json +++ b/testkit/testkit.json @@ -1,6 +1,6 @@ { "testkit": { "uri": "https://github.com/neo4j-drivers/testkit.git", - "ref": "72ce150f4fecc255f5ca12fe86658a6ae3bdd8ec" + "ref": "a0c28bb1f27cfe7d3d563803a516583a4347a031" } } From d1ad5c2a8754853e47282f3e9a9bd3146795e1f3 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Fri, 13 Sep 2024 09:55:12 +0200 Subject: [PATCH 03/22] Update testkit.json --- testkit/testkit.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testkit/testkit.json b/testkit/testkit.json index a406b343c..00da9860c 100644 --- a/testkit/testkit.json +++ b/testkit/testkit.json @@ -1,6 +1,6 @@ { "testkit": { "uri": "https://github.com/neo4j-drivers/testkit.git", - "ref": "a0c28bb1f27cfe7d3d563803a516583a4347a031" + "ref": "4e2969274f7a77cc5cfefab7ec28cd57e8bf9cac" } } From c869daac1bc60732f94dde14a79224039e2d3411 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Fri, 13 Sep 2024 10:49:55 +0200 Subject: [PATCH 04/22] add ip logging --- .../bolt-connection/src/channel/browser/browser-channel.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/bolt-connection/src/channel/browser/browser-channel.js b/packages/bolt-connection/src/channel/browser/browser-channel.js index 06f096cd6..9cf650352 100644 --- a/packages/bolt-connection/src/channel/browser/browser-channel.js +++ b/packages/bolt-connection/src/channel/browser/browser-channel.js @@ -66,6 +66,11 @@ export default class WebSocketChannel { this._ws = createWebSocket(scheme, config.address, socketFactory) this._ws.binaryType = 'arraybuffer' + this._ws.on('connection', function connection (ws, req) { + const ip = req.socket.remoteAddress + console.log('CONNECTION TO:', this._ws.url, ' ON IP:', ip) + }) + const self = this // All connection errors are not sent to the error handler // we must also check for dirty close calls From 282ea97b34fc9344b2df4afe8fec8a2fe3d1b65b Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Fri, 13 Sep 2024 11:10:20 +0200 Subject: [PATCH 05/22] testing other ip logging --- .../src/channel/browser/browser-channel.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/bolt-connection/src/channel/browser/browser-channel.js b/packages/bolt-connection/src/channel/browser/browser-channel.js index 9cf650352..7245692ab 100644 --- a/packages/bolt-connection/src/channel/browser/browser-channel.js +++ b/packages/bolt-connection/src/channel/browser/browser-channel.js @@ -62,14 +62,10 @@ export default class WebSocketChannel { return } - console.log('Config.Address:', this._config.address) this._ws = createWebSocket(scheme, config.address, socketFactory) this._ws.binaryType = 'arraybuffer' - - this._ws.on('connection', function connection (ws, req) { - const ip = req.socket.remoteAddress - console.log('CONNECTION TO:', this._ws.url, ' ON IP:', ip) - }) + const ip = this._ws._socket.remoteAddress + console.log('Config.Address:', this._config.address, ' IP:', ip) const self = this // All connection errors are not sent to the error handler From da296c04bf807719c1e264d7191ca6ba24f97fb0 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Fri, 13 Sep 2024 11:52:18 +0200 Subject: [PATCH 06/22] Functioning IP logging --- .../src/channel/browser/browser-channel.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/bolt-connection/src/channel/browser/browser-channel.js b/packages/bolt-connection/src/channel/browser/browser-channel.js index 7245692ab..fe2ea835e 100644 --- a/packages/bolt-connection/src/channel/browser/browser-channel.js +++ b/packages/bolt-connection/src/channel/browser/browser-channel.js @@ -64,8 +64,6 @@ export default class WebSocketChannel { this._ws = createWebSocket(scheme, config.address, socketFactory) this._ws.binaryType = 'arraybuffer' - const ip = this._ws._socket.remoteAddress - console.log('Config.Address:', this._config.address, ' IP:', ip) const self = this // All connection errors are not sent to the error handler @@ -79,6 +77,8 @@ export default class WebSocketChannel { this._ws.onopen = function () { // Connected! Cancel the connection timeout self._clearConnectionTimeout() + const ip = self._ws.remoteAddress + console.log('Config.Address:', self._config.address, ' IP:', ip) // Drain all pending messages const pending = self._pending @@ -142,7 +142,9 @@ export default class WebSocketChannel { write (buffer) { // If there is a pending queue, push this on that queue. This means // we are not yet connected, so we queue things locally. - console.log('Config.Address:', this._config.address) + if (this._ws._socket) { + console.log('Config.Address:', this._config.address, ' IP', this._ws._socket.remoteAddress) + } if (this._pending !== null) { this._pending.push(buffer) } else if (buffer instanceof ChannelBuffer) { From a74bff5ef462d9cf1b6578d74f1c4d56366e194f Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Fri, 13 Sep 2024 13:08:58 +0200 Subject: [PATCH 07/22] expanded logging, IPs are blocked by proxies --- .../src/channel/browser/browser-channel.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/bolt-connection/src/channel/browser/browser-channel.js b/packages/bolt-connection/src/channel/browser/browser-channel.js index fe2ea835e..bd897d39d 100644 --- a/packages/bolt-connection/src/channel/browser/browser-channel.js +++ b/packages/bolt-connection/src/channel/browser/browser-channel.js @@ -65,6 +65,10 @@ export default class WebSocketChannel { this._ws = createWebSocket(scheme, config.address, socketFactory) this._ws.binaryType = 'arraybuffer' + if (this._ws._socket) { + console.log('65 Config.Address:', this._config.address, ' IP:', this._ws._socket.remoteAddress) + } + const self = this // All connection errors are not sent to the error handler // we must also check for dirty close calls @@ -77,8 +81,10 @@ export default class WebSocketChannel { this._ws.onopen = function () { // Connected! Cancel the connection timeout self._clearConnectionTimeout() - const ip = self._ws.remoteAddress - console.log('Config.Address:', self._config.address, ' IP:', ip) + if (self._ws._socket) { + const ip = self._ws._socket.remoteAddress + console.log('OPEN Config.Address:', self._config.address, ' IP:', ip) + } // Drain all pending messages const pending = self._pending @@ -142,9 +148,7 @@ export default class WebSocketChannel { write (buffer) { // If there is a pending queue, push this on that queue. This means // we are not yet connected, so we queue things locally. - if (this._ws._socket) { - console.log('Config.Address:', this._config.address, ' IP', this._ws._socket.remoteAddress) - } + if (this._pending !== null) { this._pending.push(buffer) } else if (buffer instanceof ChannelBuffer) { @@ -162,6 +166,9 @@ export default class WebSocketChannel { } else { throw newError("Don't know how to send buffer: " + buffer) } + if (this._ws._socket) { + console.log('WRITE Config.Address:', this._config.address, ' IP', this._ws._socket.remoteAddress) + } } /** From 0da579821815ce78cfa6bdd41df45ce7e7c82675 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:15:54 +0200 Subject: [PATCH 08/22] returning to unpatched testkit --- testkit/testkit.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testkit/testkit.json b/testkit/testkit.json index 00da9860c..931900356 100644 --- a/testkit/testkit.json +++ b/testkit/testkit.json @@ -1,6 +1,6 @@ { "testkit": { "uri": "https://github.com/neo4j-drivers/testkit.git", - "ref": "4e2969274f7a77cc5cfefab7ec28cd57e8bf9cac" + "ref": "5.0" } } From 216674bc38f6ddaaf7172c46bcdfa3344b0e398d Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:28:39 +0200 Subject: [PATCH 09/22] logging for node --- packages/bolt-connection/src/channel/node/node-channel.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/bolt-connection/src/channel/node/node-channel.js b/packages/bolt-connection/src/channel/node/node-channel.js index b238d55b4..fdf4517b9 100644 --- a/packages/bolt-connection/src/channel/node/node-channel.js +++ b/packages/bolt-connection/src/channel/node/node-channel.js @@ -262,11 +262,13 @@ export default class NodeChannel { if (!self._open) { return } + console.log('NODE CHANNEL IP:', self._conn.remoteAddress, ' ON HOST', config.address) self._conn.on('data', buffer => { if (self.onmessage) { self.onmessage(new ChannelBuffer(buffer)) } + console.log('ONDATA NODE CHANNEL IP:', self._conn.remoteAddress, ' ON HOST', config.address) }) self._conn.on('end', self._handleConnectionTerminated) From ce22f823ee18324fbcb9753a29fb7b53f5ed2e22 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:29:48 +0200 Subject: [PATCH 10/22] return to latest testkit patch --- testkit/testkit.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testkit/testkit.json b/testkit/testkit.json index 931900356..00da9860c 100644 --- a/testkit/testkit.json +++ b/testkit/testkit.json @@ -1,6 +1,6 @@ { "testkit": { "uri": "https://github.com/neo4j-drivers/testkit.git", - "ref": "5.0" + "ref": "4e2969274f7a77cc5cfefab7ec28cd57e8bf9cac" } } From 5216c63df0bbff5d92dc57f075078a464e57f1d4 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:39:33 +0200 Subject: [PATCH 11/22] build and deno build --- .../channel/browser/browser-channel.js | 12 ++++++++++++ .../lib/bolt-connection/channel/node/node-channel.js | 2 ++ 2 files changed, 14 insertions(+) diff --git a/packages/neo4j-driver-deno/lib/bolt-connection/channel/browser/browser-channel.js b/packages/neo4j-driver-deno/lib/bolt-connection/channel/browser/browser-channel.js index 1124d49a0..796bd3a66 100644 --- a/packages/neo4j-driver-deno/lib/bolt-connection/channel/browser/browser-channel.js +++ b/packages/neo4j-driver-deno/lib/bolt-connection/channel/browser/browser-channel.js @@ -65,6 +65,10 @@ export default class WebSocketChannel { this._ws = createWebSocket(scheme, config.address, socketFactory) this._ws.binaryType = 'arraybuffer' + if (this._ws._socket) { + console.log('65 Config.Address:', this._config.address, ' IP:', this._ws._socket.remoteAddress) + } + const self = this // All connection errors are not sent to the error handler // we must also check for dirty close calls @@ -77,6 +81,10 @@ export default class WebSocketChannel { this._ws.onopen = function () { // Connected! Cancel the connection timeout self._clearConnectionTimeout() + if (self._ws._socket) { + const ip = self._ws._socket.remoteAddress + console.log('OPEN Config.Address:', self._config.address, ' IP:', ip) + } // Drain all pending messages const pending = self._pending @@ -140,6 +148,7 @@ export default class WebSocketChannel { write (buffer) { // If there is a pending queue, push this on that queue. This means // we are not yet connected, so we queue things locally. + if (this._pending !== null) { this._pending.push(buffer) } else if (buffer instanceof ChannelBuffer) { @@ -157,6 +166,9 @@ export default class WebSocketChannel { } else { throw newError("Don't know how to send buffer: " + buffer) } + if (this._ws._socket) { + console.log('WRITE Config.Address:', this._config.address, ' IP', this._ws._socket.remoteAddress) + } } /** diff --git a/packages/neo4j-driver-deno/lib/bolt-connection/channel/node/node-channel.js b/packages/neo4j-driver-deno/lib/bolt-connection/channel/node/node-channel.js index 87533ee5b..7c863b089 100644 --- a/packages/neo4j-driver-deno/lib/bolt-connection/channel/node/node-channel.js +++ b/packages/neo4j-driver-deno/lib/bolt-connection/channel/node/node-channel.js @@ -262,11 +262,13 @@ export default class NodeChannel { if (!self._open) { return } + console.log('NODE CHANNEL IP:', self._conn.remoteAddress, ' ON HOST', config.address) self._conn.on('data', buffer => { if (self.onmessage) { self.onmessage(new ChannelBuffer(buffer)) } + console.log('ONDATA NODE CHANNEL IP:', self._conn.remoteAddress, ' ON HOST', config.address) }) self._conn.on('end', self._handleConnectionTerminated) From b32e9c60d98f2df0f6519fd027a91df7fcccc3ee Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:09:24 +0200 Subject: [PATCH 12/22] increase browser sleep time --- testkit/backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testkit/backend.py b/testkit/backend.py index 7e1bb6784..d47af8665 100644 --- a/testkit/backend.py +++ b/testkit/backend.py @@ -31,7 +31,7 @@ "npm", "run", backend_script ], env=os.environ) as backend: if (is_browser()): - time.sleep(5) + time.sleep(30) print("openning firefox") with open_proccess_in_driver_repo([ "firefox", "-headless", "http://localhost:8000" From 5f3790c1b2ead294c450a68d0a947d87bed24809 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:06:40 +0200 Subject: [PATCH 13/22] Add custom profile to firefox with no dns cache --- testkit/backend.py | 5 +++-- testkit/profile/prefs.js | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 testkit/profile/prefs.js diff --git a/testkit/backend.py b/testkit/backend.py index d47af8665..46af5768d 100644 --- a/testkit/backend.py +++ b/testkit/backend.py @@ -12,6 +12,7 @@ import os import time + if __name__ == "__main__": print("starting backend") backend_script = "start-testkit-backend" @@ -31,10 +32,10 @@ "npm", "run", backend_script ], env=os.environ) as backend: if (is_browser()): - time.sleep(30) + time.sleep(5) print("openning firefox") with open_proccess_in_driver_repo([ - "firefox", "-headless", "http://localhost:8000" + "firefox", "-headless -profile " + os.path.abspath(os.path.dirname(sys.argv[0]))+"/profile", "http://localhost:8000" # type: ignore ]) as firefox: firefox.wait() backend.wait() diff --git a/testkit/profile/prefs.js b/testkit/profile/prefs.js new file mode 100644 index 000000000..905317810 --- /dev/null +++ b/testkit/profile/prefs.js @@ -0,0 +1,2 @@ +user_pref("network.dnsCacheExpiration", 0); // eslint-disable-line +user_pref("network.dnsCacheExpirationGracePeriod", 0); // eslint-disable-line From 91e55a0baad4101ed51157254f6a35010a20ba77 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Mon, 16 Sep 2024 12:27:05 +0200 Subject: [PATCH 14/22] add profile to gitignore --- .gitignore | 1 + testkit/backend.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dab77719f..6d9207ef2 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ coverage *.code-workspace /testkit/CAs /testkit/CustomCAs +/testkit/profile/* diff --git a/testkit/backend.py b/testkit/backend.py index 46af5768d..12eba5fb5 100644 --- a/testkit/backend.py +++ b/testkit/backend.py @@ -35,7 +35,7 @@ time.sleep(5) print("openning firefox") with open_proccess_in_driver_repo([ - "firefox", "-headless -profile " + os.path.abspath(os.path.dirname(sys.argv[0]))+"/profile", "http://localhost:8000" # type: ignore + "firefox", "-profile " + os.path.dirname(os.path.realpath(__file__))+"/profile -headless ", "http://localhost:8000" # type: ignore ]) as firefox: firefox.wait() backend.wait() From e5b6d70133f9baa082043f14e1fd99cf8095ea8d Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:32:29 +0200 Subject: [PATCH 15/22] test relative path --- testkit/backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testkit/backend.py b/testkit/backend.py index 12eba5fb5..826fa8098 100644 --- a/testkit/backend.py +++ b/testkit/backend.py @@ -35,7 +35,7 @@ time.sleep(5) print("openning firefox") with open_proccess_in_driver_repo([ - "firefox", "-profile " + os.path.dirname(os.path.realpath(__file__))+"/profile -headless ", "http://localhost:8000" # type: ignore + "firefox", "-profile ./profile -headless ", "http://localhost:8000" # type: ignore ]) as firefox: firefox.wait() backend.wait() From bcdfea7040f9bb27c8d3481577a03c3029e33c7c Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:42:10 +0200 Subject: [PATCH 16/22] Update backend.py --- testkit/backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testkit/backend.py b/testkit/backend.py index 826fa8098..48c4d7ee3 100644 --- a/testkit/backend.py +++ b/testkit/backend.py @@ -35,7 +35,7 @@ time.sleep(5) print("openning firefox") with open_proccess_in_driver_repo([ - "firefox", "-profile ./profile -headless ", "http://localhost:8000" # type: ignore + "firefox", "-profile", "./testkit/profile", "-headless", "http://localhost:8000" # type: ignore ]) as firefox: firefox.wait() backend.wait() From d65c1960cfb109f748c0ef89f990a21234fe5024 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:16:55 +0200 Subject: [PATCH 17/22] remove logging and return to released testkit --- .../src/channel/browser/browser-channel.js | 12 ------------ .../bolt-connection/src/channel/node/node-channel.js | 2 -- .../channel/browser/browser-channel.js | 12 ------------ .../lib/bolt-connection/channel/node/node-channel.js | 2 -- testkit/testkit.json | 2 +- 5 files changed, 1 insertion(+), 29 deletions(-) diff --git a/packages/bolt-connection/src/channel/browser/browser-channel.js b/packages/bolt-connection/src/channel/browser/browser-channel.js index bd897d39d..4d7fed9e8 100644 --- a/packages/bolt-connection/src/channel/browser/browser-channel.js +++ b/packages/bolt-connection/src/channel/browser/browser-channel.js @@ -65,10 +65,6 @@ export default class WebSocketChannel { this._ws = createWebSocket(scheme, config.address, socketFactory) this._ws.binaryType = 'arraybuffer' - if (this._ws._socket) { - console.log('65 Config.Address:', this._config.address, ' IP:', this._ws._socket.remoteAddress) - } - const self = this // All connection errors are not sent to the error handler // we must also check for dirty close calls @@ -81,10 +77,6 @@ export default class WebSocketChannel { this._ws.onopen = function () { // Connected! Cancel the connection timeout self._clearConnectionTimeout() - if (self._ws._socket) { - const ip = self._ws._socket.remoteAddress - console.log('OPEN Config.Address:', self._config.address, ' IP:', ip) - } // Drain all pending messages const pending = self._pending @@ -148,7 +140,6 @@ export default class WebSocketChannel { write (buffer) { // If there is a pending queue, push this on that queue. This means // we are not yet connected, so we queue things locally. - if (this._pending !== null) { this._pending.push(buffer) } else if (buffer instanceof ChannelBuffer) { @@ -166,9 +157,6 @@ export default class WebSocketChannel { } else { throw newError("Don't know how to send buffer: " + buffer) } - if (this._ws._socket) { - console.log('WRITE Config.Address:', this._config.address, ' IP', this._ws._socket.remoteAddress) - } } /** diff --git a/packages/bolt-connection/src/channel/node/node-channel.js b/packages/bolt-connection/src/channel/node/node-channel.js index fdf4517b9..b238d55b4 100644 --- a/packages/bolt-connection/src/channel/node/node-channel.js +++ b/packages/bolt-connection/src/channel/node/node-channel.js @@ -262,13 +262,11 @@ export default class NodeChannel { if (!self._open) { return } - console.log('NODE CHANNEL IP:', self._conn.remoteAddress, ' ON HOST', config.address) self._conn.on('data', buffer => { if (self.onmessage) { self.onmessage(new ChannelBuffer(buffer)) } - console.log('ONDATA NODE CHANNEL IP:', self._conn.remoteAddress, ' ON HOST', config.address) }) self._conn.on('end', self._handleConnectionTerminated) diff --git a/packages/neo4j-driver-deno/lib/bolt-connection/channel/browser/browser-channel.js b/packages/neo4j-driver-deno/lib/bolt-connection/channel/browser/browser-channel.js index 796bd3a66..1124d49a0 100644 --- a/packages/neo4j-driver-deno/lib/bolt-connection/channel/browser/browser-channel.js +++ b/packages/neo4j-driver-deno/lib/bolt-connection/channel/browser/browser-channel.js @@ -65,10 +65,6 @@ export default class WebSocketChannel { this._ws = createWebSocket(scheme, config.address, socketFactory) this._ws.binaryType = 'arraybuffer' - if (this._ws._socket) { - console.log('65 Config.Address:', this._config.address, ' IP:', this._ws._socket.remoteAddress) - } - const self = this // All connection errors are not sent to the error handler // we must also check for dirty close calls @@ -81,10 +77,6 @@ export default class WebSocketChannel { this._ws.onopen = function () { // Connected! Cancel the connection timeout self._clearConnectionTimeout() - if (self._ws._socket) { - const ip = self._ws._socket.remoteAddress - console.log('OPEN Config.Address:', self._config.address, ' IP:', ip) - } // Drain all pending messages const pending = self._pending @@ -148,7 +140,6 @@ export default class WebSocketChannel { write (buffer) { // If there is a pending queue, push this on that queue. This means // we are not yet connected, so we queue things locally. - if (this._pending !== null) { this._pending.push(buffer) } else if (buffer instanceof ChannelBuffer) { @@ -166,9 +157,6 @@ export default class WebSocketChannel { } else { throw newError("Don't know how to send buffer: " + buffer) } - if (this._ws._socket) { - console.log('WRITE Config.Address:', this._config.address, ' IP', this._ws._socket.remoteAddress) - } } /** diff --git a/packages/neo4j-driver-deno/lib/bolt-connection/channel/node/node-channel.js b/packages/neo4j-driver-deno/lib/bolt-connection/channel/node/node-channel.js index 7c863b089..87533ee5b 100644 --- a/packages/neo4j-driver-deno/lib/bolt-connection/channel/node/node-channel.js +++ b/packages/neo4j-driver-deno/lib/bolt-connection/channel/node/node-channel.js @@ -262,13 +262,11 @@ export default class NodeChannel { if (!self._open) { return } - console.log('NODE CHANNEL IP:', self._conn.remoteAddress, ' ON HOST', config.address) self._conn.on('data', buffer => { if (self.onmessage) { self.onmessage(new ChannelBuffer(buffer)) } - console.log('ONDATA NODE CHANNEL IP:', self._conn.remoteAddress, ' ON HOST', config.address) }) self._conn.on('end', self._handleConnectionTerminated) diff --git a/testkit/testkit.json b/testkit/testkit.json index 00da9860c..931900356 100644 --- a/testkit/testkit.json +++ b/testkit/testkit.json @@ -1,6 +1,6 @@ { "testkit": { "uri": "https://github.com/neo4j-drivers/testkit.git", - "ref": "4e2969274f7a77cc5cfefab7ec28cd57e8bf9cac" + "ref": "5.0" } } From 0b35824029a7b3485115d9dac89fce92007f2301 Mon Sep 17 00:00:00 2001 From: Max Gustafsson <61233757+MaxAake@users.noreply.github.com> Date: Tue, 17 Sep 2024 13:48:24 +0200 Subject: [PATCH 18/22] Update testkit/profile/prefs.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Antonio Barcélos --- testkit/profile/prefs.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testkit/profile/prefs.js b/testkit/profile/prefs.js index 905317810..f87ce4d32 100644 --- a/testkit/profile/prefs.js +++ b/testkit/profile/prefs.js @@ -1,2 +1,3 @@ -user_pref("network.dnsCacheExpiration", 0); // eslint-disable-line -user_pref("network.dnsCacheExpirationGracePeriod", 0); // eslint-disable-line +// @eslint-disable +user_pref("network.dnsCacheExpiration", 0); +user_pref("network.dnsCacheExpirationGracePeriod", 0); From 4bf0f7ba90cf1547cca2da49db4fd65f4d85be20 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Tue, 17 Sep 2024 14:16:18 +0200 Subject: [PATCH 19/22] updating name of profile folder for readability --- testkit/backend.py | 2 +- testkit/firefox_profile/prefs.js | 3 +++ testkit/profile/prefs.js | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 testkit/firefox_profile/prefs.js delete mode 100644 testkit/profile/prefs.js diff --git a/testkit/backend.py b/testkit/backend.py index 48c4d7ee3..fbba8b583 100644 --- a/testkit/backend.py +++ b/testkit/backend.py @@ -35,7 +35,7 @@ time.sleep(5) print("openning firefox") with open_proccess_in_driver_repo([ - "firefox", "-profile", "./testkit/profile", "-headless", "http://localhost:8000" # type: ignore + "firefox", "-profile", "./testkit/firefox_profile", "-headless", "http://localhost:8000" # type: ignore ]) as firefox: firefox.wait() backend.wait() diff --git a/testkit/firefox_profile/prefs.js b/testkit/firefox_profile/prefs.js new file mode 100644 index 000000000..8f10a7fab --- /dev/null +++ b/testkit/firefox_profile/prefs.js @@ -0,0 +1,3 @@ +/* global user_pref */ +user_pref('network.dnsCacheExpiration', 0) +user_pref('network.dnsCacheExpirationGracePeriod', 0) diff --git a/testkit/profile/prefs.js b/testkit/profile/prefs.js deleted file mode 100644 index f87ce4d32..000000000 --- a/testkit/profile/prefs.js +++ /dev/null @@ -1,3 +0,0 @@ -// @eslint-disable -user_pref("network.dnsCacheExpiration", 0); -user_pref("network.dnsCacheExpirationGracePeriod", 0); From 296c58341b8cd3429d04876949004bb6efd821b5 Mon Sep 17 00:00:00 2001 From: Max Gustafsson <61233757+MaxAake@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:00:01 +0200 Subject: [PATCH 20/22] Update firefox call options Co-authored-by: Robsdedude --- testkit/backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testkit/backend.py b/testkit/backend.py index fbba8b583..5f6c1b5cb 100644 --- a/testkit/backend.py +++ b/testkit/backend.py @@ -35,7 +35,7 @@ time.sleep(5) print("openning firefox") with open_proccess_in_driver_repo([ - "firefox", "-profile", "./testkit/firefox_profile", "-headless", "http://localhost:8000" # type: ignore + "firefox", "--profile", "./testkit/firefox_profile", "--headless", "http://localhost:8000" # type: ignore ]) as firefox: firefox.wait() backend.wait() From 770c51718119f0636c10bb961eca2495c0907a7c Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:33:19 +0200 Subject: [PATCH 21/22] Update .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6d9207ef2..70b2502cf 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,4 @@ coverage *.code-workspace /testkit/CAs /testkit/CustomCAs -/testkit/profile/* +/testkit/firefox_profile/* From 78a669fa8dc9b9947feaf763ff49b68bdb95adb2 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:10:35 +0200 Subject: [PATCH 22/22] Update prefs.js --- testkit/firefox_profile/prefs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testkit/firefox_profile/prefs.js b/testkit/firefox_profile/prefs.js index 8f10a7fab..2f8b5160b 100644 --- a/testkit/firefox_profile/prefs.js +++ b/testkit/firefox_profile/prefs.js @@ -1,3 +1,3 @@ /* global user_pref */ -user_pref('network.dnsCacheExpiration', 0) -user_pref('network.dnsCacheExpirationGracePeriod', 0) +user_pref('network.dnsCacheExpiration', 0); +user_pref('network.dnsCacheExpirationGracePeriod', 0);