Closed cvertee closed 6 months ago
Sometimes even after successful CSP compile, whenever i add something like alert(1) and hit save it just starts giving errors. Super rarely can fix this by adding spaces after/before html tags. Line count of errored file is ~1500 but sometimes can't compile files under 300-500 lines.
Looks like it doesn't check contents of the file on the server because whenever i add syntax errors etc it doesn't say anything about that. Maybe some issues with processing file locally?
@cvertee The Language Server plays no role in the saving of documents so that log isn't going to help us. For local files, this extension determines the name of the CSP file by seeing if the file's path contains a web application name, and then saves the file on the server with the file's name begin the path starting at the web application folder name. For example, if you had file src/csp/user/menu.csp
in your workspace and saved it, this extension would tell the server that the document name is csp/user/menu.csp
. CSP saves can fail if this name is wrong. The best way to check the cause of the save failure is to get a network trace using a tool like Wireshark so we can see the REST request and response packets.
@isc-bsaviano thanks for the response! Not sure if i will be able to use Wireshark. Maybe will think of something for corporate computer stuff
@cvertee You can use the web gateway's HTTP Trace facility. It doesn't require you to download any other software. The UI and functionality is rudimentary but it will get the info we need to investigate this. See the web gateway management pages docs and the HTTP Trace docs.
@isc-bsaviano Will try to look on that (or something else) later when i'll find the time, thanks.
Hi @cvertee, just checking in to see if the trace revealed anything.
@isc-bsaviano Hi. Not working with IRIS for now. Tried to get to Web Gateway but probably nobody will let me get there (not the admin and whatever) so still thinking on possible workarounds
Closing this since I can't reproduce it. @cvertee please re-open if you find reliable reproduction steps.
For some reason i get 'Failed to save file *.csp on the server' error in VSCode. Sometimes it does work, sometimes it doesn't. Even if i try to edit the same file i can get lucky and successfully compile it. But this probability is heavily random and can't figure out why this happens from time to time. In the Output tab ObjectScript writes successful compiles or errors while compiling CLS files. But when such save error happens in CSP file there is just nothing.
Language Server Output with verbose level only writes this when saving, no errors (uri contains path to file://)
IRIS Version: 2020.1 VSCode Version: 1.87.2 OS: Windows 10