cannot run the analysis.js in toturial1
ririhedou opened this issue · 0 comments
ririhedou commented
My code is very simple and I can run it with node
const jsdom = require("jsdom");
const { JSDOM } = jsdom;
const dom = new JSDOM(`<!DOCTYPE html><body><div id=“hello”><p id=“marker”>Hello world</p></div></body>`);
var document = dom.window.document
var ifrm = document.createElement('iframe');
ifrm.setAttribute('id', 'ifrm'); // assign an id
document.body.appendChild(ifrm); // to place at end of document
// assign url
ifrm.setAttribute('src', 'demo.html');
console.log('done the iframe generation');
with node command: node example_iframe.js, i have
done the iframe generation
Everytime when I try to tutotial1.md analysis.js:
node ../src/js/commands/jalangi.js --inlineIID --inlineSource --analysis analysis.js example_iframe.js
I got this error:
Failed to instrument const jsdom = require("jsdom");
const { JSDOM } = jsdom;
const dom = new JSDOM(`<!DOCTYPE html><body><div id=“hello”><p id=“marker”>Hello world</p></div></body>`);
var document = dom.window.document
var ifrm = document.createElement('iframe');
ifrm.setAttribute('id', 'ifrm'); // assign an id
document.body.appendChild(ifrm); // to place at end of document
// to place before another page element
//var el = document.getElementById('marker');
//el.insertBefore(ifrm, el);
// assign url
ifrm.setAttribute('src', 'demo.html');
console.log('done the iframe generation');
/Users/xxxxx/Desktop/jsiframe/jalangi2/src/js/instrument/esnstrument.js:1952
throw ex;
^
TypeError: Cannot read property 'toString' of undefined
at generateRegExp (/Users/xxxxx/Desktop/jsiframe/jalangi2/node_modules/esotope/esotope.js:408:21)
at Object.generateLiteral [as Literal] (/Users/xxxxx/Desktop/jsiframe/jalangi2/node_modules/esotope/esotope.js:1371:29)
at Object.generateCallExpression [as CallExpression] (/Users/xxxxx/Desktop/jsiframe/jalangi2/node_modules/esotope/esotope.js:1004:35)
at Object.generateCallExpression [as CallExpression] (/Users/xxxxx/Desktop/jsiframe/jalangi2/node_modules/esotope/esotope.js:1004:35)
at Object.generateVariableDeclarator [as VariableDeclarator] (/Users/xxxxx/Desktop/jsiframe/jalangi2/node_modules/esotope/esotope.js:1811:36)
at Object.generateVariableDeclaration [as VariableDeclaration] (/Users/xxxxx/Desktop/jsiframe/jalangi2/node_modules/esotope/esotope.js:1835:36)
at Object.generateBlockStatement [as BlockStatement] (/Users/xxxxx/Desktop/jsiframe/jalangi2/node_modules/esotope/esotope.js:1526:36)
at stmtToJs (/Users/xxxxx/Desktop/jsiframe/jalangi2/node_modules/esotope/esotope.js:2143:28)
at Object.generateTryStatement [as TryStatement] (/Users/xxxxx/Desktop/jsiframe/jalangi2/node_modules/esotope/esotope.js:1858:26)
at Object.generateBlockStatement [as BlockStatement] (/Users/xxxxx/Desktop/jsiframe/jalangi2/node_modules/esotope/esotope.js:1526:36)xxxxx
Any thoughts? Thanks