Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6451] Android: Drillbit: Unable to run any test suites, error in harness (app.js:45).

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-12-03T22:45:02.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2011-48, Release 1.8.0.1
ComponentsDrillbit
Labelsbranch-v8
ReporterJosh Roesslein
AssigneeJosh Roesslein
Created2011-12-03T16:50:45.000+0000
Updated2017-03-06T19:01:53.000+0000

Description

Drillbit fails to run any tests. Get the follow error w/ Rhino (also occurs w/ v8): {quote} E/ScriptsModule(22261): org.mozilla.javascript.EcmaError: TypeError: Cannot find function addEventListener in object [object Object]. (Resources/app.js#45) E/ScriptsModule(22261): at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3784) E/ScriptsModule(22261): at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3762) E/ScriptsModule(22261): at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3790) E/ScriptsModule(22261): at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3809) E/ScriptsModule(22261): at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3880) E/ScriptsModule(22261): at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2359) E/ScriptsModule(22261): at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2326) E/ScriptsModule(22261): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1514) E/ScriptsModule(22261): at script(Resources/app.js:45) ... {quote}

Comments

  1. Josh Roesslein 2011-12-03

    This regression in Drillbit occurred after TIMOB-6090 was merged. Window.activity not longer references an ActivityProxy before open. It is only when a HW is opened that this becomes a true ActivityProxy.
  2. Josh Roesslein 2011-12-03

    Drillbit uses window.activity to get a reference to the root activity to listen for "instrumentationReady" event. Changing this to use Ti.Android.currentActivity instead appears to fix the issue.
  3. Lee Morris 2017-03-06

    Closing ticket due to time passed.

JSON Source