sasjs / server

Build Apps on Base SAS
https://server.sasjs.io
MIT License
20 stars 3 forks source link

session crashed since 0.17.3 on Windows #271

Closed Jiefei-Wang closed 2 years ago

Jiefei-Wang commented 2 years ago

Hello, thanks for making this interesting project. I updated the server to 0.17.4 and observed a fatal error. The session crashes whenever I try to run any SAS code. There is no output on the web. I tried all the old versions and found out that the latest runnable one is 0.17.2, so something is not right since 0.17.3. Here is the error from 0.17.3. I hope this can be helpful to locate the issue. Please let me know if there is anything I need to post.

Startup message

sasLoc:  C:/Program Files/SASHome/SASFoundation/9.4/sas.exe
sasDrive:  C:\Users\jiewang\Documents\SAS\sasjs_root
sasLogs:  C:\Users\jiewang\Documents\SAS\sasjs_root\logs
runTimes:  [ 'sas' ]
Writing Logs to : C:\Users\jiewang\Documents\SAS\sasjs_root\logs\20220902160241.log
All CORS Requests are enabled for: []
Copying Macros from container to drive(tmp).
Macros Drive Path: C:\Users\jiewang\Documents\SAS\sasjs_root\sasjscore
App Stream Config loaded!
PROTOCOL:  http
⚡️[server]: Server is running at http://localhost:5000

Error when run SAS code

session crashed 20220902160247-93675-1662134567126 Error: Command failed: C:/Program Files/SASHome/SASFoundation/9.4/sas.exe -SYSIN C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160247-93675-1662134567126\code.sas -LOG C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160247-93675-1662134567126\log.log -PRINT C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160247-93675-1662134567126\output.lst -WORK C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160247-93675-1662134567126 -AUTOEXEC C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160247-93675-1662134567126\autoexec.sas -nosplash -icon -nodms -noterminal -nostatuswin -SASINITIALFOLDER -nologo

session crashed! while waiting to be ready Error: Command failed: C:/Program Files/SASHome/SASFoundation/9.4/sas.exe -SYSIN C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160247-93675-1662134567126\code.sas -LOG C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160247-93675-1662134567126\log.log -PRINT C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160247-93675-1662134567126\output.lst -WORK C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160247-93675-1662134567126 -AUTOEXEC C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160247-93675-1662134567126\autoexec.sas -nosplash -icon -nodms -noterminal -nostatuswin -SASINITIALFOLDER -nologo

session crashed 20220902160248-98959-1662134568638 Error: Command failed: C:/Program Files/SASHome/SASFoundation/9.4/sas.exe -SYSIN C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160248-98959-1662134568638\code.sas -LOG C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160248-98959-1662134568638\log.log -PRINT C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160248-98959-1662134568638\output.lst -WORK C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160248-98959-1662134568638 -AUTOEXEC C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160248-98959-1662134568638\autoexec.sas -nosplash -icon -nodms -noterminal -nostatuswin -SASINITIALFOLDER -nologo

session crashed! while waiting to be ready Error: Command failed: C:/Program Files/SASHome/SASFoundation/9.4/sas.exe -SYSIN C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160248-98959-1662134568638\code.sas -LOG C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160248-98959-1662134568638\log.log -PRINT C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160248-98959-1662134568638\output.lst -WORK C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160248-98959-1662134568638 -AUTOEXEC C:\Users\jiewang\Documents\SAS\sasjs_root\sessions\20220902160248-98959-1662134568638\autoexec.sas -nosplash -icon -nodms -noterminal -nostatuswin -SASINITIALFOLDER -nologo
allanbowe commented 2 years ago

Hi @Jiefei-Wang - thanks for raising! We don't have windows so was difficult to test this one, I believe I know where the issue is, looking into it now

allanbowe commented 2 years ago

@Jiefei-Wang - version 0.17.5 should be available in a minute or two, if you can confirm it's working fine I'll close the ticket

sasjsbot commented 2 years ago

:tada: This issue has been resolved in version 0.17.5 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Jiefei-Wang commented 2 years ago

Hello @allanbowe, thanks for the quick response! The problem has been fixed!

I just start using SASjs so I have another simple question. If I print the table from the localhost web interface, I can see the printed table in text format from the log panel, there is no output like the regular SAS output. Is it normal? My ultimate goal is to use SASjs in Visual Studio Code. I have installed the SASjs extension, but VS code also gives me the text output. Is there any way to see the result in a pretty format? Thanks!

allanbowe commented 2 years ago

I did reply to this (by email) but seems it didn't get attached to the issue.

If you want this right now, I suggest writing your ODS output to the _WEBOUT fileref.

In the meantime we'll look at supporting the output destination as a first class citizen in SASjs Server. It is also requested here: https://github.com/sasjs/vscode-extension/issues/336

allanbowe commented 2 years ago

@Jiefei-Wang - if you are just wanting to view tables in SAS, you can also try Data Controller. Just download the server.json.zip file from here: https://git.4gl.io/dc/deploy

And upload it to appStream.

allanbowe commented 2 years ago

If you examine the log you will see a fileref named _WEBOUT

Send your ODS output there to view immediately

If you’d like a dedicated output tab for ods content, feel free to raise an issue, we could probably do that

/Allan

On Fri, 2 Sep 2022 at 21:34, Jiefei Wang @.***> wrote:

Hello @allanbowe https://github.com/allanbowe, thanks for the quick response! The problem has been fixed!

I just start using SASjs so I have another simple question. If I print the table, I can see the printed table in text format from the log panel, there is no output like the regular SAS output. Is it normal? Is there any way to see the result in a pretty format? Thanks!

— Reply to this email directly, view it on GitHub https://github.com/sasjs/server/issues/271#issuecomment-1235875426, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBXIB5ES2ZIHNDYAK6XFDTV4JQFDANCNFSM6AAAAAAQDM6WHQ . You are receiving this because you were mentioned.Message ID: @.***>

allanbowe commented 1 year ago

@Jiefei-Wang - the latest version of SASjs Server now supports PRINT (ODS) output in Studio.