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

TypeError when adding profile to tree #3415

Closed
Tracked by #3434
JillieBeanSim opened this issue Jan 27, 2025 · 4 comments · Fixed by #3428
Closed
Tracked by #3434

TypeError when adding profile to tree #3415

JillieBeanSim opened this issue Jan 27, 2025 · 4 comments · Fixed by #3428
Assignees
Labels
bug Something isn't working priority-medium Not functioning - next quarter if capacity permits severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.
Milestone

Comments

@JillieBeanSim
Copy link
Contributor

Describe the bug

Typeerror pop up seen when adding profile to trees

Image

error thrown right after logging no favorites found when adding to each tree

Image

To Reproduce

Expected behavior

no type error pop up shown to users

Screenshots

Desktop (please complete the following information):

  • OS: macos
  • Zowe Explorer Version: latest
  • (Optional) Zowe CLI Version:
  • (Optional) Are you using Secure Credential Store?

Additional context

Copy link

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.

@zFernand0
Copy link
Member

@JTonda JTonda added priority-medium Not functioning - next quarter if capacity permits severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex. labels Jan 28, 2025
@zowe-robot zowe-robot moved this from New Issues to Medium Priority in Zowe Explorer for VS Code Jan 28, 2025
@JTonda JTonda moved this from Medium Priority to Release Backlog in Zowe Explorer for VS Code Jan 28, 2025
@JWaters02
Copy link
Member

JWaters02 commented Jan 29, 2025

Hi @JillieBeanSim, I just upgraded to v3.1.0 from v2.18.0 (as v3.0.3 does not work for me due to various credentials issues that are supposedly fixed in v3.1.0) and I am getting the same error when trying to search after logging in.

One of my colleagues tried v3.1.0 after upgrading from v3.0.3 (due to not having those credentials issues on v3) and she does not get this error and can use v3.1.0 fine.

The logs:

Zowe Explorer 3.1.0
This log file can be found at c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0
Zowe Explorer log level: INFO
[2025/01/29 10:01:42] [INFO] Zowe home directory is located at C:\Users\JAWATERS\.zowe
[2025/01/29 10:01:42] [INFO] No custom credential managers found, using the default instead.
[2025/01/29 10:01:42] [INFO] Zowe Explorer is using the team configuration file "zowe.config.json"
[2025/01/29 10:01:42] [INFO] Zowe profiles initialized successfully.
[2025/01/29 10:01:42] [ERROR] TypeError: Cannot read properties of undefined (reading 'ISession')
{
  errorDetails: [TypeError: Cannot read properties of undefined (reading 'ISession')
  	at le.getProfileSessionWithVscProxy (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:12:45964)
  	at X.getSession (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:12:52383)
  	at xt.<anonymous> (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:66:993)
  	at Generator.next (<anonymous>)
  	at c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:64:47935
  	at new Promise (<anonymous>)
  	at Ne (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:64:47755)
  	at xt.addSingleSession (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:66:669)
  	at xt.<anonymous> (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:64:45188)
  	at Generator.next (<anonymous>)
  	at r (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:64:38039)],
  apiType: 'mvs',
  profile: undefined
}
[2025/01/29 10:01:43] [ERROR] TypeError: Cannot read properties of undefined (reading 'ISession')
{
  errorDetails: [TypeError: Cannot read properties of undefined (reading 'ISession')
  	at le.getProfileSessionWithVscProxy (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:12:45964)
  	at x.getSession (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:12:52383)
  	at xi.<anonymous> (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:148:44056)
  	at Generator.next (<anonymous>)
  	at c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:148:37399
  	at new Promise (<anonymous>)
  	at xe (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:148:37219)
  	at xi.addSingleSession (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:148:43736)
  	at xi.<anonymous> (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:64:45188)
  	at Generator.next (<anonymous>)
  	at r (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:64:38039)],
  apiType: 'uss',
  profile: undefined
}
[2025/01/29 10:01:43] [ERROR] TypeError: Cannot read properties of undefined (reading 'ISession')
{
  errorDetails: [TypeError: Cannot read properties of undefined (reading 'ISession')
  	at le.getProfileSessionWithVscProxy (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:12:45964)
  	at te.getSession (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:12:52383)
  	at _e.<anonymous> (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:91:23513)
  	at Generator.next (<anonymous>)
  	at c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:91:20902
  	at new Promise (<anonymous>)
  	at Oe (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:91:20722)
  	at _e.addSingleSession (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:91:23193)
  	at _e.<anonymous> (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:64:45188)
  	at Generator.next (<anonymous>)
  	at r (c:\Users\JAWATERS\.vscode\extensions\zowe.vscode-extension-for-zowe-3.1.0\out\src\main.extension.js:64:38039)],
  apiType: 'jes',
  profile: undefined
}

Note that the same error occurs for each mvs, uss, and jes trees.

If I recall correctly, you said in the standup that you were using some weird nested profiles setup. But my profile setup is simple. zowe.config.json:

{
    "$schema": "./zowe.schema.json",
    "profiles": {
        "zosmf": {
            "type": "zosmf",
            "properties": {
                "port": 10443,
                "encoding": "IBM-1146"
            }
        },
        "tso": {
            "type": "tso",
            "properties": {
                "account": "STO001",
                "codePage": "1146",
                "characterSet": "695",
                "logonProcedure": "IZUFPROC"
            },
            "secure": []
        },
        "ssh": {
            "type": "ssh",
            "properties": {
                "port": 22
            },
            "secure": []
        },
        "cicsGreen": {
            "type": "cics",
            "properties": {
                "port": 5189,
                "protocol": "https"
            },
            "secure": []
        },
        "cicsRed": {
            "type": "cics",
            "properties": {
                "host": "host",
                "port": 5589,
                "protocol": "https"
            },
            "secure": []
        },
        "base": {
            "type": "base",
            "properties": {
                "host": "host",
                "rejectUnauthorized": false
            },
            "secure": [
                "user",
                "password"
            ]
        }
    },
    "defaults": {
        "zosmf": "zosmf",
        "tso": "tso",
        "ssh": "ssh",
        "cics": "cics",
        "base": "base"
    },
    "autoStore": true
}

Thanks!

@JWaters02
Copy link
Member

JWaters02 commented Jan 29, 2025

I'd replicated this several times over and got the same error every time, but as soon I changed the zowe log level to trace in the settings to see if I could get more detailed logs, this error went away and now it works...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium Not functioning - next quarter if capacity permits severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

4 participants