iobio / gene.iobio

Gene.iobio vue
MIT License
55 stars 11 forks source link

MyGene2 endpoint auth issues on Firefox, Safari #57

Closed tonydisera closed 6 years ago

tonydisera commented 6 years ago

From Jessica - We just got a note from a family who was trying to use Gene.iobio to access their data and was experiencing errors. I was able to replicate it, I think.

If I first try to load their data by clicking on View in Gene.iobio (URL= http://gene.iobio.io/?mygene2=true&mode=basic&fileId=85&gene=CFTR&species=Human&genes=HBB,CFTR&build=GRCh37) from the MyGene2 site, I don’t see any visible end-user errors. Gene.iobio seemingly loads and the URL in my browser is http://gene.iobio.io/?mygene2=true&mode=basic&fileId=85&gene=CFTR&species=Human&genes=CFTR,HBB&build=GRCh37&rel0=proband&rel1=mother&rel2=father

However when I click to Advanced mode, I get a popup error "Cannot load data due to the following errors: Site configuration is missing for mygene2.”

tonydisera commented 6 years ago

From Tony - I’ve debugged the ajax call, and it is erroring out with a 403 status code:

'This resource is reserved for third-party access to limited endpoints. Please verify the url, ensure the correct X-Auth-Token is included in the header, and the withCredentials header is set to true'

I suspect that with the Firefox browser, the credentials are not being sent to the endpoint server. I’ll have to do more troubleshooting to figure out the problem.

Would you mind giving it a try on Chrome, Safari, and Firefox to make sure that it works as expected?

tonydisera commented 6 years ago

From Jessica - I’m on a Mac.

I can’t get it to work consistently on Safari. Sometimes it works, sometimes it doesn’t (mostly doesn’t) -- when it doesn’t, I get the error “not configured for mygene2”. I can’t find a particular pattern in it. Also doesn’t work in Firefox.

The only seemingly relevant error I see in the browser is "WebSocket network error: The operation couldn’t be completed. (kCFErrorDomainCFNetwork error 2.) uniqueSort — jquery-2.1.0.min.js:2:12549”

tonydisera commented 6 years ago

I wonder if indexedDb is somehow the problem here: https://github.com/firebase/firebase-js-sdk/issues/631