-
using below code m i'm getting Failed to initialize secure credential manager , any idea whats wrong ? import { ProfileInfo } from "@zowe/imperative";
import { GetJobs } from "@zowe/zos-jobs-for-zowe-sdk";
(async () => {
// Load connection info from default z/OSMF profile
const profInfo = new ProfileInfo("zowe");
await profInfo.readProfilesFromDisk();
const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf");
const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true });
const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs);
const owner: string = session.ISession.user;
// This may take awhile...
const response = await GetJobs.getJobsByOwner(session, owner);
console.log(response);
})().catch((err) => {
console.error(err);
process.exit(1);
}); |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
i have the .zowe/zowe.config.json file which is a team config |
Beta Was this translation helpful? Give feedback.
-
@kumnar02 Do you have the Zowe Secrets SDK ( If you still have issues after installing the Secrets SDK package, please provide your OS, Node version, and npm version. |
Beta Was this translation helpful? Give feedback.
Thanks for the clarification @kumnar02 - this seems to be an oversight with the logic in
DefaultCredentialManager
. In some environments, themain
property is not always available in therequire
object, so theif
check that you posted results in a TypeError.I've pushed up a fix for this and hoping to get it merged in as soon as possible. Thanks for bringing this issue to our attention.