Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading Large Directories (?) Causes too many chunks requested, NaN #13

Closed
martinbowling opened this issue Nov 26, 2014 · 13 comments
Closed

Comments

@martinbowling
Copy link

sudo coffee fs.coffee
Access Token Set
info: attempting to start f4js
info: mount point: /Users/martinbowling/Downloads/gdrive
info: Downloading full folder structure from google
info: Finished downloading folder structure from google
info: Parinsg data, looking for root foolder
info: root node found
info: Folders left to parse: 3665
info: Folders left to parse: 3645
info: Folders left to parse: 1315
info: Folders left to parse: 484
info: Folders left to parse: 4
info: Parsing files
info: Finished parsing files
info: Everything should be ready to use
debug: saving folder tree
debug: too many chunks requested, NaN

Will send over my folderTree.json as well

@EricTheMagician
Copy link
Owner

Can you try this latest commit.
Let me know if you still have the same problem.
You don't need to delete the folderTree.json file

@EricTheMagician
Copy link
Owner

Or, you could try the 0.10 branch.
It has all of the changes that I have made in 0.11, but should work for node 0.10

The only real difference between 0.10 and 0.11 branch should be the package versions.

@EricTheMagician
Copy link
Owner

The one thing you didn't mention, is, despite getting those errors, did it still work?

@martinbowling
Copy link
Author

@thejinx0r trying latest commit now, will try the 0.10 branch if not.

And no it doesn't seem to work, not all the directories are there in the mounted directory and I am unable to play any of the video files.

@martinbowling
Copy link
Author

trying the 0.10 branch I get this error

Error: Cannot find module 'queue'
  at Function.Module._resolveFilename (module.js:338:15)
  at Function.Module._load (module.js:280:25)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/Users/martinbowling/Projects/node-gdrive-fuse/src/0.10/fs.coffee:21:9)
  at Object.<anonymous> (/Users/martinbowling/Projects/node-gdrive-fuse/src/0.10/fs.coffee:1:1)
  at Module._compile (module.js:456:26)

@martinbowling
Copy link
Author

With the commit in the master branch it happens as soon as I enter the mounted directory.

@EricTheMagician
Copy link
Owner

This is normal. I've changed the required packages.
Just run npm install again to install the missing dependencies

@martinbowling
Copy link
Author

sudo coffee fs.coffee
Access Token Set
info: attempting to start f4js
info: mount point: /Users/martinbowling/Downloads/gdrive
fuse: unknown option `default_permissi?j?'
info: Loading folder structure

It doesn't seem to actually mount and complains of an unknown permission

@martinbowling
Copy link
Author

FYI I removed the "-o", "default_permissions" from the 0.10 fs.coffee when it initializes the fuse4js but I still get the

debug: too many chunks requested, NaN

Whenever I use finder to navigate to the mounted directory

@EricTheMagician
Copy link
Owner

The default permission problem is fixed in the 0.11 fuse4js but not in the 0.10 branch of fuse4js.

The problem is really odd. If you could put this in line 169 of file.coffee, this would help.
logger.debug "start: #{start}, end: #{end}, cstart: #{chunkStart}, cend: #{chunkEnd}, nChunks: #{nChunks}, file size: #{@size}"

Basically, the problem you are having is that it's not calculating how much data to download from google properly. Somewhere along the way, something is being calculated as not a number. And I'm not sure if that something is simply a string, or if it's something to do with downloading small files, or if it's with something unrelated.

@martinbowling
Copy link
Author


    if nChunks < 1
      unless downloadTree.has("#{file.id}-#{start}")
        #logger.debug "starting to download #{file.name}, chunkStart: #{chunkStart}"
        logger.debug "start: #{start}, end: #{end}, cstart: #{chunkStart}, cend: #{chunkEnd}, nChunks: #{nChunks}, file size: #{@size}"
        downloadTree.set("#{file.id}-#{start}", 1)

but I don't see any new debug messages in terminal, or in the log

@martinbowling
Copy link
Author

I upgraded to node v0.11.14 and pulled the 0.11 branch and added the debug line to 169

http://cl.ly/text/1S0Y2H3e0Q1y

Let me know if you need my folderTree.json or anything else.

@EricTheMagician
Copy link
Owner

That's really useful because I figured it out.
Your config.json from:
https://forums.plex.tv/index.php/topic/128302-google-drive-fuse-filesystem/?p=777610

is missing the "chunkSize" parameter.
That's why everything is a NAN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants