Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6517] Ti.Platform.openURL throws ERROR (SDK 9.0)

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusResolved
ResolutionDuplicate
Resolution Date2020-07-20T14:16:02.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterMathias Eklöf
AssigneeAbir Mukherjee
Created2020-04-02T13:18:40.000+0000
Updated2020-07-20T14:16:03.000+0000

Description

When using e.g: Ti.Platform.openURL("https://google.com"); it throws an error;
[ERROR] :  Script Error {
[ERROR] :      toJSON = "<KrollCallback: 0x282b0e780>";
[ERROR] :  }
it spams the log. Anyone that knows why or how to solve it?

Comments

  1. Rene Pot 2020-04-03

    I tried to reproduce using SDK 9.0.0.GA and it works fine for me. Does it work for you in a new empty application?
  2. Joshua Quick 2020-04-03

    [~oakleaf], odds are the issue is coming from one of your event listeners. Unfortunately, since you have the newest Xcode 11.4 installed, Titanium is failing to acquire a stacktrace. That's why you're seeing a toJSON error instead. We're looking into resolve this in the near future. For now, trying building/running it for Android instead to isolate the issue.
  3. Hans Knöchel 2020-04-03

    Ticket for better stack traces in Xcode 11.4: TIMOB-27827
  4. Jonas Funk Johannessen 2020-06-12

    [~oakleaf] I've seen this as well. This error will show if you do not provide the optional callback parameter. So you have to do something like this: Ti.Platform.openURL(url, null, ()=>{});
  5. Christopher Williams 2020-07-20

    Resolved as duplicate of linked ticket. Fix was just pushed to master/9_1_X/9_3_X. Release 9.1.0 will contain it. (or if you really need the fix and don't want to use the empty function callback workaround, you should be able to install a new 9_0_X branch build via ti sdk install -b. 9_0_X in about an hour once the build goes out)

JSON Source