com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot call method "foo" of undefined (script in http://first/ from (2, 10) to (2, 64)#2)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via htmlunit by jblemee
, 1 year ago
TypeError: Cannot call method "foo" of undefined (script in http://first/ from (2, 10) to (2, 64)#2)
via htmlunit by anotherjosh
, 1 year ago
Wrapped java.lang.NullPointerException (script in http://www.amazon.com/ from (1665, 57) to (1669, 10)#1667)
via sourceforge.net by Unknown author, 1 year ago
Wrapped java.lang.NullPointerException (script in from (1665, 57) to (1669, 10)#1667)
via htmlunit by ssilvert
, 1 year ago
TypeError: Cannot read property "style" from null (http://localhost:8080/htmlunit-richfaces/a4j/g/3_2_2.GA/org/richfaces/ui.pack.js.jsf#5791)
via htmlunit by umk
, 1 year ago
ReferenceError: "console" is not defined. (script in https://bio206/framework/test.html from (7, 32) to (7, 77)#7)
via htmlunit by alexeypopov
, 1 year ago
TypeError: Method "remove" called on incompatible object. (script in http://localhost:8080/test2.html from (4, 31) to (11, 10)#8)
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot call method "foo" of undefined (script in http://first/ from (2, 10) to (2, 64)#2)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3558)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3536)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3564)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3583)
at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3602)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2161)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3170)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2484)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3004)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$5.doRun(JavaScriptEngine.java:396)
at org.mozilla.javascript.Context.call(Context.java:502)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:511)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:405)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:380)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:890)
at com.gargoylesoftware.htmlunit.html.HtmlScript.executeInlineScriptIfNeeded(HtmlScript.java:272)
at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:326)
at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:207)
at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:210)
at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:329)
at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:993)
at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:896)
at org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:2893)
at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1954)
at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:893)
at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:495)
at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:448)
at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:680)
at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:240)
at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:127)
at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:101)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:443)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:331)
at com.gargoylesoftware.htmlunit.html.BaseFrame.loadInnerPageIfPossible(BaseFrame.java:118)
at com.gargoylesoftware.htmlunit.html.BaseFrame.loadInnerPage(BaseFrame.java:93)
at com.gargoylesoftware.htmlunit.html.HtmlPage.loadFrames(HtmlPage.java:1731)
at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:166)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:456)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:331)
at gdo.test.TestHtmlUnit.testFrameJS(TestHtmlUnit.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 month ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
5 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.