CANDELbio / mantis-viewer

Electron-based multiplexed imaging viewer
Apache License 2.0
22 stars 7 forks source link

Images not importing on Ubuntu #67

Closed cliu72 closed 2 years ago

cliu72 commented 2 years ago

I downloaded mantis-viewer_1.2.2-rc.6_amd64.deb and installed it on an Ubuntu 16.04.7 LTS machine. When I tried to import images using File -> Open -> New Project or File -> Open -> Image, I was able to select the correct directory, but when I click "Import", it takes me back to the Welcome page (where I see the "Welcome to Mantis Viewer!" message) and the images don't seem to be imported.

rj3d commented 2 years ago

Thanks for the report! I've added this to our task tracking system. I will get to this in the next week or so, and I'll post back when I have an update or a fix.

cliu72 commented 2 years ago

Great, thanks so much! Please let me know if you need any additional details from me.

rj3d commented 2 years ago

Sorry for the delay @cliu72! I think I have this fixed. Can you try downloading again from the latest release and let me know if it works?

rj3d commented 2 years ago

I just put out a new version v1.2.2-beta.0 that has a few minor updates compared to the one I linked in the previous comment. Both should work on Ubuntu.

cliu72 commented 2 years ago

Hi Rob! Thanks for the response. I uninstalled it and re-installed the latest version, but I'm running into the same issue (I tried both versions you linked). Please let me know if I can provide more info somehow to help.

cliu72 commented 2 years ago

I'm using VNC on a Google cloud instance - not sure if that may be part of the problem.

rj3d commented 2 years ago

Happy to help!

Thanks for the info on how you're running it. I'll try spinning up a Google cloud instance and testing there.

Can you check the version via Help -> About to make sure that the new beta version is being successfully installed?

Can you send me the logs? First, open the developer tools via Help -> Open Developer Tools, and then click the Console button at the top of the developer tools. Next, try to open your image folder, and then send me the screenshot of whatever pops up in the console.

cliu72 commented 2 years ago

Help -> About: image

Developer logs: image

rj3d commented 2 years ago

Those are helpful, thanks!

Unfortunately, it looks like the problem is your version of Ubuntu. The glibc version on your machine is too old to work with Mantis. I would build an image for Ubuntu 16.04, but my build service doesn't support that version anymore.

Your best bet is to build and install Mantis from source in this case. It's pretty straightforward, and I would be happy to walk you through it. Let me know if you want to go down this route, and I'll put together a guide for you.

cliu72 commented 2 years ago

Got it, thanks! This isn't a huge deal. Basically I do a lot of analysis on Google cloud and thought it would be helpful to use Mantis right on the cloud instance since that is where all my data is - but thus far, I've just been moving the data to a local machine to use Mantis (and that's been fine).

I think if you have some spare time, it'd be great if you could put together a guide and I could try installing from source, but this is definitely low priority.

rj3d commented 2 years ago

Alright, I put a tutorial together. It's a few more steps than would be normally needed because Ubuntu 16.04 has an outdated version of python.

First you need to get a newer version of python.

sudo apt update

sudo apt install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl \
git

git clone https://github.com/pyenv/pyenv.git ~/.pyenv

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc

exec "$SHELL"

pyenv install 3.7.13

Next, you need to install Node and NPM.

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash 

source ~/.bashrc

nvm install 16

Finally, you need to get the Mantis repo and then build and install it.

git clone https://github.com/ParkerICI/mantis-viewer.git ~/mantis-viewer

cd ~/mantis-viewer

pyenv local 3.7.13

npm install

npm run dist-linux

sudo apt install ./dist/mantis-viewer_1.2.2-beta.0_amd64.deb

I just tested this out on a Google Cloud instance running Ubunti 16.04 Pro, and I was able to open and view a couple of images. Hopefully it works for you. If not, let me know if you run into any issues!

cliu72 commented 2 years ago

Awesome! It worked! Thanks so much for your help (wish I could 5-star a github response).

rj3d commented 2 years ago

Great, I'm glad it worked for you! Haha, thanks for the review!

rebeccagj commented 6 months ago

Thank you for this! Running Ubuntu 20.04.6 locally and was also having this issue, whereas the Windows half of my dual boot would import the same projects correctly.