lidaof / eg-react

WashU Epigenome Browser
https://epigenomegateway.wustl.edu
Other
66 stars 30 forks source link

Kept getting "you are currently office" which stop me use web tracks #213

Closed shangl02 closed 2 years ago

shangl02 commented 2 years ago

Hi there, I kept getting this message "You are currently offline, so tracks on web won't load. But you can still use the Local Track and Local Text Track functions."

Tried both online version (http://epigenomegateway.wustl.edu/browser) and local mirror (http://localhost:3000), but neither work. Thus url parameter doesn't work. Any suggestions?

image

lidaof commented 2 years ago

Hi @shangl02 not sure why this error. did you accidentally enable offline in network tab?

image

shangl02 commented 2 years ago

Hi @lidaof, not quite sure what's the problem. I can replicate this error from multiple computers in my organization, thus maybe the firewall issue or port block, Here I attached the error.

It seems like network setting issue. Will follow up with IT

Thanks!

image

shangl02 commented 2 years ago

Hi @lidaof, It seems to be our VPN issue, which might not be easy to fix. But I just found that I can access the legacy browser without problem. Is the source code of the legacy browser available?

lidaof commented 2 years ago

Hi @shangl02 yes, code is here: https://github.com/epgg/eg the docs site right now is offline, I am asking the admin.

shangl02 commented 2 years ago

Thanks @lidaof. I can access the repo now. Does the legacy browser accept url parameter? I tried the same syntax, but failed

lidaof commented 2 years ago

Hi @shangl02 sorry for late reply, it should be coordinate

A variety of coordinate formats can be used to define view range:
single basepair: &coordinate=chr1:5932545
region: &coordinate=chr1:3333-44444
shangl02 commented 2 years ago

Hi @lidaof, thanks a lot for the help!

The "coordinate" works, but "hub" and "track" seems not.

Sorry, maybe the document of the legacy browser already exists, but since I can't install mediawiki on my company machine, I can't access it. So just wondering is there the legacy browser document accessible besides from mediawiki?

lidaof commented 2 years ago

Hi @shangl02 , i have contacted the admin to restart that wiki site for docs, waiting for reply. in the meantime, you could take a look at the file browser/js/sukn.js, where you can find datahub param is datahub

lidaof commented 2 years ago

the wiki site is back....just got reply from admin...right after my previous comment.... http://wiki.wubrowse.org/

shangl02 commented 2 years ago

@lidaof awesome! found that in browser/js/sukn.js BTW, the wiki site is still inaccessible. Thanks a lot! image

lidaof commented 2 years ago

please try refresh your web browser.

shangl02 commented 2 years ago

Hi @lidaof, thanks for the help.

I still kept getting error for both react and legacy browser due to the network setting in my organization. Thus is trying to explore the local track and hub option. Does the local track and hub support url parameters to define genome, position and file location? I could not find relevant info in the doc site.

Thanks.

lidaof commented 2 years ago

Hi @shangl02 , unfortunately local tracks cannot work with URL parameters as local tracks need be uploaded every time due to Javascript security setting. what's your network setting? the new browser requires CORS, the old one doesn't, just HTTP and byte range request.

shangl02 commented 2 years ago

Hi @lidaof,

In using react browser, I get this error image

While legacy browser doesn't pop "you are offline" error, but keep getting "timeout" image

lidaof commented 2 years ago

not sure now...have you tried use you local built browser? i guess that will solve this issue?

shangl02 commented 2 years ago

Same error using local react browser image

Cause the workstation is a windows machine, thus haven't try installing legacy browser locally

lidaof commented 2 years ago

so the gene track failed load i guess because you are not running the backend? then this is normal. i see the repeatmasker track is loaded without issue. not sure why offline notice there, but you can disable it by editing frontend/src/App.js and remove line 327-339

shangl02 commented 2 years ago

Thanks @lidaof Do you think a quick webex might be easier to solve the problem?

lidaof commented 2 years ago

Sure, i will be available at 11:30 CDT if that works for you.

shangl02 commented 2 years ago

Great. Invitation sent

shangl02 commented 2 years ago

Hi @lidaof , thanks a lot for the help.

Regarding the CORS under IIS, I still have trouble to get the local API working correctly:

  1. Following this thread (https://stackoverflow.com/questions/44802613/how-to-enable-cors-on-iis-manager-of-windows-10), I installed CORS module for IIS, and added the following part into the web.config of the web server. image

  2. with this CORS rule added, I can get another testing angular app to get data successfully. I further confirmed that if I remove the "cors" section in web.config under the site folder, this code will trigger CORS error In service.ts

    testCORS() {
    return this.http.get('http://10.132.10.11:81/testHub/test2.json');
    }

    in component.ts

      this.getDataService.testCORS().subscribe(
        data=>{
          this.corsData=data;
        }, error =>{
          console.log(error);
    
        }
      )
  3. However, I still can't get the backend api working successful to fetch a hub json with a url image

lidaof commented 2 years ago

can you try this one instead https://enable-cors.org/server_iis7.html? i think the json is ok, the browser complains CORS issue with bigwig file.

I don't have IIS environment...hard to test this :)

shangl02 commented 2 years ago

Tried both, get the same error. Yes, you are right, seems json is ok, but bigwig was blocked by CORS. Don't understand why.

shangl02 commented 2 years ago

One weird thing: when I directly use track url parameter to locate the bigwig, it doesn't complaint CORS.

no error, but no track displayed image

lidaof commented 2 years ago

Hi @shangl02 I don't have PC right now so cannot test this...sorry about that...

for your latest comment, it's because track is not recognized by the browser, it's been ignored and there is no error then.

shangl02 commented 2 years ago

Hi @shangl02 I don't have PC right now so cannot test this...sorry about that...

for your latest comment, it's because track is not recognized by the browser, it's been ignored and there is no error then.

oops. kept thinking "track" as an url parameter. Sorry :)

shangl02 commented 2 years ago

After a few hours, I gave up IIS and tried Apache, it's working now. So it's the setting of CORS under IIS cause the problem, but I still don't know what's the problem. Anyway, it's working and I appreciate your help very much.

lidaof commented 2 years ago

@shangl02 you are welcome! Glad you solved it by switch to Apache!