cytoscape / cytoscape-explore

Network visualization webapp.
MIT License
12 stars 4 forks source link

NDEx import doesn't use the upload limit config value #144

Open d2fong opened 2 years ago

d2fong commented 2 years ago

Describe the bug https://github.com/cytoscape/cytoscape-explore/pull/142#issuecomment-1060843825

The NDEx import service doesn't limit what networks can be imported into CE, even though there is a upload limit config value that the rest of the app uses. This can lead to bugs in the system where other components expect to deal with networks of size less than the upload limit

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior NDEx import should restrict networks based on the upload limit config value.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

maxkfranz commented 2 years ago
maxkfranz commented 2 years ago

@mikekucera's comment from #142:

Got this exception trying to import the galExpData.csv file from the cytoscape desktop sampleData folder. This file is only 416kb, and its the same network we use for the "try a sample network" link, so I don't think it should fail.

PayloadTooLargeError: request entity too large
    at readStream (/Users/mkucera/git/cytoscape-explore/node_modules/raw-body/index.js:155:17)
    at getRawBody (/Users/mkucera/git/cytoscape-explore/node_modules/raw-body/index.js:108:12)
    at read (/Users/mkucera/git/cytoscape-explore/node_modules/body-parser/lib/read.js:77:3)
    at jsonParser (/Users/mkucera/git/cytoscape-explore/node_modules/body-parser/lib/types/json.js:135:5)
    at Layer.handle [as handle_request] (/Users/mkucera/git/cytoscape-explore/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/mkucera/git/cytoscape-explore/node_modules/express/lib/router/index.js:317:13)
    at /Users/mkucera/git/cytoscape-explore/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/Users/mkucera/git/cytoscape-explore/node_modules/express/lib/router/index.js:335:12)
    at next (/Users/mkucera/git/cytoscape-explore/node_modules/express/lib/router/index.js:275:10)
    at logger (/Users/mkucera/git/cytoscape-explore/node_modules/morgan/index.js:144:5)

Originally posted by @mikekucera in https://github.com/cytoscape/cytoscape-explore/issues/142#issuecomment-1059371911

maxkfranz commented 2 years ago

What's the max. size of a working network right now?

maxkfranz commented 2 years ago

@jingjingbic, @yihangx -- would either of you be able to easily get us a number for where the conversion fails so we know the current limit?

maxkfranz commented 2 years ago

Notes: