Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing profile results in exception #222

Closed
davenice opened this issue Feb 4, 2025 · 2 comments · Fixed by #223
Closed

Editing profile results in exception #222

davenice opened this issue Feb 4, 2025 · 2 comments · Fixed by #223
Assignees
Labels
bug Something isn't working

Comments

@davenice
Copy link
Contributor

davenice commented Feb 4, 2025

Describe the bug

Right-clicking on a CICS profile and choosing manage profile -> edit profile results in an exception and the config file is not opened.
Choosing delete profile works correctly.

This has started happening to me and others in the last couple of days - it's not entirely clear why!

The exception that's shown is this:

Something went wrong while managing the profile - {"stack":"TypeError: Cannot read properties of undefined (reading 'homeDir')  
at US.updateSession (/Users/niced/.vscode/extensions/zowe.cics-extension-for-zowe-3.3.1/dist/extension.js:1:2247046)  
at async US.manageProfile (/Users/niced/.vscode/extensions/zowe.cics-extension-for-zowe-3.3.1/dist/extension.js:1:2240021)  
at async cw.h (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:32825)","message":"Cannot read properties of undefined (reading 'homeDir')"}

At

const teamConfigFilePath = configInstance.getTeamConfig().opts.homeDir + "/zowe.config.json";

we do
configInstance.getTeamConfig().opts.homeDir - but opts is undefined for me currently.

I think the complexity is here is because we supported multi-selecting profiles, whereas the delete profile code (and Zowe Explorer) do not. I've not delved into why opts is now undefined.

@davenice davenice added the bug Something isn't working label Feb 4, 2025
Copy link

github-actions bot commented Feb 4, 2025

Thank you for creating a bug report.
We will investigate the bug and evaluate its impact on the product.
If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

@davenice
Copy link
Contributor Author

davenice commented Feb 4, 2025

I think the best solution here is so simplfy the code so both update and delete profile options use the same straightforward code to open the config file, and to prevent multi-selecting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

1 participant