Skip to content

onProfileUpdated listener not responding to events fired by extenders #3622

@benjamin-t-santos

Description

@benjamin-t-santos

Describe the bug
The ZoweVsCodeExtension in the zowe-explorer-api package provides an onProfileUpdatedEmitter that can be fired. The SharedInitclass in Zowe Explorer listens for this event to sync up the profile nodes after a profile is modified.

The issue I am seeing is that the listener registered on line 164 in SharedInit is not responding to the event emitter firing in ZoweVsCodeExtension.updateCredentials().

To reproduce:

  1. Configure your zowe.team.config.json file with autoStore: false, secure credentials disabled
  2. Extender imports zowe-explorer-api and performs an action that calls ZoweVsCodeExtension.updateCredentials()
  3. User enters valid credentials for the profile
  4. User uses the same profile in one of the Zowe Explorer views to view data sets, USS files, or jobs

Expected behavior

The profile node Zowe Explorer view should have been updated with the credentials, and the user can use the profile node without entering credentials.

Actual behavior:
User is prompted for credentials again when node of same profile is used

I set up a small sample on a branch in this repo: https://github.com/benjamin-t-santos/zowe-explorer-testing/tree/onprofileupdated-issues

I will add that listening for the onProfileUpdated event as an extender works - if I use the profile node to trigger the update credentials prompt, the ZoweVsCodeExtension.onProfileUpdated() listener we register in our extension detects the event. It's the other direction (firing event as extender) that does not seem to work.

Desktop (please complete the following information):

  • OS: Mac OS Sonoma 14.6.1
  • Zowe Explorer Version: v3.1.2 for both ZE and ZE API
  • (Optional) Zowe CLI Version:
  • (Optional) Do you have secure credentials enabled? Disabled
  • (Optional) Are you using a custom credential manager? No

Additional context

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority-highProduction outage - this quarter or at least next quarterseverity-highBug for which there may be workaround but limits the usage of the Zowe for major use cases

Type

No type
No fields configured for issues without a type.

Projects

Status
Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions