[TIMOB-26866] iOS: removeEventListener on local webview produces an error
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2019-03-06T19:12:45.000+0000 |
| Affected Version/s | Release 8.0.0 |
| Fix Version/s | Release 8.0.0 |
| Components | iOS |
| Labels | qe-testadded, regression |
| Reporter | nicolomonili |
| Assignee | Vijay Singh |
| Created | 2019-02-27T16:25:37.000+0000 |
| Updated | 2019-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
| File | Date | Size |
|---|---|---|
| app.js | 2019-02-27T16:21:56.000+0000 | 805 |
| Schermata 2019-02-27 alle 17.19.35.png | 2019-02-27T16:19:47.000+0000 | 27545 |
| webview.html | 2019-02-27T16:22:00.000+0000 | 1109 |
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.
PR(8_0_X): https://github.com/appcelerator/titanium_mobile/pull/10746 PR(master): https://github.com/appcelerator/titanium_mobile/pull/10747
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