axonops / axonops-workbench

AxonOps™ Workbench for Apache Cassandra® - Desktop application for Mac, Windows and Linux
https://axonops.com
Apache License 2.0
10 stars 0 forks source link

[bug] macOS: Test Connection does not work with credentials #233

Closed rgooding closed 1 month ago

rgooding commented 1 month ago

The Test Connection feature does not work on macOS when connecting to a cluster that uses authentication. Steps to reproduce:

  1. Open the Add Cluster dialog
  2. Enter the details for the cluster (hostname, datacenter, username, password)
  3. Click Test Connection The spinner dialog is displayed and stays there forever until you manually cancel it.
digiserg commented 1 month ago

Confirmed. This was working fine in 20240809 but it no longer works on >= 20240811

@mhmdkrmabd

digiserg commented 1 month ago
[13-08-2024 08:24:32 PROCESS] Get all pre and post-connection scripts of  a cluster about to be added/updated in workspace #workspace-bf26b37435
[13-08-2024 08:24:32 NETWORK] Close an SSH tunnel that associated with the cluster of ID/defined-port 'null'
[13-08-2024 08:24:32 ERROR] Error in process SSH tunnel. Details: TypeError: Cannot read properties of undefined (reading 'object')
[13-08-2024 08:24:32 PROCESS] Pre and post-connection scripts of  a cluster about to be added/updated in workspace #workspace-bf26b37435 are ({"pre":[],"post":[]})
mhmdkrmabd commented 1 month ago

Working on that

mhmdkrmabd commented 1 month ago

It works fine on Linux in both modes - dev and production -, testing on Windows - related to #229 -

mhmdkrmabd commented 1 month ago

It also works fine on Windows - production mode - v20240813, testing on macOS

https://github.com/user-attachments/assets/1684b98c-8ed8-456d-a3ce-e8ffeb2ed0c5

Also tested with datacenter:

https://github.com/user-attachments/assets/e4637002-4621-4045-a348-9fe9a4fcdd43

mhmdkrmabd commented 1 month ago

@rgooding @digiserg after doing bunch of tests, this is the cause of the issue:

On macOS - and this issue is caused by an exclusive behavior in macOS -, a fixed width and height - number of columns and rows - are set by default - might change per session -, increasing their value might led to unexpected behavior, and in the same time, passing a large statement at once might not work well, as mentioned, this behavior is changeable, when connecting to a cluster - not testing connection - the app splits the cqlsh execution command to small chunks ends with a backslash - after that, the number of columns and rows are synced with the UI terminal -. Now as this behavior is observed in the test connection process too the same approach of splitting the command to chunks has been applied.

Tests in dev mode multiple times:

https://github.com/user-attachments/assets/bae8d7e7-dc83-470c-81aa-d0f955f45faf

Production mode is the same - no need for video it's so laggy -

digiserg commented 1 month ago

I cannot get it to work in Mac. I tried both the latest release and the main branch.

digiserg commented 1 month ago

Tested on 20240820 successfully