run-command
run-command copied to clipboard
MATLABWindow application failed to launch. Unable to launch the MATLABWindow
Hi, I am trying to use this action to convert my mlx in my repo to html for github pages, I meet error
{Error using matlab.internal.cef.webwindow (line 379)
MATLABWindow application failed to launch. Unable to launch the MATLABWindow
application. The exit code was: 1
Error in matlab.internal.webwindow/createImplementation (line 313)
implObj = matlab.internal.cef.webwindow(varargin{:});
Error in matlab.internal.webwindow (line 161)
obj.impl = obj.createImplementation(varargin{:});
Error in command_8f16c92d_c53e_449c_bf8b_deb032208d02 (line 1)
cd('/home/runner/work/university-learning-code/university-learning-code'); w =
matlab.internal.webwindow('http://mathworks.com');
}
I find one related post at https://www.mathworks.com/matlabcentral/answers/397138-why-do-i-get-a-matlabwindow-application-failed-to-launch-error-when-launching-live-editor-app-des
But I do not know how to fix this. Hope you can give some help
Hello @xsro,
This error is due to the fact that the internal function you are using requires a display to work correctly, and the GitHub hosted runners that actions use do not have a display.
First off, the team is working hard to provide an "export" capability from live scripts to html/pdf/etc that does not require a display, and hopefully this will be in an upcoming release. Until then, you may have luck using another CI service, such as CircleCI, to publish the live scripts to html for GitHub pages. You may be able to leverage the mathworks orb for this purpose. Hope this helps!
Hi @acampbel Thanks for your help. As the R2022a released,I do some test. Here is a brief report.
The initial error is:
Could not open file /home/runner/.matlab/R2022a/thisMatlab.pem. No such file or
directory.
Error in convert (line 21)
mlxs2html(task,0)
Error in command_a8583eac_5371_425f_a000_3806ed41b422 (line 1)
cd('/home/runner/work/university-learning-code/university-learning-code'); convert;
}
then I make a empty pem file,
DISPLAY environment variable must be set to a valid X11 display.
then I use Xvfb to create a DISPLAY,
Error executing JavaScript command:
JavaScript error: Uncaught ReferenceError: require is not defined at line 1
column 0 in
I got the same error in my job exporting HTML documentation from live scripts. Please see this log for more details.
As a workaround, I will generate the HTML files offline and commit them to the repository.