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

TypeError: Cannot set property 'pause' of undefined #26

Open
jeancarlos1111 opened this issue Jun 22, 2017 · 14 comments
Open

TypeError: Cannot set property 'pause' of undefined #26

jeancarlos1111 opened this issue Jun 22, 2017 · 14 comments
Assignees
Labels

Comments

@jeancarlos1111
Copy link

/home/jean/app_node/hostname_nmap/node_modules/queued-up/index.js:23
this.action.prototype.pause = this.pause;
^

TypeError: Cannot set property 'pause' of undefined
at new Queue (/home/jean/app_node/hostname_nmap/node_modules/queued-up/index.js:23:37)
at QueuedScan (/home/jean/app_node/hostname_nmap/node_modules/node-nmap/index.js:260:19)
at QueuedOsAndPortScan (/home/jean/app_node/hostname_nmap/node_modules/node-nmap/index.js:433:5)
at Object. (/home/jean/app_node/hostname_nmap/index.js:14:12)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
captura de pantalla de 2017-06-21 20-48-15

@harryhorton harryhorton self-assigned this Jun 23, 2017
@harryhorton
Copy link
Owner

@jeancarlos1111 I'll look into this. Thanks for the bug report.

@mainstreetmark
Copy link

I got this one too.

@dunklesToast
Copy link

Same error here - nmap 7.40 / macOS Sierra

@openWebX
Copy link

Same here nmap 7.60 / gentoo Linux... Wild guess: Could it be, that the call fails, because newer nmaps require root-priviledges for os-names and mac-addresses?

@job-so
Copy link

job-so commented Feb 8, 2018

it's related to : Johnhhorton/queued-up#5

@job-so
Copy link

job-so commented Feb 8, 2018

-    this._queue = new Queue((host) => {
+    this._queue = new Queue(function (host) {

job-so@722590c#diff-168726dbe96b3ce427e7fedce31bb0bc

@raphaelsoul
Copy link

@job-so I try to run a queued scan with your revise and got error as follow:

/Users/raphaelsoul/hacker/node_modules/node-nmap/index.js:304
        this._queue.done();
                    ^

TypeError: this._queue.done is not a function
    at OsAndPortScan.currentScan.on (/Users/raphaelsoul/hacker/node_modules/node-nmap/index.js:304:21)
    at emitOne (events.js:115:13)
    at OsAndPortScan.emit (events.js:210:7)
    at ChildProcess.child.on (/Users/raphaelsoul/hacker/node_modules/node-nmap/index.js:194:14)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

@job-so
Copy link

job-so commented Mar 2, 2018

Hi @raphaelsoul

Did you use this patch : job-so@722590c#diff-168726dbe96b3ce427e7fedce31bb0bc
or
this one : https://github.com/Johnhhorton/queued-up/pull/6

or a combination of both ?

Is there any fork of your code I may look at ?

Thanks.

Olivier.

@PierrickLozach
Copy link

I am also getting the TypeError: this._queue.done is not a function when applying your change to job-so@722590c#diff-168726dbe96b3ce427e7fedce31bb0bc

Any tips on what else you might need to change?

@job-so
Copy link

job-so commented Apr 11, 2018

Hi @PierrickI3 , which version of node.js are you using ?
This patch is working well on v8.7.0

@PierrickLozach
Copy link

Hey @job-so, v8.9.1

@job-so
Copy link

job-so commented Apr 11, 2018

OK my fault ... :-(
Please try this :

  • Revert to original node-nmap module : this._queue = new Queue((host) => {
  • and patch the queued-up module like in this PR : Johnhhorton/queued-up/pull/6 based on this job-so/queued-up

Let me know if it helps
Olivier.

@PierrickLozach
Copy link

That worked. Thanks @job-so !

@harryhorton
Copy link
Owner

#36

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

No branches or pull requests

8 participants