rkimoakbioinformatics / oakvar

Genomic variant analysis platform
Other
32 stars 8 forks source link

[BUG] Accessing GUI via 0.0.0.0 on WSL2 #50

Closed sinmojito closed 1 year ago

sinmojito commented 1 year ago

When attempting to access the GUI on WSL2 (Ubuntu distro) - the browser throws the error 'Unable to connect. Firefox can’t establish a connection to the server at 0.0.0.0:8080.' According to Networking considerations for WSL, when building a networking app in a Linux distribution on WSL, it can be accessed from a Windows browser using localhost, which is why I can access the application when manually changing the URL to http://localhost:8080. I wanted to ask if this behaviour is intended or if there's a configuration that should be adjusted for WSL. Also, I would appreciate confirmation on whether this would be different on native Linux, where 0.0.0.0 might work directly(which is what oakvar is mainly intended for I reckon).

To reproduce -

Following the tutorial up to 'ov gui exampleinput.sqlite' step on a WSL2 enabled machine should produce this error.

Desktop

Best, Mohit

rkimoakbioinformatics commented 1 year ago

Hi Mohit,

Thanks. I don't have access to WSL2 at this moment. Can you let me know what you get in WSL2 with the following?

import platform
print(platform.platform())
print(platform.system())
rkimoakbioinformatics commented 1 year ago

On Windows (no WSL), Mac, and Linux, 0.0.0.0 works.

sinmojito commented 1 year ago

The above command prints 'Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.31' - I tested the small fix in the util.py and it works on my WSL2 machine now.

tested by changing util.py line 32 from

`if "Microsoft" in pl:

to

if "Microsoft" in pl or "microsoft" in pl:

on my WSL2 device with a fresh oakvar install and following the tutorial.

Best, Mohit

sinmojito commented 1 year ago

line 33*

rkimoakbioinformatics commented 1 year ago

Ah, indeed. Windows was using localhost as well. Since you found the solution, would you like to contribute to this repo with your fix? To do so, please follow the instruction at https://docs.github.com/en/get-started/quickstart/contributing-to-projects.

sinmojito commented 1 year ago

Yes I will do so! Thank you!