Describe the bug
When calling the stat function of the Zowe Explorer FileSystemProvider while logged out of the Authentication Service, a FileSystemError is thrown even though correct credentials are provided during the authentication prompt. The error indicates an authentication failure, but subsequent stat calls with the same parameters succeed without error.
To Reproduce
- Open VSCode
- Configure
zosmf profile but DO NOT log in to Authentication Service
- Call ZE FS provider with code similar to this
try {
await vscode.workspace.fs.stat(
vscode.Uri.parse(`zowe-ds:/${profileName}/${dsn}?fetch=true`)
);
} catch (error) {
vscode.window.showErrorMessage(error.stack);
}
- Zowe Explorer prompts for login to the Authentication Service
- Enter correct credentials
- ZE displays Login to authentication service successful dialog.
- Despite the successful login, the
stat function throws the following error:
Error (FileSystemError): Rest API failure with HTTP(S) status 401 This operation requires authentication.
- Repeating the same
stat call with the same parameters returns the correct result without error.
Expected behavior
The initial stat call should succeed if correct credentials are provided during the authentication prompt, even if the user was not previously logged in. No error should be thrown in this scenario.
Screenshots
Desktop (please complete the following information):
- OS: macOC
- Zowe Explorer Version: 3.2.0
- (Optional) Zowe CLI Version:
- (Optional) Do you have secure credentials enabled?
- (Optional) Are you using a custom credential manager?
Additional context
Describe the bug
When calling the
statfunction of the Zowe ExplorerFileSystemProviderwhile logged out of the Authentication Service, aFileSystemErroris thrown even though correct credentials are provided during the authentication prompt. The error indicates an authentication failure, but subsequentstatcalls with the same parameters succeed without error.To Reproduce
zosmfprofile but DO NOT log in to Authentication Servicestatfunction throws the following error:statcall with the same parameters returns the correct result without error.Expected behavior
The initial
statcall should succeed if correct credentials are provided during the authentication prompt, even if the user was not previously logged in. No error should be thrown in this scenario.Screenshots
Desktop (please complete the following information):
Additional context