Open inascape opened 3 years ago
I don't have access to either a Mac or Matlab R2021a/b, but we can't try something.
The "Unavailable Matlab Session" error fires before the execution of the Java "part" of the package, so thankfully we have a lot less code to debug.
First of all, check that the Matlab shared session is the correct one, typing matlab.engine.engineName
on your Matlab command window: you should see AtomMatlabEngine
as result. Then look inside your Matlab temporary directory (the one in the package config) while the AtomMatlabEngine
shared session of Matlab is running: you should find an empty file named AtomMatlabEngine
.
Let me know the results of these two tests!
In the file AtomMatlabEngine.epf there was a sing line:
"domain_socket:/tmp/AtomMatlabEngine:boost_binary"
Getting the name of the session in MATLAB results in: 'AtomMatlabEngine' which is correct
Ok, that's different from Windows: here the temp file has no extension and is empty.
Can you try to modify line 596 of atom-matlab-editor.js
, adding the correct file extension?
If I understood correctly,you have to change from
var file = path.join(MatlabEditor.getMatlabTempDir(), 'AtomMatlabEngine')
to
var file = path.join(MatlabEditor.getMatlabTempDir(), 'AtomMatlabEngine.epf')
Let me know if this works!
Just to do some testing I replaced hard coded the temporary directory of AtomMatlabEngine.epf. That helped resolve the issue (I will have to try and fix that eventually). Then after installing busy-signal to resolve some other issues I got your script to execute. Then I ran into some problems with java. I believe its permission issues with MATLABS java engine. Here is the log. Still trying to see if I can get this to work. If you have any suggestions that might help let me know
Cannot get the MATLAB session to connect with atom. No console errors. Made sure the shared session was running on MATLAB. Tested on an intel mac on both 2021a and 2021b (pre release). Identical issue on both. No packages installed except this one and another one that adds support for the MATLAB language to atom. Attached is my config as well as some other useful information