Skip to content
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

MATLABWindow application failed to launch. Unable to launch the MATLABWindow #14

Open
xsro opened this issue Jun 11, 2021 · 3 comments
Open

Comments

@xsro
Copy link

xsro commented Jun 11, 2021

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

@acampbel
Copy link
Member

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!

@xsro
Copy link
Author

xsro commented Mar 19, 2022

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

@pablorcum
Copy link

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.

pablorcum added a commit to sync2brain/bossdevice-api-matlab that referenced this issue Aug 15, 2023
As a workaround we will build the documentation offline and push the HTML files to the repo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants