IBM / zopeneditor-about

IBM Z Open Editor: File issues here!
https://ibm.github.io/zopeneditor-about
Apache License 2.0
49 stars 20 forks source link

Editor version 3.2.2 cannot fetch COPYbooks. #357

Closed COBOL-Erik closed 11 months ago

COBOL-Erik commented 1 year ago

Development environment used

Problem Description

Detailed steps for reproducing the problem:

  1. Pick a COBOL program via Zowe Explorer (dataset member opened successfully, so Zowe works as expected)

Observed behavior

image

Expected behavior

This works in previous versions of IBM Z Open Editor. The bug was introduced in v3.2.2.

phaumer commented 1 year ago

@COBOL-Erik thanks for reporting this. Can you provide more steps to reproduce the error perhaps snippets from your log? Are you just opening a file and get the errors when the editor tries to load the copybooks? This is a commonly used function so we need to figure out what goes wrong in your case.

COBOL-Erik commented 1 year ago

I get this as soon as I open a COBOL member in my PDS with Zowe Explorer. Here is the log: 2023-10-02T15:40:01.304+02:00 INFO : Zowe Explorer was modified for IBM Remote System Explorer API (RSE API) support by IBM Z Open Editor. 2023-10-02T15:40:01.366+02:00 INFO : IBM Z Open Editor extension has (re)started. 2023-10-02T15:40:42.093+02:00 ERROR: ZoweResourceResolver.checkMVSConnection: MVS connection check failed for profile zosmf_SEBz with HTTP Error 401 - Unauthorized 2023-10-02T15:40:46.723+02:00 INFO : ZoweViews.stopResolving: Stopping remote file resolving due to invalid credentials for the Zowe CLI profile. To resume remote file resolving for {0} files, use the "IBM Z Open Editor: Reload Zowe Profiles" command palette option or restart VS Code. 2023-10-02T15:40:46.724+02:00 INFO : ZoweViews.stopResolving: Stopping remote file resolving due to invalid credentials for the Zowe CLI profile. To resume remote file resolving for {0} files, use the "IBM Z Open Editor: Reload Zowe Profiles" command palette option or restart VS Code. 2023-10-02T15:40:46.725+02:00 WARN : The COBOL language server requested the include file "xxx", which was not found. enforceCaseSensitiveIncludeFileNames was set to false. Check your Zowe CLI profile and property group settings and if you have not already done so, switch to the "DEBUG" log level for more information. 2023-10-02T15:40:46.725+02:00 INFO : ZoweViews.stopResolving: Stopping remote file resolving due to invalid credentials for the Zowe CLI profile. To resume remote file resolving for {0} files, use the "IBM Z Open Editor: Reload Zowe Profiles" command palette option or restart VS Code.

Again, note that everything works fine when I Install Another Version of the IBM Z Open Editor.

COBOL-Erik commented 1 year ago

(I removed the original include file name and changed it to "xxx". The last two message lines occur for every COPY statement in the source.)

phaumer commented 1 year ago

@COBOL-Erik thanks for the details. I not able to reproduce the problem, unfortunately. If you enable DEBUG level logging as described here you will get more output. As you are a customer you could open a ticket with tech support and then we could exchange full log files in a secure way. Mention my name in the ticket and we could even do a screen sharing session.

However, this is how the DEBUG log would look like when it is working.

2023-10-02T11:41:40.932-07:00 DEBUG: ZLanguagesResourceResolver.documentRequested: The COBOL language server requested the following include file: "CUSTCOPY". The ID for this request was assigned as "m7pqns" There are 1 pending requests being processed.
2023-10-02T11:41:40.933-07:00 DEBUG: ZLanguagesResourceResolver.findIncludeFiles(RequestId:m7pqns): Started looking for "CUSTCOPY" in 1 property groups: [cobol-copybooks] and will search in that order.
2023-10-02T11:41:40.933-07:00 DEBUG: ZLanguagesResourceResolver: The download queue has been configured to maximally perform 10 parallel downloads. You can change this value with the "zopeneditor.zowe.{maximumParallelFileDownloads}" user setting.
2023-10-02T11:41:40.934-07:00 DEBUG: ZoweResourceResolver.checkMVSConnection: Running a Zowe profile connection test using the profile "devtest25.zosmf" by reading data set "sys1.proclib".
2023-10-02T11:41:41.498-07:00 DEBUG: ZoweResourceResolver.downloadMVSDataset(RequestId:m7pqns): Looking for data set member "IBMUSER.SAMPLE.COBCOPY(CUSTCOPY)" on MVS using Zowe CLI Profile "devtest25.zosmf".
2023-10-02T11:41:42.120-07:00 DEBUG: ZoweResourceResolver.downloadMVSDataset(RequestId:m7pqns): Data set member "IBMUSER.SAMPLE.COBCOPY(CUSTCOPY)" was found and content is being downloaded to "/Users/phaumer/.vscode/extensions/ibm.zopeneditor-3.2.2/resources/temp/zopeneditor/_D_/devtest25.zosmf/IBMUSER.SAMPLE.COBCOPY/CUSTCOPY.cpy".

I assume that in your case the connection test fails. In Debug mode though there should be more error messages that we could look at. The important information to check also that in all cases the same profile is being used.

COBOL-Erik commented 12 months ago

OK. I have opened a case; I mentioned your name.

FALLAI-Denis commented 12 months ago

Hi,

Problem is:

2023-10-02T15:40:42.093+02:00 ERROR: ZoweResourceResolver.checkMVSConnection: MVS connection check failed for profile zosmf_SEBz with HTTP Error 401 - Unauthorized

We experience some problems for some users like this one...

ZOE/ZE cannot resynchronize the password stored by the Zowe profile. The solution was to issue a zowe cli command from the VS Code terminal, from a folder in the VS Code workspace, for example a file list request. In this case the zowe cli command revalidates the credentials and updates the profile used par ZOE/ZE.

Can you try this and report result here?

COBOL-Erik commented 11 months ago

I have run a number of Zowe commands in the VSC terminal in the workspace, but it does not seem to help with the editor and includes. But again, it works fine with version 3.2.1!

phaumer commented 11 months ago

Closing as this was solved with the help of tech support.