Closed krinsman closed 4 years ago
@wl2776 This is obviously not good. Are you using the newest version of JupyterLab (or at least the JupyterLab package from Conda Forge)?
I am not sure right now what the fix is but it is obviously a breaking issue, thank you for bring it to our attention @wl2776!
Maybe can you post the output of conda list
so we can compare environments? What operating system are you running on? (See here for formatting collapsible things)
@tslaton This looks exactly like the error we say with JupyterLab-cpustatus, right? Are we sure this is a bug we can fix on our side, or do you think we should open an issue with JupyterLab?
It seems suspicious that the same error would happen independently in two different extensions written in two very different ways if there was no problem with breaking changes to JupyterLab extension API.
I'm not able to reproduce the error on this machine with JupyterLab Slurm, but I got the same error with JupyterLab-cpustatus on Friday on a different machine. I'm not sure what to do about this.
I'm not 100% sure what is causing this issue, but I was seeing something similar on a branch I made recently before apparently fixing it with this commit. In working on it, it seemed to be that downgrading from React 16.9.0
to 16.8.4
was the fix.
I believe different versions of JupyterLab are built with different versions of React, and this problem might be occurring when the React version used to build JupyterLab and the version used to build the extension are mismatched.
@wl2776 Can you confirm that you're building from the master git branch of JupyterLab slurm?
Two of the development git branches use React, but master shouldn't be using it.
We want to see whether we can isolate your problem as an issue with React or not.
I use git-prompt.sh to see which branch of the repository I'm in; I find Git nearly unusable without it: https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh#L15
Change your PS1 to call __git_ps1 as
# command-substitution: # Bash: PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
@krinsman, yes, I can confirm, that I'm building from the master branch:
$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
@wl2776 Sorry if the following seems dodgy, I just want to rule out all other possibilities, so to confirm:
After force reinstalling JupyterLab, so that everything works but there's no JupyterLab-Slurm, once you reinstall JupyterLab-Slurm (and only JupyterLab-Slurm, no other extensions), the error reappears? (I.e. you are able to reproduce the error?)
You have no other JupyterLab extensions installed currently besides JupyterLab-Slurm?
You can check this by running jupyter labextension list
-- posting the output of that would also be helpful. For example: jupyter labextension list
JupyterLab v1.1.3
Known labextensions:
app dir: ~/.conda/envs/nbresuse/share/jupyter/lab
@jupyterlab/hub-extension v1.0.2 enabled OK
jupyterlab-slurm v0.1.3 enabled OK
jupyterlab-system-monitor v0.4.1 enabled OK
jupyterlab-topbar-extension v0.4.0 enabled OK
Our working theory right now is that when this orange error shows up, it has something to do with how React operates with an XML-like syntax, and so is connected with JupyterLab extensions that have React as a dependency.
However, the fact that the master branch of this extension does not have React as a dependency, and the fact that you are experiencing this issue when using the master branch, suggests that this theory is incorrect. In order to progress further, and brainstorm different theories for what is going wrong, I am asking the above two questions in order to confirm that the theory is incorrect.
Hmm... I've reinstalled jupyterlab-slurm. It has successfully reinstalled, and I see no orange errors.
I will add more details later after restarting jupyterlab daemon from systemctl. Currently there could be some unsaved notebooks, that could be lost otherwise.
UPDATE I've restarted the whole PC, where Jupyterlab runs. No errors, and jupyterlab-slurm is shown
This sounds like good news!
To clarify, after restarting, does or doesn't the react error still happen?
I thought we fixed something similar with the bug fix suggested by @andreas-h (Thank you again for that!), but I want to double check whether it worked for you too.
To clarify, you are doing git pull origin master
first to make sure the most up-to-date version (which includes the patch) is being used?
I've pulled from master and reinstalled jupyterlab-slurm once more. This time there were no errors about React, and no corruptions in Jupyterlab GUI
Awesome! I'll go ahead and close this for now, but feel free to let us know if the error reappears so we can reopen this issue or create a new one!
Oh yeah @wl2776 I forgot to mention as an update that I uploaded new versions of JupyterLab Slurm both to NPM and PyPI, so hopefully it won't be necessary to install from source any more to get working versions.
I've got corrupted jupyterlab after installation.
Restarting server and kernels did not help.
I've resolved this issue with reinstallation of jupyterlab (
conda install --force-reinstall jupyterlab
). However, jupyterlab-slurm extension has disappeared after this.Originally posted by @wl2776 in https://github.com/NERSC/jupyterlab-slurm/issues/27#issuecomment-528253678