Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26866] iOS: removeEventListener on local webview produces an error

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-03-06T19:12:45.000+0000
Affected Version/sRelease 8.0.0
Fix Version/sRelease 8.0.0
ComponentsiOS
Labelsqe-testadded, regression
Reporternicolomonili
AssigneeVijay Singh
Created2019-02-27T16:25:37.000+0000
Updated2019-04-02T18:21:45.000+0000

Description

I'm trying to delete an event created within a webview, via an app event. This produces an error :
 [ERROR] Error firing event 'app:deleteWebviewEvents': A JavaScript exception occurred 
- The problem *is present* with the Titanium SDK *8.0.0.v20190219113758*. - The problem *is not present* with the Titanium SDK *7.5.1GA*. the error does not allow the removal of the event "clickFromApp", in fact, by pressing the "app --> webview" button again, the event is called again. *Steps to reproduce:* - Create a Classic "Default Project" app - Replace the "app.js" code with the attached "app.js", and insert into the project also the file webview.html attached. - Build with Titanium *8.0.0.v20190219113758* and run on iOS. - Test the logic: press "app --> webview" button, press "webview -> app" button, clear the event of the webview with the button "clear events". - This produces the error "[ERROR] Error firing event 'app:deleteWebviewEvents': A JavaScript exception occurred " - Retry with SDK 7.5.1GA, in this case there are no problems. The event is deleted, and the button "app --> webview" it doesn't call anything anymore.

Attachments

FileDateSize
app.js2019-02-27T16:21:56.000+0000805
Schermata 2019-02-27 alle 17.19.35.png2019-02-27T16:19:47.000+000027545
webview.html2019-02-27T16:22:00.000+00001109

Comments

  1. Sharif AbuDarda 2019-02-27

    Hello [~nicolomonili], I was able to reproduce the issue with SDK 8.0.0.v20190219113758 in iOS. The same code works without error in SDK 7.5.1.GA. Moving to TIMOB. Thanks.
  2. Vijay Singh 2019-03-04

    PR(8_0_X): https://github.com/appcelerator/titanium_mobile/pull/10746 PR(master): https://github.com/appcelerator/titanium_mobile/pull/10747
  3. Keerthi Mahalingam 2019-03-06

    Verified the fix on SDK 8.1.0.v20190306084706 and 8.0.0.v20190306054146. Works fine. closing.
       Operating System
         Name                        = Mac OS X
         Version                     = 10.13.6
         Architecture                = 64bit
         # CPUs                      = 8
         Memory                      = 17179869184
       Node.js
         Node.js Version             = 8.12.0
         npm Version                 = 6.4.1
       Titanium CLI
         CLI Version                 = 5.1.1
       Titanium SDK
         SDK Version                 = 8.1.0.v20190306084706 and 8.0.0.v20190306054146
       CLI                          =7.0.10 MASTER 17
        Device                     =iPhone 6s iOS 12
       Simulator               =iPhone 6 iOS 11
       

JSON Source