Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6581] Calling Ti.Platform.openURL() without the optional 3rd parameter (callback) will raise a "Script error"

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2020-08-07T13:29:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsapi, ios, iphone
ReporterShamsul Azhar
AssigneeAbir Mukherjee
Created2020-08-07T10:56:37.000+0000
Updated2020-08-07T13:29:16.000+0000

Description

It seems that the Ti.Platform.openURL() call seems to have issues working with setInterval() 1) Run the attached code on the simulator or device. 2) Notice that a setInterval callback will print a counter on the console every second 3) Click on the button which will switch to Safari and open a webpage 4) Switch back to the app and observe a "Script Error" message being printed out on the console. This error can be avoided if you supply the optional 3rd parameter to 'openURL()' which is a callback.

Attachments

FileDateSize
app.js2020-08-07T10:43:45.000+0000635

Comments

  1. Shamsul Azhar 2020-08-07

    Just noticed that this is a duplicate of the bug below:- Bug AC-6561 Ti.Platform.openURL causes "undefined is not an object" error Don't know how to delete this bug report, sorry about that.
  2. Ewan Harris 2020-08-07

    [~shamsulazhar] no worries, duplicate bug reports happen! I'll close this out as a dupe of TIMOB-27846. It's available by installing appc ti sdk install -b 9_0_X -d, note that there is no GA build with this fix until 9.1.0 is released

JSON Source