cytoscape / appstore

Cytoscape App Store web application code
16 stars 20 forks source link

"Install" mode for the app download button is not working #59

Closed AlexanderPico closed 4 years ago

AlexanderPico commented 5 years ago

The production site used to be able to detect if you have Cytoscape already running and would offer an "Install" or "Upgrade" option (rather than "Download") on an app page.

This stopped working in Chrome and FF sometime in the last year. Can we get it working again?

This is apparently a Cytoscape application issue; now assigned as issue for the Cytoscape dev team

sarthak-srivastava commented 5 years ago

The direct installation option is working correctly. Catch here is that cytoscape must be running while on page as the app manager creates a local host on port 2216 for javascript to detect cytoscape installation and execute appropriate installation steps.

image

pietmolenaar commented 5 years ago

As discussed yesterday with Sarkath and Alex, this is most likely due to the fact that the CORS policy isn't set correct on the server in the running instance of Cytoscape; Access-Control-Allow-Origin has to be set to all (*) or (better) specifically the app store url. The error was as follows:

-

Access to XMLHttpRequest at 'http://localhost:2607/status/' from origin

'http://apps.cytoscape.org' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I know that for more complicated requests also a pre-flight request is done (https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) and had problems implementing REST calls other than GET that were related to this. In the code in e.g. OriginOptionsBeforeResponse the httprequest OPTIONS is intercepted and the CORS policy set, but is this also used by the app manager. I'm not familiar with the code of the app manager, but suspect that the problem may be lingering somewhere here... Does anyone know who takes care of the App manager code in Cytoscape? Regards, Piet

On Tue, Jun 25, 2019 at 5:09 PM Sarthak Srivastava notifications@github.com wrote:

The direct installation option is working correctly. Catch here is that cytoscape must be running while on page as the app manager creates a local host on port 2216 for javascript to detect cytoscape installation and execute appropriate installation steps.

[image: image] https://user-images.githubusercontent.com/21197780/60110011-03b4b900-9789-11e9-9c06-e9bbfbeff879.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cytoscape/appstore/issues/59?email_source=notifications&email_token=AAHR2QG2KIRVIVMJ46X37MLP4IYLHA5CNFSM4HQFLLC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYQSINA#issuecomment-505488436, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHR2QCX3KQOWK2HZGZ2BDTP4IYLHANCNFSM4HQFLLCQ .

-- Piet Molenaar piet.amc@gmail.com Department of Oncogenomics, M1-131 Amsterdam University Medical Centers Meibergdreef 9 1105 AZ Amsterdam the Netherlands

tel (+31) 20-5666592 fax (+31) 20-6918626

sarthak-srivastava commented 5 years ago

Being dealt by Cytoscape development team.

coleslaw481 commented 4 years ago

AppStore has been modified to redirect all traffic to SSL and now the install button appears. Please verify and close ticket. thanks.