Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

mongoose 3.6.15 issues #2

Closed
doapp-ryanp opened this issue Jul 25, 2013 · 4 comments
Closed

mongoose 3.6.15 issues #2

doapp-ryanp opened this issue Jul 25, 2013 · 4 comments
Assignees

Comments

@doapp-ryanp
Copy link

When upgrading from mongoose 3.6.14 to 3.6.15 calls to the mongoose-q Q() methods never resolve/reject the promise. Also setting mongoose.set('debug', true); does not dump debug upon connect, like it does in 3.6.14.

I'm a node noob so its kinda hard for me to track down. Have you run into this yet?

here is my dependencies:

  "dependencies": {
    "geddy": "0.9.x",
    "jake": "0.5.x",
    "mocha":"1.12.x",
    "passport": "0.1.x",
    "bcrypt": "0.7.x",
    "q": "0.9.x",
    "facebook-node-sdk": "0.2.x",
    "request": "2.21.x",
    "memcached": "0.2.x",
    "node-uuid": "1.4.x",
    "underscore": "1.4.x",
    "mongoose": "=3.6.15",
    "mongoose-q": "0.0.4",
    "validator": "1.2.x"
  }

If I rm -rf node_modules && npm cache clear then update my package.json to "mongoose": "=3.6.14", then do npm install things work just fine.

@ghost ghost assigned iolo Jul 26, 2013
@iolo
Copy link
Owner

iolo commented Jul 26, 2013

hi,
I'm just investigating it for mongoose 3.6.15 and it works well. [Not Reproduced]
Could you show me a fragment of your code doesn't work? [Information Required]
Thanks for your report.

@doapp-ryanp
Copy link
Author

Yea sure - the spread and fail never get called when executing the findById()

    this.getList = function (req, resp, params) {
        var self = this;

        self.authenticateUserQ()
            .then(function (_user) {
                return [_user, geddy.schemas.MyList.findById(params.list_id).populate("_owner", "name email image_avatar").execQ()];  //This executes but breakpoint in spread and fail never get called
            })
            .spread(function (_user, _list) {
                if (!_list || !_list._owner.equals(_user)) {
                    throw errors.generate("User does not have a list by that id", 400, errors.DATA_NOT_FOUND);
                }
                self.respond(_list);
            })
            .fail(self.handleWithDefault(errors.generate("Could Not Retrieve List", 500, errors.UNKNOWN_ERROR)))
            .done();
    };

FWIW - today im having trouble installing mongoose 3.6.15 (was able to install yesterday) per issue: Automattic/mongoose#1576 so there may be something wrong in mongoose land.

I'll try to step through each line of code to see where its hanging up. Just thought it may be a easily reproducible problem and therefore easily fixed by you. But obv. its not :)

@iolo
Copy link
Owner

iolo commented Jul 28, 2013

I'd investigated all changes of mongoose from 3.6.14 to 3.6.15 line by line. but I found no clue, Unfortunately.
(see https://gist.github.com/iolo/6097711 )
and, I wrote another test code similar to your code, but it works.
I'm sorry but I have no more idea to fix this issue.

iolo added a commit that referenced this issue Jul 28, 2013
@doapp-ryanp
Copy link
Author

No need to be sorry - appreciate you spending the time looking into it. Must be something strange in my environment. If/when I find out exactly what it is I'll re-open this if necessary. Closing for now.

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

No branches or pull requests

2 participants