Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2022] iOS: Webview Fire/Listen event problems that started after SDK 1.3.2

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionInvalid
Resolution Date2011-12-04T13:11:29.000+0000
Affected Version/sRelease 1.7.5
Fix Version/sSprint 2011-48
ComponentsiOS
Labelsn/a
ReporterLee
AssigneeSabil Rahim
Created2011-04-15T03:08:20.000+0000
Updated2017-03-02T22:49:45.000+0000

Description

The enclosed app.js, win.js, script.js, test.htm files illustrate a problem that only occurred in releases after Titanium SDK 1.3.2.

If you create an app with these files, using SDK 1.3.2 and iPhone SDK 4.1, it will work perfectly in the emulator and on an Apple device.

If you compile using any Titanium SDK after 1.3.2 (including 1.4.1.1 and 1.4.2), the app will work perfectly in the emulator but will fail on the device.

The enclosed sample uses evalJS(), but also failed in earlier versions, in which test.htm's onload event was used instead.

Attachments

FileDateSize
testLinkCrash_2011-11-30-094234_qgaombp.crash2011-11-30T09:48:49.000+000040137
webvieweventtest.zip2011-04-15T03:08:21.000+00002043

Comments

  1. Stephen Tramer 2011-04-15

    Tested 1.6.0GM, test in bugtests. It brought a tear to my eye.

  2. Stephen Tramer 2011-04-15

    Hold our horses; it works OUTSIDE of bugtests... but not in it?!? Looks like we need some R&D.

  3. Reggie Seagraves 2011-05-10

    Post 1.7.0 investigation. Please regress.
  4. Eric Merriman 2011-11-11

    This occurs with SDK 1.8.0.1.v20111111081456, iPad 1 (iOS 4.3.5)
  5. Alan Leard 2011-11-30

    Please see a very simple example here: http://pastie.org/2905998 In the example app, enter a URL in the textarea and hit return. It will create and new webview/window and open in. When a URL is used that will throw an error ("https://www.yahoo.org" and "http://www.yahoo.com," are examples), the app will crash under iOS5. Removing the error eventlistener prevents this effect.
  6. Sabil Rahim 2011-12-04

    This is not a bug. This occurs as result of how we bundle our app. If any js script file needs to be included in the file like in this instance where an html document is trying to access it's javascript file, please make sure to put it inside the Resources folder so that it doesn't get bundled into the app and only get copied over. So the solution for this problem would be to place the script.js file inside Resources > iphone> and run the same app. Everything should work fine. NOTE:This happens only on device as, during sim runs, only soft links are generated and nothing happens to the actual file and during bundling the all the js files are changed over.
  7. Lee Morris 2017-03-02

    Closing ticket as invalid.

JSON Source