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

Denodify fails #35

Closed
thamerla opened this issue Jan 30, 2019 · 4 comments
Closed

Denodify fails #35

thamerla opened this issue Jan 30, 2019 · 4 comments

Comments

@thamerla
Copy link

Here's a code sample:
https://repl.it/repls/CheapButteryBudgetrange

Let me know if it works. Click run to run.
Any idea how to fix it?

@fabiante
Copy link
Collaborator

fabiante commented Feb 4, 2019

Nothing is printed in the console. What is the issue?

@fabiante fabiante added the pending Waiting for a response (of the issue creator, etc.) label Feb 4, 2019
@thamerla
Copy link
Author

thamerla commented Feb 4, 2019

problem jpg

@fabiante fabiante removed the pending Waiting for a response (of the issue creator, etc.) label Feb 5, 2019
@fabiante
Copy link
Collaborator

fabiante commented Feb 5, 2019

This is not the fault auf denodify. This will also happen when you use the default callback version: https://repl.it/repls/WillingBadSuperuser

The actual error is your usage of cookiejar.setCookie. Look at the tough-cookie implementation:

CookieJar.prototype.setCookie = function(cookie, url, options, cb) {
  var err;
  var context = getCookieContext(url);
  if (options instanceof Function) {
    cb = options;
    options = {};
  }

  var host = canonicalDomain(context.hostname);
  var loose = this.enableLooseMode;
  if (options.loose != null) {
    loose = options.loose;
  }

  // ...
}

The error Cannot read property 'loose' of undefined is a result of you not correctly supplying the parameters.

Try supplying the correct parameters (at least cookie and url).

@thamerla
Copy link
Author

thamerla commented Feb 5, 2019

You are right, it can be closed. I forgot to mention I had found the cause... long ago.

@fabiante fabiante closed this as completed Feb 6, 2019
@fabiante fabiante removed the pending Waiting for a response (of the issue creator, etc.) label Feb 6, 2019
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