[AC-6517] Ti.Platform.openURL throws ERROR (SDK 9.0)
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | n/a |
Status | Resolved |
Resolution | Duplicate |
Resolution Date | 2020-07-20T14:16:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Mathias Eklöf |
Assignee | Abir Mukherjee |
Created | 2020-04-02T13:18:40.000+0000 |
Updated | 2020-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?
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?
[~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.Ticket for better stack traces in Xcode 11.4: TIMOB-27827
[~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, ()=>{});
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)