Login to SSL-only server fails with misleading message if P4PORT omits ssl prefix
Login to SSL-only server fails if P4Config does not specify SSL
STEPS TO REPRODUCE:
- Setup a client/server environment. The critical element is a Perforce server that responds to SSL only.
- On the Linux client, create a client and pull down some files.
- On the Linux client, create a .p4config in the clientspec root with correct P4USER/P4CLIENT/P4PORT to connect to the server.
- On the Linux client, verify commands all work fine.
- Edit the .p4config, removing the ssl: prefix from P4PORT. Reproduced using default port.
- In VS Code, connect to the Linux client via SSH
- In VS Code, select View|Command Palette, then Perforce: Log in to Perforce
- At the Perforce password prompt, enter your password
- Run any perforce extension command, like opened
EXPECTED: Error message stating unable to connect to server. Ideally, detection of this specific condition and a specific error indicating SSL must be used. For example, run p4 info to detect server connection works but it requires SSL, or must be trusted (see issue 244), and provide an appropriate message so the user knows what to do.
ACTUAL: Nothing happens. Toolbar contains message "Your session has expired" which makes no sense. Output|Perforce log shows the error "Your session has expired"
NOTES:
- Worked well before our admins required SSL
- If you run p4 trust on the client, then restart Visual Studio Code, it will also work fine. This means you must delete the trust entry to reproduce the problem.
- The p4 trust must be run per-workspace on the client.
LOGS sanitized: p4 '-u' 'username' 'login' '-s' sanitized: p4 '-u' 'username' 'opened' 'sanitized file pathname' ERROR: "Your session has expired, please login again.\n" ERROR: "Your session has expired, please login again.\n"
Versions & Details: Server version: sanitized 2020.2/sanitized Extension version: 8/14/2022, 11:02:45 VS Code version: 1.71.0 for Windows Workspace: SINGLE root