-
Notifications
You must be signed in to change notification settings - Fork 92
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
Error encountered when saving USS file #1732
Comments
Thank you for creating a bug report. If you haven't already, please ensure you have provided steps to reproduce it and as much context as possible. |
Thank you @mmoore96. I can see the message when the saved content conflict with file in mainframe. Could you help to check if your file is conflict with file in mainframe? Thank you! |
Hello, @tiantn, This morning, I tried to edit a .java file. I got the Rest api failure. Other devs at my work also have experienced the same thing. We are switching to z/OSMF soon so this will not long be an issue as I supposed this has to do with Zowe using ftp. Note: I hope this helps! |
Hi @mmoore96 , thank you for the details. I think I recreate the situation now. I do the following:
I found the issue caused by the conflict of line ending setting. In vscode, the default setting is LF, and when saved it to mainframe, the line ending is change to CRLF. The setting in vscode when I edit: The setting after I pull from mainframe: To verify the guess, I set it to CRLF before I first save it. Then I edit the file again and save it. It saved successfully. I also try the .txt file, no same error found. Maybe we need pay more attention on special type of files when edit them. If you are convenient could you help to verify on your environment with CRLF ? Thank you very much! |
Thank you, @tiantn, for doing this research. In conclusion:
The only way to save successfully is by entering Cntl + S until no error is thrown and the file is saved. I also get the same error with .txt files. This only happens in USS not with Datasets. |
Sorry, I just want to relate the problem to the PR. Not aware it is closed. |
@tiantn However, there is an edge case in which you can still throw an error that is not expected:
You can select "Pull from Mainframe" again and then try to make an edit and it will save successfully. As a user, I should not have to pull from the mainframe in order to avoid this error. This causes my code changes to be removed and is a headache. I do understand that there is a chance someone else has made a change to the file since your last pull. However, in my experience there is quite rare unless two people are working on the same file which does not happen very often. We have our own directories/pds' that we edit our own version of a program in. You could argue that if the same user used tn3270 to make a change then went back to zowe and started writing code then that would be problematic. However, the user should know that they need to pull from mainframe first. I think a good solution to fix this problem would be to ask to user if they would like to override the save conflict. Thank you! |
Describe the bug
When I am using trying to save a USS file, it throws an error saying:
Zowe Explorer FTP Extension: Rest API failure with HTTP(S) status 412
I then have to continuously attempt to save the file, until finally it saves. It usually takes 5-10 'saves' before it is successful.
I have not experienced this issue with Data Sets.
It was fine prior to the release of v1.22.0
To Reproduce
Expected behavior
After editing the USS File, it should be saved on the first attempt.
Screenshots
Log
[2022/04/05 16:08:00.529] [ERROR] [extension.js:73] Error encountered when saving USS file: {}
Desktop (please complete the following information):
Additional context
n/a
The text was updated successfully, but these errors were encountered: