[TIMOB-26610] Titanium.App.getArguments(); at SDK 7.4.1 appears to have the following bug:
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2021-07-29T21:05:25.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | n/a |
| Reporter | Andreas Pingas |
| Assignee | Joshua Quick |
| Created | 2018-09-26T15:03:33.000+0000 |
| Updated | 2021-07-29T21:05:25.000+0000 |
Description
Titanium.App.getArguments(); at SDK 7.4.1 appears to have the following bug:
Attachments
| File | Date | Size |
|---|---|---|
| Simulator Screen Shot - iPhone XS - 2018-09-26 at 16.46.20.png | 2018-09-26T15:01:47.000+0000 | 307875 |
[~miniman42] May this be related to your push changes? I remember the payload is also stored in the launch-options, which may be the bug. [~andreas.pingas] See TIMOB-26399 for details. Can you confirm this does not happen in 7.4.0?
I'll check the code and see, not sure this is related as I have not experienced similar issues in my quite extensive testing, but perhaps it's down to a difference in payloads.
Can't see how its related tbh. I do have an enhancement coming for TIMOB-26399 though.
Appearing since 7.4.0 +
[~miniman42] [~andreas.pingas] Could you provide the full stack trace?
Never had the issue Gary. Don't think it was related to my PR.
[ERROR] : Script Error { [ERROR] : column = 38; [ERROR] : line = 83; [ERROR] : message = "-[NSUserActivity boundBridge:withKrollObject:]: unrecognized selector sent to instance 0x28375bfc0"; [ERROR] : nativeStack = "3 CoreFoundation 0x000000018d3c17b8 <redacted> + 1412\n4 CoreFoundation 0x000000018d3c345c _CF_forwarding_prep_0 + 92\n5 MY 0x00000001027e09e0 MY + 84448\n6 MY 0x00000001027e0b44 MY + 84804\n7 MY 0x00000001029eee94 MY + 2240148\n8 MY 0x00000001029eed20 MY + 2239776\n9 MY 0x00000001029edf88 MY + 2236296\n10 MY 0x00000001029ee590 MY + 2237840\n11 MY 0x00000001029edf88 MY + 2236296\n12 MY 0x00000001029ee590 MY + 2237840\n13 MY 0x00000001027edbe4 MY + 138212\n14 MY 0x00000001027efba4 MY + 146340\n15 MY 0x00000001027eb2c4 MY + 127684\n16 JavaScriptCore 0x0000000194724af8 <redacted> + 348\n17 JavaScriptCore 0x0000000194e0ec44 <redacted> + 352\n18 JavaScriptCore 0x00000001946fbd78 <redacted> + 29992\n19 JavaScriptCore 0x00000001946fbd8c <redacted> + 30012"; [ERROR] : sourceURL = "file:///var/containers/Bundle/Application/597B15D5-294F-4BCB-898B-9E011212D558/MY.app/src/modules/handleurl.js"; [ERROR] : stack = " at [native code]\n at createHandleURL(/src/modules/handleurl.js:83:38)\n at (/app.js:466:60)\n at global code(/app.js:483:70)\n at require@[native code]\n at (/ti.main.js:27:8)\n at loadAsync(/ti.internal/bootstrap.loader.js:148:186)\n at global code(/ti.main.js:24:52)"; [ERROR] : toJSON = "<KrollCallback: 0x2822c4dc0>"; [ERROR] : } [ERROR] : Script Error Module "app.js" failed to leave a valid exports object [ERROR] : ErrorController is up. ABORTING openLooks like an issue when the app is launched from a user activity (Ti.App.iOS.UserActivity) that needs to be removed from the launch options or be mapped to a serializable type.
var searchableIndex = Ti.App.iOS.createSearchableIndex(); if (searchableIndex.isSupported()) { var searchItems = []; var itemAttr = Ti.App.iOS.createSearchableItemAttributeSet({ itemContentType:Ti.App.iOS.UTTYPE_IMAGE, title:'Title', contentDescription:'Description', keywords:['test'] }); var item = Ti.App.iOS.createSearchableItem({ uniqueIdentifier:'test', domainIdentifier:'com.test', attributeSet:itemAttr }); searchItems.push(item); searchableIndex.addToDefaultSearchableIndex(searchItems, function(e) { }); } Ti.API.info(Titanium.App.getArguments());[ERROR] : Script Error { [ERROR] : column = 38; [ERROR] : line = 28; [ERROR] : message = "-[NSUserActivity boundBridge:withKrollObject:]: unrecognized selector sent to instance 0x2810c4da0"; [ERROR] : nativeStack = "3 CoreFoundation 0x000000018d3c17b8 <redacted> + 1412\n4 CoreFoundation 0x000000018d3c345c _CF_forwarding_prep_0 + 92\n5 MY 0x000000010067c9e0 MY + 84448\n6 MY 0x000000010067cb44 MY + 84804\n7 MY 0x000000010088ae94 MY + 2240148\n8 MY 0x000000010088ad20 MY + 2239776\n9 MY 0x0000000100889f88 MY + 2236296\n10 MY 0x000000010088a590 MY + 2237840\n11 MY 0x0000000100889f88 MY + 2236296\n12 MY 0x000000010088a590 MY + 2237840\n13 MY 0x0000000100689be4 MY + 138212\n14 MY 0x000000010068bba4 MY + 146340\n15 MY 0x00000001006872c4 MY + 127684\n16 JavaScriptCore 0x0000000194724af8 <redacted> + 348\n17 JavaScriptCore 0x0000000194e0ec44 <redacted> + 352\n18 JavaScriptCore 0x00000001946fbd78 <redacted> + 29992\n19 JavaScriptCore 0x00000001946fbd8c <redacted> + 30012"; [ERROR] : sourceURL = "file:///var/containers/Bundle/Application/95A1F3DD-1BFA-4155-8CBD-25EC816AB24B/MY.app/app.js"; [ERROR] : stack = " at [native code]\n at (/app.js:28:38)\n at global code(/app.js:29:70)\n at require@[native code]\n at (/ti.main.js:27:8)\n at loadAsync(/ti.internal/bootstrap.loader.js:148:186)\n at global code(/ti.main.js:24:52)"; [ERROR] : toJSON = "<KrollCallback: 0x2805fc680>"; [ERROR] : } [ERROR] : Script Error Module "app.js" failed to leave a valid exports objectAre there any news on this? Basically if this is not solved then searchableIndez. will work only when the app runs. When it starts from the beginning then you cannot have the parameters.
I was able to reproduce this bug (iOS, SDK 7.4.1) and found out another detail. It happens when
When the app is not running on main thread, everything works fine. Does anyone know whether this got fixed in another version? IMO, it's a critical bug because prevents apps using Hyperloop to fetch URLs when opening up.<property name="run-on-main-thread" type="bool">true</property>Does anyone know how to use Hyperloop for getting what Titanium.App.getArguments() returns? If there is not any plan to fix this in the foreseeable future, it would be good to have a workaround given that it's a critical bug for apps using Hyperloop along with deep/universal links. Thanks
We encountered the same issue for iOS when we added universal link support (eg https://ourdomain.com/xyz). The solution for us was to support universal links only and remove support for launching via app links (eg. ourdomain://launch-something/xyz). We would have preferred to be able to support both universal links and the deep link app links so that we could have more direct inter-app launching capabilities. We'll continue to watch this ticket.