Coder Social home page Coder Social logo

Comments (10)

jbenet avatar jbenet commented on August 25, 2024

😢

from ipfs-desktop.

daviddias avatar daviddias commented on August 25, 2024

The only fs.createReadStream is on this function of the Bundle:

  function getFileStream (files, boundary) {
    if (!files) return null

    var mp = new Multipart(boundary)
    if (!Array.isArray(files)) files = [files]

    for (var i in files) {
      var file = files[i]

      if (typeof file === 'string') {
        // TODO: get actual content type
        mp.addPart({
          body: fs.createReadStream(file),
          headers: {
            'Content-Type': 'application/octet-stream',
            'Content-Disposition': 'file; name="file"; filename="' + file + '"'
          }
        })

      } else if (Buffer.isBuffer(file)) {
        mp.addPart({
          body: file,
          headers: {
            'Content-Type': 'application/octet-stream',
            'Content-Disposition': 'file; name="file"; filename=""'
          }
        })
      }
    }

    return mp
  }

from ipfs-desktop.

daviddias avatar daviddias commented on August 25, 2024

In console mode, this file is empty:

https://github.com/ipfs/webui/blob/master/js/pages/files.jsx#L78
[14147:0812/231317:INFO:CONSOLE(895)] "adding file: ", source: http://127.0.0.1:5001/ipfs/QmS2HL9v5YeKgQkkWMvs1EMnFtUowTEdFfSSeMT4pos1e6/bundle.js (895)

And that is why it evals it to a string and breaks.

from ipfs-desktop.

jbenet avatar jbenet commented on August 25, 2024

I believe this is fixed for you now

from ipfs-desktop.

daviddias avatar daviddias commented on August 25, 2024

Needs ipfs/ipfs-webui#75 to be merged and released

from ipfs-desktop.

jbenet avatar jbenet commented on August 25, 2024

ipfs/ipfs-webui#75 merged. release is trickier-- need to PR against go-ipfs.

(we should think about how to do upgrades without requiring compilation. easy options for now:

  • require config change (ew)
  • give user a big warning page, (and user can chose to "install it" to allow it henceforth.) (very tricky UX for security)
  • sign the root, check for our sig. (this is cool)

from ipfs-desktop.

dignifiedquire avatar dignifiedquire commented on August 25, 2024

@diasdavid can we close this?

from ipfs-desktop.

daviddias avatar daviddias commented on August 25, 2024

Getting this error with the new electron versions

[1] (node) warning: possible EventEmitter memory leak detected. 11 did-finish-load listeners added. Use emitter.setMaxListeners() to increase limit.
[1] Trace
[1]     at EventEmitter.addListener (events.js:239:17)
[1]     at EventEmitter.once (events.js:265:8)
[1]     at EventEmitter.webContents.executeJavaScript (/Users/david/Documents/code/ipfs/station/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/atom.asar/browser/api/lib/web-contents.js:69:28)
[1]     at /Users/david/Documents/code/ipfs/station/node_modules/electron-safe-ipc/host.js:19:24
[1]     at Array.forEach (native)
[1]     at EventEmitter.ipc.send (/Users/david/Documents/code/ipfs/station/node_modules/electron-safe-ipc/host.js:14:33)
[1]     at /Users/david/Documents/code/ipfs/station/build/init.js:73:9
[1]     at IncomingMessage.<anonymous> (/Users/david/Documents/code/ipfs/station/node_modules/ipfs-api/src/request-api.js:89:14)
[1]     at emitNone (events.js:72:20)
[1]     at IncomingMessage.emit (events.js:166:7)

Ideas why?

from ipfs-desktop.

dignifiedquire avatar dignifiedquire commented on August 25, 2024

Ideas why?

Not really, I think somewhere where are not cleaning up properly, but I wasn't able to track down where exactly.

from ipfs-desktop.

dignifiedquire avatar dignifiedquire commented on August 25, 2024

Closing as this should work now, please reopen with details if still an issue

from ipfs-desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.