zowe / zowe-explorer-vscode

Visual Studio Code Extension for Zowe, which lets users interact with z/OS Data Sets, Unix System Services, and Jobs on a remote mainframe instance. Powered by Zowe SDKs.
Eclipse Public License 2.0
173 stars 92 forks source link

Saving data sets and files begins to silently fail #76

Closed ChrisBoehmCA closed 5 years ago

ChrisBoehmCA commented 5 years ago

This seems to happen to various users. We know a workaround for now that seems to resolve the problem, but don't know the root cause.

If you uninstall the extension, then go to your home directory (usually c:/users/youruserid on windows, ~ on linux/mac) /.vscode/extensions/ and delete the folders starting with "zowe". If you then reinstall the extension, the saving issue should be fixed.

Alexandru-Dumitru commented 5 years ago

Had hit the same issue today, and this saved me, as I am preparing some presentation for tomorrow. Thanks for sharing :)

t-o-m-e-k commented 5 years ago

In my case, the problem is back as soon as VSCode is restarted. I have tried different things and found that deleting the local files is not necessary, not even reinstallation, it was enough to disable and re-enable the extension to make it work again.

vvvlc commented 5 years ago

Disabling and Enabling extension does not help, ctrl+s or Safe save button does not save changes to mainframe. I upgraded to latest 0.15.1 it does not help as well.

ctrl+s does not add new messages to zowe.log Safe save adds these messages to zowe.log

[2019/05/10 14:54:50.130] [DEBUG] [extension.js:920] safe save requested for node: AAA
[2019/05/10 14:54:50.149] [DEBUG] [extension.js:939] Invoking safesave for data set VLCVI01.TOOLS.JCL(AAA)
[2019/05/10 14:54:50.175] [DEBUG] [Download.js:75] Endpoint: /zosmf/restfiles/ds/VLCVI01.TOOLS.JCL(AAA)
[2019/05/10 14:54:50.965] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 6
[2019/05/10 14:54:50.982] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient
t-o-m-e-k commented 5 years ago

It works every time for me. Have you clicked on "reload required" after disabling? I forgot to mention it.

It's : Disable / Reload Required / Enable

vvvlc commented 5 years ago

I restarted VScode and deleted content of .vscode/.zowexxxx and it did not help as well. What version of extension do you use?

pá 10. 5. 2019 v 15:12 odesílatel Tomasz Tulinski notifications@github.com napsal:

It works every time for me. Have you clicked on "reload required" after disabling? I forgot to mention it.

It's : Disable / Reload Required / Enable

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/zowe/vscode-extension-for-zowe/issues/76#issuecomment-491283732, or mute the thread https://github.com/notifications/unsubscribe-auth/ADY6XID3U66HQT4F6C4QMBDPUVYD3ANCNFSM4HL2UF2Q .

-- V.

t-o-m-e-k commented 5 years ago

I was doing same things before. Even deleting .vscode and .zowe directories and reinstalling both zowe and vscode. None of it was working until I tried reinstalling the extension or going with disable/enable.

I'm using extension version 0.15.1 and zowe cli 2.22.0

ChrisBoehmCA commented 5 years ago

Guys, really sorry you're experiencing this issue. I will try to add logging that might help diagnose what's happening. Really sorry for the inconvenience. Hopefully we will figure out what is causing this soon

ChrisBoehmCA commented 5 years ago

I published some additional logging. When you're encountering the issue, check ~/.vscode/extensions/zowe.vscode-extension-for-zowe-xxx(latest version)/logs/zowe.log and see if you can see messages like File was saved -- determining whether the file is a USS file or Data set.. If you do, paste the surrounding log messages here or in a pastebin. Might be able to determine what is causing this problem Thanks -Chris

t-o-m-e-k commented 5 years ago

I've tested it today. Below is the contents of zowe.log with description of my actions in vscode:

Step1: open a PDS member, edit and save with ctrl + s [no chagnes are visible on MF side]

[2019/05/17 13:41:19.814] [DEBUG] [extension.js:875] opening physical sequential data set from label TT9TTU1.COMMON.CNTL(TEST1) [2019/05/17 13:41:19.817] [DEBUG] [Download.js:75] Endpoint: /zosmf/restfiles/ds/TT9TTU1.COMMON.CNTL(TEST1) [2019/05/17 13:41:20.059] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 9 [2019/05/17 13:41:20.060] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient [2019/05/17 13:41:44.284] [DEBUG] [extension.js:875] opening physical sequential data set from label TT9TTU1.COMMON.CNTL(TEST1) [2019/05/17 13:41:44.513] [DEBUG] [extension.js:875] opening physical sequential data set from label TT9TTU1.COMMON.CNTL(TEST1) [2019/05/17 13:42:02.489] [DEBUG] [extension.js:88] File was saved -- determining whether the file is a USS file or Data set. Comparing c:\Users\tulintom.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp_D\TT9TTU1.COMMON.CNTL(TEST1)[tt9ttu1@zin1] against directory C:\Users\tulintom.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp_D and C:\Users\tulintom.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp_U [2019/05/17 13:42:02.491] [DEBUG] [extension.js:98] File c:\Users\tulintom.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp_D\TT9TTU1.COMMON.CNTL(TEST1)[tt9ttu1@zin1] is not a data set or USS file

Step2: Safe save icon, choose to merge from local disk. [again, no chagnes are visible on MF side]

[2019/05/17 13:50:43.469] [DEBUG] [extension.js:1020] safe save requested for node: TEST1 [2019/05/17 13:50:43.471] [DEBUG] [extension.js:1039] Invoking safesave for data set TT9TTU1.COMMON.CNTL(TEST1) [2019/05/17 13:50:43.473] [DEBUG] [Download.js:75] Endpoint: /zosmf/restfiles/ds/TT9TTU1.COMMON.CNTL(TEST1) [2019/05/17 13:50:43.750] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 9 [2019/05/17 13:50:43.752] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient [2019/05/17 13:51:27.083] [DEBUG] [extension.js:88] File was saved -- determining whether the file is a USS file or Data set. Comparing c:\Users\tulintom.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp_D\TT9TTU1.COMMON.CNTL(TEST1)[tt9ttu1@zin1] against directory C:\Users\tulintom.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp_D and C:\Users\tulintom.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp_U [2019/05/17 13:51:27.085] [DEBUG] [extension.js:98] File c:\Users\tulintom.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp_D\TT9TTU1.COMMON.CNTL(TEST1)[tt9ttu1@zin1] is not a data set or USS file

Step 3: Safe save again, no popup this time, but vscode refreshes the file contents and edits are gone.

[2019/05/17 13:51:47.851] [DEBUG] [extension.js:1020] safe save requested for node: TEST1 [2019/05/17 13:51:47.853] [DEBUG] [extension.js:1039] Invoking safesave for data set TT9TTU1.COMMON.CNTL(TEST1) [2019/05/17 13:51:47.857] [DEBUG] [Download.js:75] Endpoint: /zosmf/restfiles/ds/TT9TTU1.COMMON.CNTL(TEST1) [2019/05/17 13:51:48.106] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 9 [2019/05/17 13:51:48.108] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient

ChrisBoehmCA commented 5 years ago

Thanks a lot for the logs. This seems like a big clue:

[2019/05/17 13:51:27.085] [DEBUG] [extension.js:98] File c:\Users\tulintom.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp_D_\TT9TTU1.COMMON.CNTL(TEST1)[tt9ttu1@zin1] is not a data set or USS file

Looks like the path returns a lower case c in one case and we're searching for an upper case C. Let me try a fix and see if it works for you guys

vvvlc commented 5 years ago

Hi this is what I get when I press ctrl+s

[2019/05/17 15:23:19.298] [DEBUG] [extension.js:875] opening physical sequential data set from label VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:23:19.896] [DEBUG] [extension.js:875] opening physical sequential data set from label VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:23:27.710] [DEBUG] [extension.js:88] File was saved -- determining whether the file is a USS file or Data set.
 Comparing c:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp\_D_\VLCVI01.ZOWE.JCL(ZOWE)[ca32] against directory C:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp\_D_ and C:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp\_U_
[2019/05/17 15:23:27.717] [DEBUG] [extension.js:98] File c:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp\_D_\VLCVI01.ZOWE.JCL(ZOWE)[ca32] is not a data set or USS file 

this is what I get fore safe save

[2019/05/17 15:25:23.499] [DEBUG] [extension.js:1020] safe save requested for node: ZOWE
[2019/05/17 15:25:23.518] [DEBUG] [extension.js:1039] Invoking safesave for data set VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:25:23.525] [DEBUG] [Download.js:75] Endpoint: /zosmf/restfiles/ds/VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:25:24.280] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 972
[2019/05/17 15:25:24.288] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient
[2019/05/17 15:25:24.397] [DEBUG] [extension.js:88] File was saved -- determining whether the file is a USS file or Data set.
 Comparing c:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp\_D_\VLCVI01.ZOWE.JCL(ZOWE)[ca32] against directory C:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp\_D_ and C:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp\_U_
[2019/05/17 15:25:24.402] [DEBUG] [extension.js:98] File c:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.0\resources\temp\_D_\VLCVI01.ZOWE.JCL(ZOWE)[ca32] is not a data set or USS file 

in both cases nothing gets saved.

ChrisBoehmCA commented 5 years ago

Thanks for the logs, Vitek. You have the same behavior as Tomek where it seems like the path doesn't match case sensitively (c:/ vs C:/). Hopefully #83 will fix this for you. I intend to publish today

ChrisBoehmCA commented 5 years ago

Vitek and Tomek, please try updating your version of the extension and see if the issue is resolved for you

vvvlc commented 5 years ago

It works for me. for sake of completenss here is my log

[2019/05/17 15:58:09.664] [DEBUG] [extension.js:91] File is a data set-- saving 
[2019/05/17 15:58:09.668] [DEBUG] [extension.js:1068] requested to save data set: c:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.1\resources\temp\_D_\VLCVI01.ZOWE.JCL(ZOWE)[ca32]
[2019/05/17 15:58:09.673] [DEBUG] [extension.js:1090] couldn't find session node, loading profile with CLI profile manager
[2019/05/17 15:58:14.343] [DEBUG] [ZosmfSession.js:26] Creating a z/OSMF session from the profile named %s
[2019/05/17 15:58:14.765] [DEBUG] [extension.js:1099] Saving file VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:58:15.331] [INFO] [Upload.js:200] Uploading path c:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.1\resources\temp\_D_\VLCVI01.ZOWE.JCL(ZOWE)[ca32] to VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:58:15.361] [DEBUG] [List.js:105] Endpoint: /zosmf/restfiles/ds?dslevel=VLCVI01.ZOWE.JCL
[2019/05/17 15:58:16.016] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 371
[2019/05/17 15:58:16.022] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient
[2019/05/17 15:58:16.034] [DEBUG] [AbstractRestClient.js:109] will write data for request
[2019/05/17 15:58:16.669] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 0
[2019/05/17 15:58:16.675] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient
[2019/05/17 15:58:16.683] [INFO] [Upload.js:293] Success Uploaded data From c:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.1\resources\temp\_D_\VLCVI01.ZOWE.JCL(ZOWE)[ca32] To VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:58:18.582] [DEBUG] [extension.js:876] opening physical sequential data set from label VLCVI01.ZOWE.JCL(ZOWES101)
[2019/05/17 15:58:18.609] [DEBUG] [Download.js:75] Endpoint: /zosmf/restfiles/ds/VLCVI01.ZOWE.JCL(ZOWES101)
[2019/05/17 15:58:19.258] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 511
[2019/05/17 15:58:19.279] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient
[2019/05/17 15:58:20.263] [DEBUG] [extension.js:876] opening physical sequential data set from label VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:58:20.593] [DEBUG] [extension.js:876] opening physical sequential data set from label VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:59:11.834] [DEBUG] [extension.js:1021] safe save requested for node: ZOWE
[2019/05/17 15:59:11.866] [DEBUG] [extension.js:1040] Invoking safesave for data set VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:59:11.885] [DEBUG] [Download.js:75] Endpoint: /zosmf/restfiles/ds/VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:59:12.488] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 975
[2019/05/17 15:59:12.499] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient
[2019/05/17 15:59:32.094] [DEBUG] [extension.js:88] File was saved -- determining whether the file is a USS file or Data set.
 Comparing (case insensitive) c:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.1\resources\temp\_D_\VLCVI01.ZOWE.JCL(ZOWE)[ca32] against directory C:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.1\resources\temp\_D_ and C:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.1\resources\temp\_U_
[2019/05/17 15:59:32.105] [DEBUG] [extension.js:91] File is a data set-- saving 
[2019/05/17 15:59:32.115] [DEBUG] [extension.js:1068] requested to save data set: c:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.1\resources\temp\_D_\VLCVI01.ZOWE.JCL(ZOWE)[ca32]
[2019/05/17 15:59:32.136] [DEBUG] [extension.js:1090] couldn't find session node, loading profile with CLI profile manager
[2019/05/17 15:59:40.091] [DEBUG] [ZosmfSession.js:26] Creating a z/OSMF session from the profile named %s
[2019/05/17 15:59:40.755] [DEBUG] [extension.js:1099] Saving file VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:59:41.470] [INFO] [Upload.js:200] Uploading path c:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.1\resources\temp\_D_\VLCVI01.ZOWE.JCL(ZOWE)[ca32] to VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:59:41.506] [DEBUG] [List.js:105] Endpoint: /zosmf/restfiles/ds?dslevel=VLCVI01.ZOWE.JCL
[2019/05/17 15:59:41.694] [DEBUG] [Download.js:75] Endpoint: /zosmf/restfiles/ds/VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:59:41.745] [DEBUG] [Download.js:75] Endpoint: /zosmf/restfiles/ds/VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:59:41.766] [DEBUG] [extension.js:876] opening physical sequential data set from label VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:59:41.800] [DEBUG] [extension.js:876] opening physical sequential data set from label VLCVI01.ZOWE.JCL(ZOWE)
[2019/05/17 15:59:42.421] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 975
[2019/05/17 15:59:42.440] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient
[2019/05/17 15:59:42.722] [ERROR] [extension.js:887] Error encountered when opening data set! {}
[2019/05/17 15:59:42.810] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 371
[2019/05/17 15:59:42.819] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient
[2019/05/17 15:59:42.837] [DEBUG] [AbstractRestClient.js:109] will write data for request
[2019/05/17 15:59:42.856] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 975
[2019/05/17 15:59:42.860] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient
[2019/05/17 15:59:43.505] [DEBUG] [AbstractRestClient.js:295] Content length of response is: 0
[2019/05/17 15:59:43.508] [DEBUG] [AbstractRestClient.js:371] onEnd() called for rest client ZosmfRestClient
[2019/05/17 15:59:43.512] [INFO] [Upload.js:293] Success Uploaded data From c:\Users\vlcvi01\Box Sync\vlcvi01\.vscode\extensions\zowe.vscode-extension-for-zowe-0.16.1\resources\temp\_D_\VLCVI01.ZOWE.JCL(ZOWE)[ca32] To VLCVI01.ZOWE.JCL(ZOWE)
t-o-m-e-k commented 5 years ago

Works for me as well. Thank you!

ChrisBoehmCA commented 5 years ago

Yay! I'm glad. Closing this issue now then.