Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-13097

Android: In custom module when addEventListener is called on proxy object in app.js gives Uncaught TypeError: Object #<Test> has no method 'addEventListener'

    Details

      Description

      Description

      In custom module there is one method that returns an object of a class that inherits from KrollProxy. In app.js when addEventListener is called on this proxy object it works fine for multiple times but when back button is clicked that leads to homepage and if again application is launched at this time it gives following error :

      E/V8Exception(30249): Exception occurred at app.js:26: Uncaught TypeError: Object #<Test> has no method 'addEventListener'
      

      Note:In this case no annotation is used on class that inherits from krollproxy
      (@Kroll.proxy(creatableInModule=SampleModule.class))

      While, in other case when the above annotation is used on class inherited from krollproxy (ExampleProxy) and proxy object is created using createExample in "app.js" it works fine.

      TestCase

      1. Please find the attached "ReproducibleTestCase.zip" having custom module and application projects.
      2. Import both the projects in Titanium studio and install the module into the application.
      3. Install the application and run.
      4. Click the button (It will create a custom object using the module, and attach an event listener to it).
      5. Press back button of device and again open application and press button this time it will give the following error:

      E/V8Exception(30249): Exception occurred at app.js:26: Uncaught TypeError: Object #<Test> has no method 'addEventListener'
      

        Issue Links

          Activity

          Hide
          billdawson Bill Dawson added a comment -

          +1. Happening for me too. Same behavior.

          Show
          billdawson Bill Dawson added a comment - +1. Happening for me too. Same behavior.
          Show
          billdawson Bill Dawson added a comment - Potential workaround: http://billdawson.com/overcoming-timob-13079-in-titanium-android-modules
          Hide
          ayeung Allen Yeung added a comment -

          This is actually fixed as a part of https://jira.appcelerator.org/browse/TIMOB-13620

          Show
          ayeung Allen Yeung added a comment - This is actually fixed as a part of https://jira.appcelerator.org/browse/TIMOB-13620
          Hide
          lmorris Lee Morris added a comment -

          Closing ticket as duplicate.

          Show
          lmorris Lee Morris added a comment - Closing ticket as duplicate.

            People

            • Assignee:
              ayeung Allen Yeung
              Reporter:
              rsharma Rupesh Sharma
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development

                  Poker Sessions

                  This issue is currently not assigned to any Poker Session.

                    Git Source Code