id
int64
0
5.38k
issuekey
stringlengths
4
16
created
stringlengths
19
19
title
stringlengths
5
252
description
stringlengths
1
1.39M
storypoint
float64
0
100
3,526
TIMOB-26669
12/19/2018 19:41:40
TiAPI: Create Node-compatible assert module API
It'd be useful to create equivalents of some of the core Node modules in Titanium so that users could port/re-use node codebases on mobile devices. Some of the more common modules could map relatively easily to devices, and would be worth investigating. https://nodejs.org/api/assert.html
8
3,527
TIMOB-26672
12/20/2018 15:21:51
iOS: Application crashes on launch on iOS9
h5.Description Running a default application to iOS 9 crashes on launch with the below (this isn't logged either fwiw). This looks to be down to the usage of {{const}}, if I change addBinding to be declared with {{var}} it works, if I enable transpilation it work. I will investigate this further as there is usage of const/let throughout the new os/path code so I assume they will error. {code} /ti.main.js:33 const addBinding = require('./ti.internal/extensions/binding'); ^ (null) (null) 4 TitaniumKit0x0000000109a7b34c -[KrollBridge evalFile:callback:selector:] + 55 5 TitaniumKit0x0000000109a7bd0d -[KrollBridge didStartNewContext:] + 1805 6 TitaniumKit0x0000000109ab340e -[KrollContext main] + 1084 7 libdispatch.dylib 0x000000010be05c89 _dispatch_call_block_and_release + 12 8 libdispatch.dylib 0x000000010be213d7 _dispatch_client_callout + 8 9 libdispatch.dylib 0x000000010be0be5d _dispatch_main_queue_callback_4CF + 714 10 CoreFoundation 0x000000010a4f40f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 11 CoreFoundation 0x000000010a4b5b99 __CFRunLoopRun + 2073 12 CoreFoundation 0x000000010a4b50f8 CFRunLoopRunSpecific + 488 13 GraphicsServices0x000000010c443ad2 GSEventRunModal + 161 14 UIKit 0x0000000106359f09 UIApplicationMain + 171 15 ticreateapp0x00000001047d9286 main + 950 16 libdyld.dylib 0x000000010be5092d start + 1 {code} h5.Steps to reproduce # Create a default application # Build it for iOS 9 (sim or device
5
3,528
TIMOB-26674
12/20/2018 20:53:00
iOS: Un-deprecate "Ti.UI.TabbedBar" and deprecate "Ti.UI.iOS.TabbedBar"
*Summary:* We're adding {{Ti.UI.TabbedBar}} support to Android for parity. See [TIMOB-25953]. iOS currently has {{Ti.UI.TabbedBar}} flagged as deprecated in favor of {{Ti.UI.iOS.TabbedBar}}. Since Android will be have this feature soon, we should un-deprecate {{Ti.UI.TabbedBar}} on iOS and deprecate the other.
3
3,529
TIMOB-26686
01/02/2019 19:08:26
Android: Allow Ti.Network.HTTPClient "file" parameter to be set to Ti.Filesystem.File object like iOS
*Summary:* On Android, the {{Ti.Network.HTTPClient}} "file" property can only be set to a {{string}}. On iOS, the "file" property can be set to a {{string}} or {{Ti.Filesystem.File}} object. We should add {{File}} object support on Android for parity. *Community PR:* https://github.com/appcelerator/titanium_mobile/pull/10532
3
3,530
TIMOB-26689
01/04/2019 05:02:59
Windows: Wrong height for TableViewRow with Label
The height of first TableView row is rendered too big compared to other rows when row has a Label with relative width (e.g. "_80%_"). {code} var win = Ti.UI.createWindow(); var tableView = Ti.UI.createTableView({ width: Ti.UI.FILL, height: Ti.UI.FILL, data: [createRow(), createRow(), createRow()] }); win.add(tableView); function createRow() { var uid = (new Date()).getTime(); var row = Ti.UI.createTableViewRow({ borderWidth: 1, borderColor: '#F0F', }); var label1 = Ti.UI.createLabel({ width: '80%', text: 'Test 1 ' + uid, borderWidth: 1, borderColor: '#FF0' }); row.add(label1); return row; } win.open(); {code} Expected: The height of first row should have same height with other rows.
8
3,531
TIMOB-26690
01/04/2019 16:34:16
Windows: TabGroup does not fire open/close events
Our TabGroup unit test suite has to skip a number of tests on Windows due to lack of firing key events like open, close, focus, blur. We should be firing those events for TabGroups (and Tabs)!
8
3,532
TIMOB-26700
01/08/2019 01:09:47
Windows: Optimize UI rendering calls
Optimize UI rendering calls in our layout engine.
13
3,533
TIMOB-26702
01/08/2019 01:12:02
Windows: Make HAL more lightweight
HAL is heavy weight framework that is not quite efficient. We might be able to make it more lightweight.
13
3,534
TIMOB-26704
01/08/2019 15:17:21
LiveView: Transpilation does not work if not set in tiapp
h5.Description LiveView pulls whether it should transpile from the tiapp which was fine while it was opt-in (but it was still a bad thing), now it's opt-out the method needs to be updated. h5.Steps to reproduce 1. Run kitchensink-v2 with liveview and transpile removed from the tiapp to ios (you'll probably hit TIMOB-26649, just follow the workaround) h5.Actual Error like below due to not transpiling {code} [ERROR] SyntaxError: Unexpected identifier 'ActionBarHelper'. import call expects exactly one argument. [ERROR] File: app [ERROR] Line: 12 [ERROR] SourceId: <null> [ERROR] Backtrace: [ERROR] undefined {code} h5.Expected No error
5
3,535
TIMOB-26705
01/08/2019 16:44:11
iOS: Ti.App._restart() crashes application
h5.Description Calling the hidden {{Ti.App._restart();}} method on iOS crashes with the below, this is bad as it's used in liveview to restart the app. {code} [ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'. [ERROR] Reason: [ERROR] -[TiRootViewController shutdownUi:]: unrecognized selector sent to instance 0x7fbee0023400 [ERROR] Stack trace: [ERROR] 0 CoreFoundation 0x00000001160651bb __exceptionPreprocess + 331 [ERROR] 1 libobjc.A.dylib 0x0000000114e6f735 objc_exception_throw + 48 [ERROR] 2 CoreFoundation 0x0000000116083f44 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132 [ERROR] 3 UIKitCore 0x0000000121f66b4a -[UIResponder doesNotRecognizeSelector:] + 287 [ERROR] 4 CoreFoundation 0x0000000116069ed6 ___forwarding___ + 1446 [ERROR] 5 CoreFoundation 0x000000011606bda8 _CF_forwarding_prep_0 + 120 [ERROR] 6 ticreateapp 0x000000010f8804ae __22-[AppModule _restart:]_block_invoke + 94 [ERROR] 7 libdispatch.dylib 0x000000011847c4e1 _dispatch_call_block_and_release + 12 [ERROR] 8 libdispatch.dylib 0x000000011847d54b _dispatch_client_callout + 8 [ERROR] 9 libdispatch.dylib 0x0000000118489380 _dispatch_main_queue_callback_4CF + 1290 [ERROR] 10 CoreFoundation 0x0000000115fca3e9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 [ERROR] 11 CoreFoundation 0x0000000115fc4a76 __CFRunLoopRun + 2342 [ERROR] 12 CoreFoundation 0x0000000115fc3e11 CFRunLoopRunSpecific + 625 [ERROR] 13 GraphicsServices 0x000000011a5f31dd GSEventRunModal + 62 [ERROR] 14 UIKitCore 0x0000000121f3881d UIApplicationMain + 140 [ERROR] 15 ticreateapp 0x000000010f78d156 main + 950 [ERROR] 16 libdyld.dylib 0x00000001184ed575 start + 1 {code} h5.Steps to reproduce 1. Add the code below to and app.js {code} var win = Ti.UI.createWindow(); win.addEventListener('click', function () { Ti.App._restart(); }); win.open() {code} 2. Click the window h5.Actual Above crash h5.Expected App should restart back to the clean state
2
3,536
TIMOB-26713
01/10/2019 23:36:00
Android: TabGroup "tabsBackgroundColor" property ignored when landscape
*Summary:* {{TabGroup}} property "tabsBackgroundColor" will only apply the color to the top tab bar's background when the app is shown in "portrait" orientation. When "landscape", the color is ignored and will use the ActionBar's background color instead. Not that this is because the tab bar is moved inside of the ActionBar when landscape. The work-around is to set the ActionBar's "primaryColor" via an XML theme instead. Also, note that implementing tab bars via an ActionBar is considered deprecated as of Android 5.0 as well. *Steps to reproduce:* # Build and run the below code on Android. # Hold the device portrait. # Notice that the top tab bar's background color is red. (This is good.) # Rotate to landscape. # Notice top tab bar is dark gray. (This is the issue.) {code:javascript} function createTab(title) { var window = Ti.UI.createWindow({ title: title }); window.add(Ti.UI.createLabel({ text: title + " View" })); var tab = Ti.UI.createTab({ title: title, window: window, }); return tab; } var tabGroup = Ti.UI.createTabGroup({ tabs: [createTab("Tab 1"), createTab("Tab 2")], tabsBackgroundColor: "red", }); tabGroup.open(); {code} *Result:* !TabGroupPortrait-Good.png|thumbnail! !TabGroupLandscape-Bad.png|thumbnail! *Expected Result:* !TabGroupPortrait-Good.png|thumbnail! !TabGroupLandscape-Good.png|thumbnail!
8
3,537
TIMOB-26714
01/11/2019 01:03:15
Android: TabGroup "tabsBackgroundSelectedColor" property is ignored
*Summary:* Titanium documents that Android (and Windows) {{TabGroup}} supports a [tabsBackgroundSelectedColor|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TabGroup-property-tabsBackgroundSelectedColor] property which sets the background color of the currently selected tab. This property is ignored on Titanium 6.0.0 and newer versions. (It might have stopped working before 6.0.0; have not confirmed.) *Steps to reproduce:* # Build and run the below code on Android. # Notice that the selected tab's background color is not red. {code:javascript} function createTab(title) { var window = Ti.UI.createWindow({ title: title }); window.add(Ti.UI.createLabel({ text: title + " View" })); var tab = Ti.UI.createTab({ title: title, window: window, }); return tab; } var tabGroup = Ti.UI.createTabGroup({ tabs: [createTab("Tab 1"), createTab("Tab 2")], tabsBackgroundSelectedColor: "red", }); tabGroup.open(); {code} *Result:* !TabGroup-bad.png|thumbnail! *Expected Result:* !TabGroup-good.png|thumbnail!
8
3,538
TIMOB-26719
01/12/2019 04:53:53
Android: ListView no longer applying default row height
*Summary:* {{ListView}} rows are supposed to have a default height if the template doesn't have one. On Android, the default height used to be {{45dp}} (assigned [here|https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiDefaultListViewTemplate.java#L90]). As of Titanium 8.0.0, the default height is no longer being applied and the rows are auto-sizing to fit the height of the row's contents instead. *Steps to reproduce:* # Build and run the below code on Android. # Notice that the rows just-fit the height of the row text. (This is the problem.) {code:javascript} function createListViewSectionItems() { var items = []; for (var index = 1; index <= 100; index++) { items.push({ properties: { title: "Row " + index } }); } return items; } var window = Ti.UI.createWindow(); window.add(Ti.UI.createListView({ sections: [Ti.UI.createListSection({ headerTitle: "ListView", items: createListViewSectionItems(), })], })); window.open(); {code} *Result:* !ListView-bad.png|thumbnail! *Expected Result:* This is how it used to work in Titanium 7.x.x. !ListView-good.png|thumbnail! *Note:* We can't solve this issue by setting a min height to the row's root layout. While that would work, Titanium app developers have spoken out in the past that they don't want this behavior as can be seen in [TIMOB-19812]. We removed the min height as of Titanium 6.0.0 and we need to keep this behavior. But it's okay to apply a default height if one was not specified.
3
3,539
TIMOB-26724
01/14/2019 13:13:14
Android: How to achieve a service that can continue to run at regular intervals, even if the device goes to sleep.
Hello! What we are trying to achieve is a service that can continue to run at regular intervals, even if the device goes to sleep. If calling "foregroundNotify" is meant to make the service run as a foreground service and foreground services are meant to behave like this, then why is this is not working? What we are trying to achieve is an app that can regularly poll a user's position (using location services), even if the app is in the background. Test Code: {code} function monitorLocation() { function start() { Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_HIGH; Ti.Geolocation.addEventListener("location", function(e) { Ti.Media.vibrate(); Ti.API.info("@@@ Location Received: " + JSON.stringify(e.coords)); }); } var hasPermission = Ti.Geolocation .hasLocationPermissions(Ti.Geolocation.AUTHORIZATION_WHEN_IN_USE); if (!hasPermission) { Ti.Geolocation.requestLocationPermissions( Ti.Geolocation.AUTHORIZATION_WHEN_IN_USE, function(e) { if (e.success) { start(); } }); } else { start(); } } var SECONDS = 20; var intent = Ti.Android.createServiceIntent({ url : 'Service.js' }); intent.putExtra('interval', SECONDS * 1000); var service = Ti.Android.createService(intent); service.start(); var window = Ti.UI.createWindow(); window.addEventListener("open", function(e) { monitorLocation(); }); window.addEventListener("open", function(e) { const forPermissions = [ 'android.permission.FOREGROUND_SERVICE' ]; Ti.Android.requestPermissions(forPermissions, function(e) { if (e.success) { Ti.API.info('SUCCESS'); } else { Ti.API.info('ERROR: ' + e.error); } }); }); window.open(); {code} Service.js {code} Ti.API.info("@@@ Service started."); // Gets an intent used to resume the app if running in the background. function getAppResumeIntent() { var intent = Ti.App.Android.launchIntent; if (!intent) { intent = Ti.Android.createIntent({}); } return intent; } // Put this service into the foreground state. var notificationId = 123; Ti.Android.currentService.foregroundNotify(notificationId, Ti.Android.createNotification({ contentTitle: "Foreground Service", contentText: "Content Text", contentIntent: Ti.Android.createPendingIntent({ // Using the launch intent will resume the app when tapped. intent: getAppResumeIntent(), }), })); {code} {code:xml} <android xmlns:android="http://schemas.android.com/apk/res/android"> <services> <service type="interval" url="Service.js"/> </services> <manifest> <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> </manifest> </android> {code} On running this app, sure enough, it will consistency poll every 20 seconds as expected. However, if you unplug the device (no longer being charged) and leave it unattended for 5 minutes, you will find that the polling stops almost as soon as the device goes to sleep. You can see this even with your supplied logic because a new notification titled "Foreground Service" should be received / updated every 20 seconds but you will find that it won't until you wake the device again (sending a unique notificationId may help to see multiple notifications rather than the 1 being overridden every time). Basically, what I'm saying is we are experiencing the exact same issue on our application in that the service (doesn’t seem to matter if it’s a 'started' / 'bound 'or 'foreground' service) seems to simply stop processing when the device goes to sleep and will only start again when the device wakes up. THIS IS ONLY SEEN WHEN THE DEVICE IS NOT CONNETED TO A POWER SOURCE E.G. CONNETED TO A COMPUTER TO DEBUG. *Note*: On looking at previous posted solutions, I have seen some people saying to use a local notification with a "wake lock" (see ticket TIMOB-24629) or by using something known as Ti.Android.currentService.foregroundNotify (see ticket [TIMOB-16066|https://jira.appcelerator.org/browse/TIMOB-16066]) but both solutions don't appear to have any official documentation as to how to fully implement. Note: Test Devices android 8
0
3,540
TIMOB-26725
01/14/2019 19:18:30
Android: Liveview closes file/event server process after the first app reload & stops working
NOTE: To make liveview work with 8.0.0 use latest studio 5.1.2 from jenkins. h5.Steps to reproduce: 1. Create a default app. 2. Enable liveview. 3. Build for android device/emulator. 4. After the app launches make changes to initiate app reload. 5. Make another change & again initiate app reload. h5.Actual results: 1. Liveview closes the file/event server process & stops working : {code} [LiveView] Closing file/event server process id: 49697 {code} 2. I also get these warnings: {code} [WARN] : [Pixel] W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.InputStream java.net.Socket.getInputStream()' on a null object reference [WARN] : [Pixel] W/System.err: at ti.modules.titanium.network.socket.TCPProxy.readSync(TCPProxy.java:392) [WARN] : [Pixel] W/System.err: at ti.modules.titanium.stream.StreamModule.pumpSync(StreamModule.java:359) [WARN] : [Pixel] W/System.err: at ti.modules.titanium.stream.StreamModule.access$300(StreamModule.java:24) [WARN] : [Pixel] W/System.err: at ti.modules.titanium.stream.StreamModule$3.run(StreamModule.java:343) [WARN] : [Pixel] W/System.err: at java.lang.Thread.run(Thread.java:764) {code} h5.Expected result: 1. Liveview should not close the file/event server & work as expected. Additional logs: {code} [LiveView] Closing file/event server process id: 51218 at Object._errnoException (util.js:1024:11) at process.kill (internal/process.js:183:18) at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:103:12 at Array.forEach (<anonymous>) at Object.FServer.stop (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:98:7) at Timeout.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:354:13) at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5) --------------------------------------------- at Socket.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:353:20) at emitNone (events.js:111:20) at Socket.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1056:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickDomainCallback (internal/process/next_tick.js:218:9) --------------------------------------------- at Socket.Readable.on (_stream_readable.js:772:35) at Server.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:348:10) at emitOne (events.js:116:13) at Server.emit (events.js:211:7) at TCP.onconnection (net.js:1561:8) --------------------------------------------- at Object.FServer.start (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:341:12) at startServer (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/hook/lvhook.js:225:11) at ClientRequest.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/hook/lvhook.js:182:6) at emitNone (events.js:106:13) at ClientRequest.emit (events.js:208:7) at Socket.socketCloseListener (_http_client.js:350:7) at emitOne (events.js:121:20) --------------------------------------------- at Domain.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/hook/lvhook.js:181:6) at Domain.run (domain.js:242:14) at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/hook/lvhook.js:176:10 at /Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/lib/hook.js:235:13 at /Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:3845:9 at replenish (/Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:1030:17) at /Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:1034:9 at eachOfLimit (/Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:1061:22) at /Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:1066:16 code: 'ESRCH', errno: 'ESRCH', syscall: 'kill' } [LiveView] Error closing server { Error: kill ESRCH at Object._errnoException (util.js:1024:11) at process.kill (internal/process.js:183:18) at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:103:12 at Array.forEach (<anonymous>) at Object.FServer.stop (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:98:7) at Timeout.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:354:13) [LiveView] Closing file/event server process id: 51521 at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5) --------------------------------------------- at Socket.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:353:20) at emitNone (events.js:111:20) at Socket.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1056:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickDomainCallback (internal/process/next_tick.js:218:9) --------------------------------------------- at Socket.Readable.on (_stream_readable.js:772:35) at Server.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:348:10) at emitOne (events.js:116:13) at Server.emit (events.js:211:7) at TCP.onconnection (net.js:1561:8) --------------------------------------------- at Object.FServer.start (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:341:12) at startServer (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/hook/lvhook.js:225:11) at ClientRequest.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/hook/lvhook.js:182:6) at emitNone (events.js:106:13) at ClientRequest.emit (events.js:208:7) at Socket.socketCloseListener (_http_client.js:350:7) at emitOne (events.js:121:20) --------------------------------------------- at Domain.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/hook/lvhook.js:181:6) at Domain.run (domain.js:242:14) at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/hook/lvhook.js:176:10 at /Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/lib/hook.js:235:13 at /Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:3845:9 at replenish (/Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:1030:17) at /Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:1034:9 at eachOfLimit (/Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:1061:22) at /Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:1066:16 code: 'ESRCH', errno: 'ESRCH', syscall: 'kill' } [LiveView] Error closing server { Error: kill ESRCH at Object._errnoException (util.js:1024:11) at process.kill (internal/process.js:183:18) at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:103:12 at Array.forEach (<anonymous>) at Object.FServer.stop (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:98:7) at Timeout.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:354:13) at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5) --------------------------------------------- at Socket.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:353:20) at emitNone (events.js:111:20) at Socket.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1056:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickDomainCallback (internal/process/next_tick.js:218:9) --------------------------------------------- at Socket.Readable.on (_stream_readable.js:772:35) at Server.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:348:10) at emitOne (events.js:116:13) at Server.emit (events.js:211:7) at TCP.onconnection (net.js:1561:8) --------------------------------------------- at Object.FServer.start (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/lib/fserver.js:341:12) at startServer (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/hook/lvhook.js:225:11) at ClientRequest.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/hook/lvhook.js:182:6) at emitNone (events.js:106:13) at ClientRequest.emit (events.js:208:7) at Socket.socketCloseListener (_http_client.js:350:7) at emitOne (events.js:121:20) --------------------------------------------- at Domain.<anonymous> (/Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/hook/lvhook.js:181:6) at Domain.run (domain.js:242:14) at /Users/lchoudhary/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.v20190114044343/node_modules/liveview/hook/lvhook.js:176:10 at /Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/lib/hook.js:235:13 at /Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:3845:9 at replenish (/Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:1030:17) at /Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:1034:9 at eachOfLimit (/Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:1061:22) at /Users/lchoudhary/.appcelerator/install/7.0.9/package/node_modules/titanium/node_modules/async/dist/async.js:1066:16 code: 'ESRCH', errno: 'ESRCH', syscall: 'kill' } {code}
1
3,541
TIMOB-26726
01/14/2019 20:14:39
Liveview: Autokill server after a period of time
h5.Description It was suggested to autokill the liveview server if we receive no input for a certain amount of time. https://github.com/appcelerator/liveview/pull/119
1
3,542
TIMOB-26727
01/15/2019 00:18:32
Hyperloop: Android app using hyperloop 4.0.0 hangs on splash when built with 7.5.0.GA & latest 7.5.1
h5.Steps to reproduce: 1. Create a default app having hyperloop 4.0.0. 2. Build for Android device/emulator. h5.Actual result: 1. App is stuck at splash at launch & we do see this error in logcat: {code} 01-14 15:55:32.437 2950 2950 D AndroidRuntime: Shutting down VM 01-14 15:55:32.437 2950 2950 E AndroidRuntime: FATAL EXCEPTION: main 01-14 15:55:32.437 2950 2950 E AndroidRuntime: Process: com.app.timob26719, PID: 2950 01-14 15:55:32.437 2950 2950 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN8titanium11TiViewProxy16getProxyTemplateEN2v85LocalINS1_7ContextEEE" referenced by "/data/app/com.app.timob26719-MEEWudT-8rk457q_wUWhzg==/lib/arm64/libhyperloop.so"... 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1016) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1669) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:139) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:113) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:207) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:113) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at org.appcelerator.kroll.KrollRuntime.init(KrollRuntime.java:135) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at com.app.timob26719.Timob26719Application.onCreate(Timob26719Application.java:95) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at android.app.ActivityThread.access$1100(ActivityThread.java:199) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6669) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 01-14 15:55:32.437 2950 2950 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) {code} h5.Expected result: 1. App should not be stuck on the splash screen & should launch fine.
5
3,543
TIMOB-26729
01/15/2019 17:38:04
TiAPI: Ship baseline polyfills in built SDK
As part of our ES6/7/8 support we now use babel transpilation via preset-env and polyfills. Currently, we are injecting polyfills based on usage during the transpiration process. The avoids unnecessary polyfills, but may lead to the same polyfills being required across many files. We can potentially move the polyfills into the app bootstrapping core js code we ship in the SDK itself so that the polyfills are required only once at startup. Pros: - potential speed boost when making use of polyfills by only loading them once (though also a potential startup perf hit!) - make use of polyfills in our core js bootstrap code - remove special polyfill copying done in node-titanium-sdk during app builds Cons: - shipping polyfills twice in built SDK right now (under node-titanium-sdk and in the bootstrap code) - can be fixed by removing from node-titanium-sdk - no gain (but instead a perf hit!) if these polyfills are't actually being used
13
3,544
TIMOB-26740
01/16/2019 21:33:36
Update Hyperloop to 4.0.1
Due to TIMOB-26727 we need a new version of Hyperloop compiled with the latest 8_0_X branch.
2
3,545
TIMOB-26742
01/17/2019 09:12:51
TiAPI: App launch slowed down by 2-5 seconds in SDK 8
When using SDK 8, the app launch is now extremely slow. It looks like the "core-js" libraries take waaay to long. It needs to be solved differently in order to be used in production apps. Any kind of logs or insight in our app can be shared with the core team.
13
3,546
TIMOB-26746
01/18/2019 04:08:24
Android: Ti.App wrongly fires pause/resume event when opening/closing child windows
*Summary:* {{Ti.App}} events "pause" and "paused" must only be fired when the app is put into the background. Events "resume" and "resumed" are to be fired when the app is returned to the foreground (include cold app startup). Android correctly does the above when put into the background and foreground. However, Android will also fire a "pause" and "resume" event when opening or closing a child window. This does not follow iOS' behavior and is a parity issue. *Note:* To be fair, the current pause/resume event behavior is how it natively works with Android's individual activities. However, app developers need these events to disable sensors when backgrounded and re-enable them when put back into the foreground, which is currently difficult to do in Titanium for the moment. *Steps to reproduce:* # Build and run the below code on Android. # Tap the "Open Child" button. # Observe the log. # Notice that pause and resume events were logged. _(This is the bug.)_ {code:javascript} function appEventHandler(e) { Ti.API.info("@@@ '" + e.type + "' event received."); if ((Ti.Platform.name === "android") || (Ti.Platform.name === "windows")) { Ti.UI.createNotification({ message: e.type, duration: Ti.UI.NOTIFICATION_DURATION_SHORT, }).show(); } } Ti.App.addEventListener("resume", appEventHandler); Ti.App.addEventListener("resumed", appEventHandler); Ti.App.addEventListener("pause", appEventHandler); Ti.App.addEventListener("paused", appEventHandler); Ti.App.addEventListener("close", appEventHandler); var rootWindow = Ti.UI.createWindow({ title: "Parent Window" }); var openButton = Ti.UI.createButton({ title: "Open Child" }); openButton.addEventListener("click", function() { var childWindow = Ti.UI.createWindow({ title: "Child Window" }); var closeButton = Ti.UI.createButton({ title: "Close Child" }); closeButton.addEventListener("click", function() { childWindow.close(); }); childWindow.add(closeButton); childWindow.open(); }); rootWindow.add(openButton); rootWindow.open(); {code}
3
3,547
TIMOB-26748
01/18/2019 23:28:45
Windows: Always send full analytics payload
- Always send full analytics payload for parity with iOS and Android - Update endpoint to V4
3
3,548
TIMOB-26758
01/21/2019 12:03:59
Android: Changing TabbedBar properties "labels" and "index" before opening window causes a crash
*Summary:* Changing {{Ti.UI.TabbedBar}} properties "labels" or "index" after creating the tabbed bar but before its parent window will cause a crash. This is a parity issue. iOS allows these properties to be changed dynamically. *Steps to reproduce:* # Build and run the below code on Android. # On app startup, notice it crashes. {code:javascript} var window = Ti.UI.createWindow(); var tabbedBar = Ti.UI.createTabbedBar(); tabbedBar.labels = ["One", "Two", "Three"]; tabbedBar.index = 1; Ti.API.info("@@@ TabbedBar.index: " + tabbedBar.index); window.add(tabbedBar); window.open(); {code} *Result:* Will get the below error when setting the "labels" property. {code} [ERROR] TiExceptionHandler: Error: Attempt to invoke virtual method 'void ti.modules.titanium.ui.widget.TiUITabbedBar.setNewLabels()' on a null object reference {code} Will get the below error when setting the "index" property. {code} [ERROR] TiExceptionHandler: Error: Attempt to invoke virtual method 'void ti.modules.titanium.ui.widget.TiUITabbedBar.setSelectedIndex(int)' on a null object reference {code} *Work-Around:* Move all property {{TabbedBar}} property changing code to the window's open event handler. Or avoid setting these property dynamically and assign them once via its creation properties. {code:javascript} var window = Ti.UI.createWindow(); var tabbedBar = Ti.UI.createTabbedBar({ labels: ["One", "Two", "Three"], index: 1, }); window.add(tabbedBar); window.open(); {code}
5
3,549
TIMOB-26766
01/25/2019 17:06:23
Windows: Timeout error thrown when installing to wp-device
When building to windows device a time out error is thrown # Create a mobile app # Build to device *Actual* *Error* {noformat} [ERROR] : Timed out after 60000 milliseconds trying to connect to device [ERROR] : Error: Timed out after 60000 milliseconds trying to connect to device at Timeout.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\8.0.0.v20190125034038\node_modules\windowslib\lib\wptool.js:958:13) at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5) {noformat} *Expected* No error
5
3,550
TIMOB-26767
01/25/2019 17:12:09
Auto-select only valid certificate and/or provisioning profile when building to device
Don't make the user select their provisioning profile and development certificate when building to a device if there's only one valid option. It's pointless to ask them to choose from only one possible value.
3
3,551
TIMOB-26772
01/27/2019 11:46:32
iOS: ListView with attributed strings shows "Invalid type passed to function" error.
*Issue Description:* When I try to build a project using listView attributed string on iOS, it shows the following error on latest ti SDK 7.5.0.GA *Error Log:* {code} error log: [ERROR] Script Error { [ERROR] column = 24; [ERROR] line = 89; [ERROR] message = "Invalid type passed to function"; [ERROR] nativeLocation = "-[TiUILabel setAttributedString_:] (TiUILabel.m:485)"; [ERROR] nativeReason = "expected: TiUIAttributedStringProxy, was: NSNull"; [ERROR] nativeStack = "3 listViewIssue 0x00000001094f3bdb -[TiUIView throwException:subreason:location:] + 107\n4 listViewIssue 0x00000 001095619a7 -[TiUILabel setAttributedString_:] + 503\n5 listViewIssue 0x0000000109576cdf __DoProxyDelegateChangedValuesWithProxy_block_invoke.5 4 + 47\n6 listViewIssue 0x00000001095c005e TiThreadPerformOnMainThread + 78\n7 listViewIssue 0x0000000109576bc5 DoProxyDelegateChangedValue sWithProxy + 853\n8 listViewIssue 0x00000001094f8744 -[TiUIView propertyChanged:oldValue:newValue:proxy:] + 68\n9 listViewIssue 0x000000010 957c8aa -[TiProxy replaceValue:forKey:notification:] + 1114\n10 listViewIssue 0x000000010957cabd -[TiProxy setValue:forUndefinedKey:] + 77\n11 listViewIssue 0x00000001094c5b96 -[TiViewProxy setValue:forUndefinedKey:] + 278\n12 Foundation 0x000000010b8750b4 -[NSObject(NSKeyValueCoding) s etValue:forKey:] + 292\n13 Foundation 0x000000010b875909 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 271\n14 listViewIssue 0x000000010 972ac5e __28-[TiUIListItem setDataItem:]_block_invoke.338 + 206\n15 CoreFoundation 0x0000000110115c2a -[__NSSetM enumerateObjectsWithOptions:usin gBlock:] + 218\n16 listViewIssue 0x0000000109729eff -[TiUIListItem setDataItem:] + 4399\n17 listViewIssue 0x000000010973e13a -[TiUIListView t ableView:heightForRowAtIndexPath:] + 666\n18 UIKitCore 0x000000011b177f2b -[UITableView _dataSourceHeightForRowAtIndexPath:] + 108\n19 UIKitCore 0x000000011b1c78ba __66-[UISectionRowData refreshWithSection:tableView:tableViewRowData:]_block_invoke + 350"; [ERROR] sourceURL = "file:///Users/user/Library/Developer/CoreSimulator/Devices/38370841-28B4-4E7C-8B1E-89D45DC29E2F/data/Containers/Bundle/App lication/325AB006-5B5A-4BCB-A0CE-95574C8D6B95/listViewIssue.app/alloy/controllers/index.js"; [ERROR] stack = " at [native code]\n at Controller(/alloy/controllers/index.js:89:24)\n at createController(/alloy.js:339:52)\n at (/app.js:11:23)\n at global code(/app.js:13:70)\n at require@[native code]\n at (/ti.main.js:27:10)\n at loadAsync(/ti.internal/bootstr ap.loader.js:106:11)\n at global code(/ti.main.js:24:52)"; [ERROR] toJSON = "<KrollCallback: 0x600002968040>"; [ERROR] } [ERROR] Script Error Module "app.js" failed to leave a valid exports object [DEBUG] Application booted in 646.753073 ms [ERROR] The application has crashed with an uncaught exception 'org.listviewissue.TiUILabel'. [ERROR] Reason: [ERROR] Invalid type passed to function [ERROR] Stack trace: [ERROR] 0 CoreFoundation 0x00000001101a729b __exceptionPreprocess + 331 [ERROR] 1 libobjc.A.dylib 0x000000010efc8735 objc_exception_throw + 48 [ERROR] 2 listViewIssue 0x00000001095bfdad TiExceptionThrowWithNameAndReason + 141 [ERROR] 3 listViewIssue 0x00000001094f3bdb -[TiUIView throwException:subreason:location:] + 107 [ERROR] 4 listViewIssue 0x00000001095619a7 -[TiUILabel setAttributedString_:] + 503 [ERROR] 5 listViewIssue 0x0000000109576cdf __DoProxyDelegateChangedValuesWithProxy_block_invoke.54 + 47 [ERROR] 6 listViewIssue 0x00000001095c005e TiThreadPerformOnMainThread + 78 [ERROR] 7 listViewIssue 0x0000000109576bc5 DoProxyDelegateChangedValuesWithProxy + 853 [ERROR] 8 listViewIssue 0x00000001094f8744 -[TiUIView propertyChanged:oldValue:newValue:proxy:] + 68 [ERROR] 9 listViewIssue 0x000000010957c8aa -[TiProxy replaceValue:forKey:notification:] + 1114 [ERROR] 10 listViewIssue 0x000000010957cabd -[TiProxy setValue:forUndefinedKey:] + 77 [ERROR] 11 listViewIssue 0x00000001094c5b96 -[TiViewProxy setValue:forUndefinedKey:] + 278 [ERROR] 12 Foundation 0x000000010b8750b4 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 292 [ERROR] 13 Foundation 0x000000010b875909 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 271 [ERROR] 14 listViewIssue 0x000000010972ac5e __28-[TiUIListItem setDataItem:]_block_invoke.338 + 206 [ERROR] 15 CoreFoundation 0x0000000110115c2a -[__NSSetM enumerateObjectsWithOptions:usingBlock:] + 218 [ERROR] 16 listViewIssue 0x0000000109729eff -[TiUIListItem setDataItem:] + 4399 [ERROR] 17 listViewIssue 0x000000010973e13a -[TiUIListView tableView:heightForRowAtIndexPath:] + 666 [ERROR] 18 UIKitCore 0x000000011b177f2b -[UITableView _dataSourceHeightForRowAtIndexPath:] + 108 [ERROR] 19 UIKitCore 0x000000011b1c78ba __66-[UISectionRowData refreshWithSection:tableView:tableViewRowData:]_block_inv oke + 350 [ERROR] 20 UIKitCore 0x000000011b1c7112 -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 3281 [ERROR] 21 UIKitCore 0x000000011b1cd151 -[UITableViewRowData rectForFooterInSection:heightCanBeGuessed:] + 487 [ERROR] 22 UIKitCore 0x000000011b1cd2b7 -[UITableViewRowData heightForTable] + 61 [ERROR] 23 UIKitCore 0x000000011b12698f -[UITableView _updateContentSize] + 354 [ERROR] 24 UIKitCore 0x000000011b14d587 -[UITableView setTableHeaderView:] + 466 [ERROR] 25 listViewIssue 0x0000000109732413 __33-[TiUIListView proxyDidRelayout:]_block_invoke + 307 [ERROR] 26 libdispatch.dylib 0x00000001116b951d _dispatch_call_block_and_release + 12 [ERROR] 27 libdispatch.dylib 0x00000001116ba587 _dispatch_client_callout + 8 [ERROR] 28 libdispatch.dylib 0x00000001116c63bc _dispatch_main_queue_callback_4CF + 1290 [ERROR] 29 CoreFoundation 0x000000011010a7f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 [ERROR] 30 CoreFoundation 0x0000000110104e86 __CFRunLoopRun + 2342 [ERROR] 31 CoreFoundation 0x0000000110104221 CFRunLoopRunSpecific + 625 [ERROR] 32 GraphicsServices 0x00000001133531dd GSEventRunModal + 62 [ERROR] 33 UIKitCore 0x000000011abf6115 UIApplicationMain + 140 [ERROR] 34 listViewIssue 0x000000010948c263 main + 115 [ERROR] 35 libdyld.dylib 0x000000011172a551 start + 1 -- End simulator log --------------------------------------------------------- users-MacBook-Pro-2:listViewIssue user$ {code} *Steps to Reproduce:* 1. Replace index.xml, index.js, index.tss with the following test code. *index.xml* {code} <Alloy> <Window class="container"> <ListView id="listView"> <Templates> <ItemTemplate name="simpleLabel"> <Label bindId="label1" id="label1"/> </ItemTemplate> </Templates> </ListView> </Window> </Alloy> {code} *index.js* {code} var listSection = Ti.UI.createListSection(); var dataItems = []; for (var i = 0; i < 100; i++) { var data = { template : "simpleLabel", label1 : {}, }; if (i % 2 === 1) { data.label1.attributedString = Ti.UI.createAttributedString({ text : "Italic row row row" + i, attributes : [{ type : Ti.UI.ATTRIBUTE_FONT, value : { fontWeight : "normal", fontStyle : "italic", }, range : [0, 6], }] }); } else { //data.label1.text = "Normal"; data.label1.text = "Normal" + i; } dataItems.push(data); }; listSection.setItems(dataItems); $.listView.setSections([listSection]); $.index.open(); {code} *index.tss* {code} ".container": { backgroundColor: "#fff", layout: "vertical", } "#listView": { height: Ti.UI.FILL, width: Ti.UI.FILL, } "#label1": { font: { fontSize: 26, }, color: "#000", } "Label": { color: "#000", font: { fontSize: 30, }, } {code} 2. Build the project on iOS simulator and observe the error. *Expected:* ListView attributed string should work *Actual:* It doesn't work, generates the said error.
0
3,552
TIMOB-26774
01/28/2019 20:28:55
Android: When backgrounded, data intent no longer re-executes "app.js" as of 7.5.0
*Summary:* If the Android app's UI is in the background and you attempt to launch it via a data intent (aka: URL scheme, notification, or {{startActivity()}} intent), then the app's splash screen will be displayed but nothing will happen. This is a *regression* as of 7.5.0. Titanium 7.4.2 and older versions would re-execute the "app.js" in this case. *Cause:* What's happening is that a new UI activity stack is being created by the data intent while an existing UI stack already exists in the background. Titanium only supports running 1 JavaScript runtime at a time (does not support multiple JS runtimes). So, when the 2nd UI stack is displayed, it attempts to load the "app.js" when it was already loaded before. In Titanium 7.4.2 and older versions, Titanium would re-execute the "app.js" for the JavaScript runtime, even though it was already loaded before. This was unintended behavior, but some app developers depend on this behavior. As of 7.5.0, Titanium now loads a "ti.main.js" script on startup (our bootstrap script) and then loads the "app.js" via the {{require()}} function. But for the 2nd UI stack, since it's re-using an existing JavaScript runtime and the "app.js" was loaded before, the {{require()}} function won't re-execute the script and returns a cached module instead. This behavior is technically correct, but the old unexpected behavior is what's desired for Titanium 7.5.x. *Note:* As of Titanium 8.0.0, the above is not an issue. Intent handling was refactored in 8.0.0 to guarantee that only one UI stack exists at a time. Data intents will instead resume the existing UI stack like how iOS works. See [TIMOB-26075] for more details. *Steps to reproduce:* # Create a classic Titanium app. # Set project name to "IntentTest". (This is {{<name/>}} in "tiapp.xml".) # Set project's "Application Id" to "com.appc.intent.test". (This is {{<id/>}} in "tiapp.xml.) # Set up the "app.js" with the below code. # Build and run on Android. # Wait for the app to launch. # Open the Mac "Terminal" app. # CD (change directory) to: {{~/Library/Android/sdk/platform-tools}} # In the terminal, enter: {{./adb shell am start -n com.appc.intent.test/.IntenttestActivity -a android.intent.action.VIEW -d https://www.google.com -f 0x04000000}} {code:javascript} var window = Ti.UI.createWindow(); var text = "Hello World!"; if (Ti.Android) { text += "\n\nLaunch Intent:\n" + JSON.stringify(Ti.Android.currentActivity.intent); } window.add(Ti.UI.createLabel({ text: text, width: Ti.UI.FILL, height: Ti.UI.SIZE, })); window.open(); {code} *Result:* A new splash screen window instance is displayed, but doesn't show the window and label implemented via the "app.js" code. *Expected Result:* It should re-execute the "app.js" when 2nd UI stack is displayed to maintain old behavior. ---- *Original Description* ---- Using 7.5.0.GA, application gets stuck on the splash screen when navigating back from the TargetApp towards the SourceApp after having the TargetApp opened from the SourceApp. Using 7.4.2.GA, it was working fine. If you make 2 apps use the code below and tap their buttons to launch the other app, you can reproduce this behavior. [^SourceApp.js] [^TargetApp.js]
5
3,553
TIMOB-26776
01/29/2019 04:24:13
Windows: App launch failed with "cyclic redundancy check" error on device
Application fails to launch and throws runtime error on Windows 10 mobile device with "cyclic redundancy check" error (See screenshot attached) *Steps to reproduce;* # Create a new alloy application {{appc new}} # Build to device {{appc run -p windows -T wp-device}} # Build to device again {{appc run -p windows -T wp-device}}
8
3,554
TIMOB-26777
01/29/2019 22:58:27
Android: Window UI disappears when connecting/disconnecting keyboard
*Summary:* The Titanium window UI will disappear when doing the following on Android: * Connect or disconnect a bluetooth keyboard. * Open or close a phone's slide-out keyboard. (Like the old Droid devices.) *Steps to reproduce:* # Connect a bluetooth keyboard to an Android device. # Launch a Titanium app on that device. # Turn off the bluetooth keyboard (or pull the batteries out). *Result:* The UI disappears when the keyboard disconnects. *Cause:* Titanium generates an "AndroidManifest.xml" when doing an Android build. The Titanium {{<activity/>}} elements have an "android:configChanges" attribute which are missing the "keyboard" value. This is needed to override the Android OS' default behavior of destroying the activity and recreating it when a keyboard disconnects. (We overriding the "orientation" change event for the same reason.) https://developer.android.com/guide/topics/manifest/activity-element#config *Recommended Solution:* We need to updating Titanium's "AndroidManifest.xml" template and/or "_build.js" to automatically add the "keyboard" setting to all activities that do not load UI from XML such as the root activity, TiActivity, JSActivity, etc. *Work-Around:* Add the following to the "tiapp.xml" to override the the "keyboard" handling yourself. Note that the activity name is based on the app's name. If the app's name is "MyAppName", then the activity name will be "MyappnameActivity". {code:javascript} <?xml version="1.0" encoding="UTF-8"?> <ti:app xmlns:ti="http://ti.appcelerator.org"> <android xmlns:android="http://schemas.android.com/apk/res/android"> <manifest> <application> <activity android:name=".MyappnameActivity" android:configChanges="keyboard|keyboardHidden|orientation|fontScale|screenSize|smallestScreenSize|screenLayout|density"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <activity android:name="org.appcelerator.titanium.TiActivity" android:configChanges="keyboard|keyboardHidden|orientation|fontScale|screenSize|smallestScreenSize|screenLayout|density"/> </application> </manifest> </android> </ti:app> {code}
3
3,555
TIMOB-26778
01/29/2019 23:57:50
Android: Default "configChanges" settings are lost when overriding root activity in "tiapp.xml"
*Summary:* Titanium generates an "AndroidManifest.xml" when building an Android app. By default, the root activity will be assigned the following "android:configChanges" settings: * keyboardHidden * orientation * fontScale * screenSize * smallestScreenSize * screenLayout * density But if you override the root activity in the "tiapp.xml" without setting the "android:configChanges" yourself, then most of the above settings will be lost in the generated "AndroidManifest.xml". Only the below will be remaining. * screenSize * density *Why is this a problem:* By default, the Android OS will destroy and recreate the window activity when a system event such as an "orientation" change occurs. Since "android:configChanges" such as "orientation" is lost in this case, rotating the app while its loading at the splash screen will cause the app to reload every time you change orientation. Also note that app developers often do override the root activity in the "tiapp.xml" in order to set up their own custom intent-filters or to apply their own theme to the splash screen (such as a translucent status bar). So, this is a commonly done. *Steps to reproduce:* 1. Create a Titanium app with project name "MyApp". 2. Insert the below XML into your "tiapp.xml". 3. Set up the "app.js" as shown below. It should be blank. 4. Build and run the app. 5. Verify the following gets logged on startup: {{MyApp 1.0 (Powered By Titanium ...)}} 6. Rotate the app from portrait to landscape or vice-versa. 7. Notice the {{MyApp 1.0 (Powered By Titanium ...)}} gets logged again. _(This means the app restarted. This is bad.)_ 8. Go to app project folder: {{./build/android}} 9. Open the "AndroidManifest.xml" file. 10. Look for an XML {{<activity/>}} element with name ".MyappActivity". 11. Notice that the "android:configChanges" attribute only has settings {{"screenSize|density"}} defined. _(This is the issue.)_ app.js {code:javascript} // Keep this file blank. {code} tiapp.xml {code:xml} <?xml version="1.0" encoding="UTF-8"?> <ti:app xmlns:ti="http://ti.appcelerator.org"> <android xmlns:android="http://schemas.android.com/apk/res/android"> <manifest> <application> <activity android:name=".MyappActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application> </manifest> </android> </ti:app> {code} *Expected Result:* Titanium's default "android:configChanges" listed up above should always be included when overriding the root activity... *unless* the app developer sets the "android:configChanges" themselves, in which case we should honor the developer's settings. *Note:* This used to be a bigger issue in Titanium 7.4.1 and below since the "app.js" would have been re-executed every time you change orientation on startup. In 7.5.0 and above, Titanium loads "ti.main.js" instead which is lighter-weight and its call to {{require("app.js")}} would have no-op'ed upon re-execution of "ti.main.js" since the "app.js" was already cached.
3
3,556
TIMOB-26779
01/30/2019 00:12:52
Android: Ti.UI.Android.SearchView only icon responds to search
- Pressing the SearchView bar does not gain focus and ability to search, only the icon responds. *TEST CASE* {code:js} const win = Ti.UI.createWindow({ backgroundColor: 'gray' }); const search = Ti.UI.Android.createSearchView(); const table = Titanium.UI.createTableView({ data: [ Ti.UI.createTableViewRow({ title:'Apple' }), Ti.UI.createTableViewRow({ title:'Banana' }), Ti.UI.createTableViewRow({ title:'Orange' }), Ti.UI.createTableViewRow({ title:'Raspberry' }) ], search: search, searchAsChild: true }); win.add(table); win.open(); {code}
2
3,557
TIMOB-26782
01/30/2019 17:22:20
Windows: Error thrown when installing a packaged application to device using wptools
When installing a packaged windows application to a device the error below is thrown {noformat} C:\Users\jlongton\apps\TIMOB-26776>"C:\Program Files (x86)\Windows Kits\10\bin\x86\WinAppDeployCmd.exe" install -file C:\Users\jlongton\Desktop\Packaged\Smokeysmoke_1.0.0.0_ARM.appxbundle -ip 127.0.0.1 Windows App Deployment Tool Version 10.0.0.0 Copyright (c) Microsoft Corporation. All rights reserved. Opening connection to device at '127.0.0.1'. Installing app... Disconnecting. 0x80131500 - Failed to install or update package: Unspecified error 'Microsoft Platform Extensions' violates pattern constraint of '\bms-resource:.{1,256}'. 0x80131505 - Unspecified error 'Microsoft Platform Extensions' violates pattern constraint of '\bms-resource:.{1,256}'. 0x800705B4 - Unspecified error 'Microsoft Platform Extensions' violates pattern constraint of '\bms-resource:.{1,256}'. {noformat} *Steps to Reproduce* # Create an alloy application # Package the application to windows phone {{appc run -p windows -T dist-phonestore}} # Follow the prompts # Install the packaged application to device {{"C:\Program Files (x86)\Windows Kits\10\bin\x86\WinAppDeployCmd.exe" install -file <appxbundle location> -ip 127.0.0.1}}
5
3,558
TIMOB-26785
01/31/2019 23:31:59
Cease the inclusion of SOASTA in the SDK from 8.0.0+
SOASTA will not be supported for SDK 8.0.0+ . The module should no longer be available from that SDK version forward.
5
3,559
TIMOB-26795
02/01/2019 11:04:34
iOS: Event listener on overlay is not working for camera when camera is kept idle for a few minutes
On click of simple label/button, we open the camera and one overlay is added on the camera view to show close/capture/gallery icons. Following are the steps to reproduce the issue. Case 1: * Open the application. * Click on the label to open the camera. * Keep app in the background for 1 or 2 minutes. * Open again * When we click Close button on the camera overlay, It is not clickable. Case 2: * Open the application * Click on the label to open the camera. * Keep app in the foreground for few minutes. * Same here, when we click Close button on the camera overlay, It is not clickable.
5
3,560
TIMOB-26788
02/01/2019 16:33:51
require fails on directory with package.json whose 'main' field points at another directory
If you attempted to require a directory (or npm package) that held a package.json in it whose 'main' field pointed at another directory - it failed to properly resolve that.
5
3,561
TIMOB-26789
02/01/2019 18:26:55
android: Ti.Buffer#clone() will copy over null type/value properties to cloned Buffer when undefined on original
Due to an updated {{shouldjs}} library, equality checks are stricter, exposing this bug where a clone Ti.Buffer will inherit {{null}} values for {{type}}/{{value}} when they're {{undefined}} on the original.
3
3,562
TIMOB-26791
02/01/2019 18:57:56
Windows: Ti.UI.View reports top/left/bottom/right values as Strings always
I'm in the process of updating our test suite to use the latest {{should.js}} library, which now uses a stricter equality check. As a result, the tests are now flagging a number of windows UI tests as failing due to comparisons against expected numeric values. (the comparison used to do {{==}} but now do {{===}} so won't coerce to Number) Turns out we're reporting string values for top/left/right/bottom always on Windows where we report Numbers on Android/iOS. The properties themselves are Number or String, so Strings can be valid but would typically be reported when followed by the "unit" (i.e. "px", "em", "%"). For parity's sake, I think it'd be good to report the values as Numbers when they're purely numeric/have no units explicitly attached.
8
3,563
TIMOB-26792
02/01/2019 19:01:10
Android: Text cursor should change color according to text color
- The text cursor maintains the color set by the parent theme, this can cause the cursor to disappear light backgrounds. The cursor should match the font color. {code:js} const win = Ti.UI.createWindow({ backgroundColor: 'white' }); const textArea = Ti.UI.createTextArea({ color: 'black' }); win.add(textArea); win.open(); {code}
2
3,564
TIMOB-26797
02/05/2019 07:28:27
Windows: removeEventListener removes wrong callback
{{removeEventListener}} removes wrong callback. If module has multiple callbacks with same name, {{removeEventListener}} always removes first one only. {code} var win = Ti.UI.createWindow(); var func1 = function () { Ti.API.info('open callback 1'); }; var func2 = function () { Ti.API.info('open callback 2'); }; var func3 = function () { Ti.API.info('open callback 3'); }; win.addEventListener('open', func1); win.addEventListener('open', func1); win.addEventListener('open', func2); win.addEventListener('open', func2); win.addEventListener('open', func3); win.addEventListener('open', func3); win.removeEventListener('open', func2); win.open();{code} Actual: {{func1}} called once and {{func2}} & {{func3}} are called twice. Expected: all {{func2}} should be removed and {{func1}} & {{func3}} should be called twice.
5
3,565
TIMOB-26798
02/05/2019 15:05:57
Angular: Project template is outdated
Hello! The *appc new -t app --ng* template is outdated. webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead. Steps : 1. Create a new Angular project: *appc new -t app --ng* 2. Build and run Angular project : *appc run -p android* *Error Log*: {code} Command /Users/Raju/.nvm/versions/node/v10.14.1/bin/node /Users/Raju/.appcelerator/install/7.0.9/package/node_modules/titanium/lib/titanium.js build -p android -T device -C 5200bd89b43b3503 --config-file /var/folders/47/ql8m2gld20g474cjx82w5fdr0000gp/T/build-1549374277920.json --log-level info --no-banner --project-dir /Users/Raju/Desktop/ag/agtwo [INFO] Found Titanium module id=ti.cloud version=3.2.9 platform=commonjs deploy-type=test path=/Users/Raju/Library/Application Support/Titanium/modules/commonjs/ti.cloud/3.2.9 [INFO] Found better matching module id=ti.cloud version=latest platform=commonjs deploy-type=test path=/Users/Raju/Library/Application Support/Titanium/modules/commonjs/ti.cloud/3.2.11 [INFO] Found Titanium module id=com.appcelerator.apm version=3.1.2 platform=android deploy-type=test path=/Users/Raju/Library/Application Support/Titanium/modules/android/com.appcelerator.apm/3.1.2 [INFO] Deploy type: test [INFO] Building for target: device [INFO] Building for device: 5200bd89b43b3503 [INFO] Targeting Android SDK API: 28 [INFO] Building for the following architectures: arm64-v8a, armeabi-v7a, x86 [INFO] Signing with keystore: /Users/Raju/Library/Application Support/Titanium/mobilesdk/osx/7.5.0.GA/android/dev_keystore (tidev) [INFO] Debugging disabled [INFO] Profiler disabled [INFO] Forcing rebuild: /Users/Raju/Desktop/ag/agtwo/build/android/build-manifest.json does not exist [INFO] Running initial Webpack build /Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/cli.js:231 throw err; ^ Error: webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead. at Object.get [as CommonsChunkPlugin] (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack/lib/webpack.js:185:10) at module.exports.env (/Users/Raju/Desktop/ag/agtwo/app/webpack.config.js:67:25) at handleFunction (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/prepareOptions.js:21:13) at prepareOptions (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/prepareOptions.js:9:5) at requireConfig (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/convert-argv.js:118:14) at /Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/convert-argv.js:124:17 at Array.forEach (<anonymous>) at module.exports (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/convert-argv.js:122:15) at yargs.parse (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/cli.js:228:39) at Object.parse (/Users/Raju/Desktop/ag/agtwo/app/node_modules/yargs/yargs.js:567:18) at /Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/cli.js:206:8 at Object.<anonymous> (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack-cli/bin/cli.js:500:3) at Module._compile (internal/modules/cjs/loader.js:688:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10) at Module.load (internal/modules/cjs/loader.js:598:32) at tryModuleLoad (internal/modules/cjs/loader.js:537:12) at Function.Module._load (internal/modules/cjs/loader.js:529:3) at Module.require (internal/modules/cjs/loader.js:636:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/Users/Raju/Desktop/ag/agtwo/app/node_modules/webpack/bin/webpack.js:155:2) at Module._compile (internal/modules/cjs/loader.js:688:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10) at Module.load (internal/modules/cjs/loader.js:598:32) at tryModuleLoad (internal/modules/cjs/loader.js:537:12) at Function.Module._load (internal/modules/cjs/loader.js:529:3) at Function.Module.runMain (internal/modules/cjs/loader.js:741:12) at startup (internal/bootstrap/node.js:285:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3) [ERROR] An error occurred during build after 3s 661ms [ERROR] Webpack exited with non-zero exit code 1 {code}
13
3,566
TIMOB-26822
02/13/2019 15:58:29
Android: Improved customization of Ti.UI.Android.SearchView
Expose new properties to improve the customization of Ti.UI.Android.SearchView. They are as follow: - {{iconSearchColor}} - color of the Search icon in collapsed view - {{iconSearchCloseColor}} - color of the Search Close button in expanded view - {{iconSearchHintColor}} - color of the default Search Hint icon
5
3,567
TIMOB-26824
02/14/2019 19:24:16
Android: Build resources can fail to copy correctly
- Application resources can sometimes fail to copy into the build directory, causing the build process to fail. {code} [ERROR] Failed to package application: [ERROR] [ERROR] /Users/gmathews/projects/https/build/android/AndroidManifest.xml:4: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/appicon'). {code}
3
3,568
TIMOB-26860
02/14/2019 23:22:19
iOS: HTML assigned to WebView "html" property is unable to access app's local files as of 8.0.0.RC
*Summary:* When loading an HTML string to a {{WebView}} via its "html" property, it is no longer able to access the app's local files under the "Resources" directory as of Titanium 8.0.0.RC. *Steps to reproduce:* # Create a Classic "Default Project" app. # Replace the "app.js" code with the below code. # Build with Titanium 8.0.0 and run on iOS. # Notice that an image failed to load within the web view. # Build with Titanium 7.5.x and run on iOS. # Notice that the image successfully loaded within the web view. {code:javascript} var htmlText = '<!DOCTYPE html>' + '<html>' + ' <head>' + ' <meta name="viewport" content="width=device-width, initial-scale=1.0">' + ' </head>' + ' <body>' + ' <p>Local Image File</p>' + ' <img src="assets/images/tab1.png"/>' + // ' <img src="app://Resources/images/tab1.png"/>' + ' </body>' + '</html>'; var window = Ti.UI.createWindow(); var webView = Ti.UI.createWebView({ html: htmlText, }); window.add(webView); window.open(); {code} *Note:* Loading local resource files via {{app://Resources/}} also fails to load on iOS in Titanium 8.0.0.RC, but worked in older versions. Note that this URL scheme is undocumented and is not supported on Android. *Work-Around:* On iOS, the {{WebView.setHtml()}} method supports a 2nd argument where you can provide a "baseURL" parameter. This parameter allows you to set the directory (or URL) that file paths should be relative to. So, the below will work-around the problem. {code:javascript} var htmlText = '<!DOCTYPE html>' + '<html>' + ' <head>' + ' <meta name="viewport" content="width=device-width, initial-scale=1.0">' + ' </head>' + ' <body>' + ' <p>Local Image File</p>' + ' <img src="assets/images/tab1.png"/>' + // ' <img src="app://Resources/images/tab1.png"/>' + ' </body>' + '</html>'; var window = Ti.UI.createWindow(); var webView = Ti.UI.createWebView({ // Don't do this. // html: htmlText, }); // Do this. It will work-around the 8.0.0.RC bug. webView.setHtml(htmlText, { baseURL: Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory).nativePath, }); window.add(webView); window.open(); {code} \\ ---- *Original Bug Report Below* ---- The upcoming change in 8.0 from UIWebView to WKWebView is major and because of my reliance on the WebView I wanted to start testing this. There is a ticket TIMOB-26095 that indicates the transition is complete and tested, but there are so many use cases that are not included in the sample tests provided that I have major concerns. For example, I cannot get local resources like images to be rendered inside the WebView. Test case: {code:javascript} var win = Ti.UI.createWindow(); var html = '<html><body><img src="app://Resources/images/logo.png" /></body></html>'; var webview = Ti.UI.createWebView({ html: html }); win.add(webview); win.open(); {code} Works fine in SDK 7.5.1, but the image does not load in 8.0. Am I doing something wrong? Is there a low-level change that I should know about for this?
8
3,569
TIMOB-26826
02/15/2019 00:40:56
Android: Hybrid module commonjs extensions crash application
- CommonJS extensions for native modules do not load and cause the application to crash *TEST CASE* - Build https://github.com/appcelerator-modules/ti.playservices - Include in Titanium Application, should not crash on startup
5
3,570
TIMOB-26827
02/15/2019 11:54:11
iOS: Localised splash screen is not visible.
When I add the splash screen in the "app/i18n/es/" path I am not able to see the splash screen. I get a black screen. *Steps to reproduce:* 1. Create an alloy project 2. Place a splash screen image In app/i18n/es/ folder 3. Under tiapp.xml, ensure the following are false <ios> <enable-launch-screen-storyboard>false</enable-launch-screen-storyboard> <use-app-thinning>false</use-app-thinning> 4. Run the app on the iPhone device 5. Make sure there are no splash screen image under app/assets/iphone 5. Run the app, depending on the device language setting you should see the correct splash screen image. Expected: Splash screen should be visible when the app launches. Actual: A black screen is shown instead of a splash screen image. Reference: https://docs.appcelerator.com/platform/latest/#!/guide/Icons_and_Splash_Screens-section-src-29004897_IconsandSplashScreens-Localizedsplashscreens Note: It works in the Simulator.
1
3,571
TIMOB-26833
02/18/2019 10:59:49
iOS: Two startup log messages are output
h5.Description When building to iOS there are two startup logs {{\[INFO\] <app_name/<app_version (<sdk_version>.<sdk_githash)}} output, see below {code} [INFO] plainalloy/1.0 (0.0.0.(null)) [INFO] plainalloy 1.0 (Powered by Titanium 8.0.0.a963cbaecc) {code} h5.Steps to reproduce 1. Build an app to an iOS sim or device h5.Expected In the logs there are two startup logs h5.Actual There should be one startup log
1
3,572
TIMOB-26834
02/18/2019 11:26:01
Android: NavigationView root window displays back button
When creating a basic NavigationWindow in Android it displays a back button (see attachment) where it shouldn't, since it is the root window. {code:xml} <NavigationWindow> <Window class="container"> <Label id="label" onClick="doClick">Hello, World</Label> </Window> </NavigationWindow> {code} Basically, the hello world app with a wrapping NavigationWindow *Expected result* It should not display a back button on root window
5
3,573
TIMOB-26835
02/18/2019 14:47:04
iOS: Unable to get call pop menu from a webView
This is a regression from 7.5.0.GA. When pressing the call me button on an application using webView the call popup is no longer shown. *Test Code* {code:java} var win = Titanium.UI.createWindow({ backgroundColor:'white' }); win.add(Ti.UI.createWebView({ top:20, html:'<body><a href="tel:555-123-4567">Call me</a></body>', handlePlatformUrl:true })); win.open(); {code} *Expected result:* Above test case should show a pop up asking the user to make a call *Actual result:* No pop is shown.
5
3,574
TIMOB-26840
02/21/2019 00:56:09
iOS: The xcode project created upon build of titanium project gives error when run to iOS device
When we build a titanium mobile project using Ti SDK 8.0 the Xcode project created in the builds folder runs the project on device with errors. This does not happen when we build project using Ti DK 7.5.0 Steps to reproduce: 1. Create a default titanium project 2. Build it for iOS 3. Open the xcode project created under /build/iphone/ 4. Run that project to a iOS device Actual Result: An error is shown when the app is run {code} 2019-02-20 16:05:22.935497-0800 test2[2610:935904] [DYMTLInitPlatform] platform initialization successful 2019-02-20 16:05:22.959746-0800 test2[2610:935749] [DEBUG] Reading stylesheet from: /var/containers/Bundle/Application/4C59B765-EF49-4637-AED9-A58BB08C0DAA/test2.app/stylesheet.plist 2019-02-20 16:05:23.195138-0800 test2[2610:935749] [INFO] test2/1.0 (0.0.0.(null)) 2019-02-20 16:05:23.245129-0800 test2[2610:935894] [INFO] Log server connections: 1 2019-02-20 16:05:23.270413-0800 test2[2610:935749] [DEBUG] Loading: /var/containers/Bundle/Application/4C59B765-EF49-4637-AED9-A58BB08C0DAA/test2.app/ti.main.js, Resource: ti_main_js 2019-02-20 16:05:23.272899-0800 test2[2610:935749] [INFO] test2 1.0 (Powered by Titanium 8.0.0.93f1b3037d) 2019-02-20 16:05:23.273464-0800 test2[2610:935749] [DEBUG] Loading: /var/containers/Bundle/Application/4C59B765-EF49-4637-AED9-A58BB08C0DAA/test2.app/_index_.json, Resource: _index__json 2019-02-20 16:05:23.276345-0800 test2[2610:935749] [DEBUG] Loading: /var/containers/Bundle/Application/4C59B765-EF49-4637-AED9-A58BB08C0DAA/test2.app/ti.internal/extensions/Error.js, Resource: ti_internal/extensions/Error_js 2019-02-20 16:05:23.280048-0800 test2[2610:935749] [ERROR] Script Error Couldn't find module: core-js/modules/es6.date.to-json for architecture: arm64 2019-02-20 16:05:23.286830-0800 test2[2610:935749] [ERROR] Script Error Module "ti.internal/extensions/Error.js" failed to leave a valid exports object 2019-02-20 16:05:23.288849-0800 test2[2610:935749] [DEBUG] Application booted in 120.198965 ms {code}
1
3,575
TIMOB-26841
02/21/2019 09:11:28
Android: Reading TextField "backgroundDisabledColor" will crash if background/border color is assigned
Using Android SDK 7.5.0, text field touch start event is failing with below error. {code} [WARN] : Settings: mValues not put! needsGenerationTracker: true currentGeneration: -1 name: enable_navbar value: null [ERROR] : TiExceptionHandler: (main) [39572,39572] ti:/titanium.js:207 [ERROR] : TiExceptionHandler: serialized[k] = this[k]; [ERROR] : TiExceptionHandler: ^ [ERROR] : TiExceptionHandler: Error: android.graphics.drawable.PaintDrawable cannot be cast to android.graphics.drawable.StateListDrawable [ERROR] : TiExceptionHandler: at TextField.value (ti:/titanium.js:207:24) [ERROR] : TiExceptionHandler: at JSON.stringify (<anonymous>) [ERROR] : TiExceptionHandler: at TextField.<anonymous> (/app.js:23:20) [ERROR] : TiExceptionHandler: at TextField.value (ti:/events.js:49:21) [ERROR] : TiExceptionHandler: at TextField.value (ti:/events.js:101:19) [ERROR] : TiExceptionHandler: [ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.getBackgroundDisabledColor(TiViewProxy.java:1190) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:971) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1196) [ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:401) [ERROR] : TiExceptionHandler: ti.modules.titanium.ui.TextFieldProxy.handleMessage(TextFieldProxy.java:157) [ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:104) [ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:166) [ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:7425) [INFO] : zygote64: Do partial code cache collection, code=30KB, data=30KB {code} *Test steps:* 1. Create a new project 2. Paste the sample test code and run on android device 3. After running, start touching on the text field and got the error. *Test code:* {code} var win = Ti.UI.createWindow({ backgroundColor : 'gray' }); var view = Ti.UI.createView({ height : Ti.UI.SIZE, borderColor : "red", width : Ti.UI.FILL, layout : "vertical" }); var TF = Ti.UI.createTextField({ height : 40, width : Ti.UI.FILL, backgroundColor : "#FAFAFA", borderColor : "black", top : 20 }); TF.addEventListener("touchstart", function(e) { Ti.API.debug(JSON.stringify(e)); }); win.add(TF); win.add(view); win.open(); {code} *Test Environment:* {code} Appcelerator Command-Line Interface, version 7.0.9 Operating System Name = Mac OS X Version = 10.13.6 Architecture = 64bit # CPUs = 4 Memory = 8589934592 Node.js Node.js Version = 8.9.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.1.1 Titanium SDK SDK Version = 7.5.0.GA SDK Path = /Users/sharifabudarda/Library/Application Support/Titanium/mobilesdk/osx/7.5.0.GA Target Platform = android {code} Device:Huawei Y9 2018
3
3,576
TIMOB-26843
02/21/2019 16:04:25
Android: Getting/Setting TabGroup "activeTab" property before open causes a crash as of 8.0.0.RC
*Summary:* Getting or setting the {{TabGroup}} "activeTab" property (or calling {{getActiveTab()}} or {{setActiveTab()}} methods) before the {{TabGroup}} has been opened causes a crash on Android as of Titanium 8.0.0.RC. *Steps to reproduce* # Build and run the below code via Titanium 8.0.0.RC on Android. # Notice the app crashes on startup. *Testcase* {noformat} var tabGroup = Ti.UI.createTabGroup(); var win1 = Titanium.UI.createWindow({ title: 'Tab 1', backgroundColor: '#fff' }); var tab1 = Titanium.UI.createTab({ title: 'Tab 1', window: win1 }); var label1 = Titanium.UI.createLabel({ color: '#999', text: 'I am Window 1', textAlign: 'center', width: 'auto' }); win1.add(label1); var win2 = Titanium.UI.createWindow({ title: 'Tab 2', backgroundColor: '#fff' }); var tab2 = Titanium.UI.createTab({ title: 'Tab 2', window: win2 }); var label2 = Titanium.UI.createLabel({ color: '#999', text: 'I am Window 2', textAlign: 'center', width: 'auto' }); win2.add(label2); tabGroup.addTab(tab1); tabGroup.addTab(tab2); tabGroup.activeTab = 1; Ti.API.info("### activeTab: " + tabGroup.activeTab); tabGroup.open(); {noformat} *Expected* No error is thrown and the seconf tab is in focus *Actual* {noformat} [ERROR] TiExceptionHandler: (main) [70,70] Attempt to invoke virtual method 'void ti.modules.titanium.ui.widget.tabgroup.TiUITab.onSelectionChange(boolean)' on a null object reference [ERROR] TiExceptionHandler: [ERROR] TiExceptionHandler: ti.modules.titanium.ui.TabProxy.onSelectionChanged(TabProxy.java:220) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.TabGroupProxy.onTabSelected(TabGroupProxy.java:551) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.TabGroupProxy.onTabSelected(TabGroupProxy.java:521) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.tabgroup.TiUITabLayoutTabGroup.onTabSelected(TiUITabLayoutTabGroup.java:232) [ERROR] TiExceptionHandler: android.support.design.widget.TabLayout.dispatchTabSelected(TabLayout.java:1165) [ERROR] TiExceptionHandler: android.support.design.widget.TabLayout.selectTab(TabLayout.java:1158) [ERROR] TiExceptionHandler: android.support.design.widget.TabLayout.selectTab(TabLayout.java:1128) [ERROR] TiExceptionHandler: android.support.design.widget.TabLayout$Tab.select(TabLayout.java:1427) [ERROR] TiExceptionHandler: android.support.design.widget.TabLayout.addTab(TabLayout.java:483) [ERROR] TiExceptionHandler: android.support.design.widget.TabLayout.addTab(TabLayout.java:465) [ERROR] TiExceptionHandler: android.support.design.widget.TabLayout.addTab(TabLayout.java:444) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.tabgroup.TiUITabLayoutTabGroup.addTabItemInController(TiUITabLayoutTabGroup.java:159) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.tabgroup.TiUIAbstractTabGroup.addTab(TiUIAbstractTabGroup.java:199) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.TabGroupProxy.handlePostOpen(TabGroupProxy.java:442) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.TabGroupProxy.windowCreated(TabGroupProxy.java:416) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:624) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:767) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:21) [ERROR] TiExceptionHandler: android.app.Activity.performCreate(Activity.java:6975) [ERROR] TiExceptionHandler: android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213) [ERROR] TiExceptionHandler: android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770) [ERROR] TiExceptionHandler: android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) [ERROR] TiExceptionHandler: android.app.ActivityThread.-wrap11(Unknown Source:0) [ERROR] TiExceptionHandler: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593) [ERROR] TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:105) [ERROR] TiExceptionHandler: android.os.Looper.loop(Looper.java:164) [ERROR] TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6541) [ERROR] TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method) [ERROR] TiExceptionHandler: com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) [ERROR] TiExceptionHandler: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) {noformat} *Note:* It will crash when set via a {{Ti.UI.createTabGroup()}} creation property as well. *Work-Around:* You can set the active tab after the {{TabGroup}} has been opened as shown below. {code:javascript} tabGroup.addEventListener("open", function() { tabGroup.activeTab = 1; }); {code}
8
3,577
TIMOB-26847
02/22/2019 00:47:16
Android: Fix stringify of custom TableView row
- Prevent exception when {{JSON.stringify}} a custom TableViewRow {code} TiExceptionHandler: (main) [5645,45992] Attempt to invoke virtual met hod 'void org.appcelerator.titanium.view.TiUIView.registerForTouch()' on a null object reference [ERROR] : TiExceptionHandler: [ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.h andleGetView(TiViewProxy.java:594) [ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.h andleMessage(TiViewProxy.java:270) [ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.ja va:102) [ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:193) [ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThrea d.java:6669) [ERROR] : TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method ) [ERROR] : TiExceptionHandler: com.android.internal.os.RuntimeInit$MethodAnd ArgsCaller.run(RuntimeInit.java:493) [ERROR] : TiExceptionHandler: com.android.internal.os.ZygoteInit.main(Zygot eInit.java:858) {code}
3
3,578
TIMOB-26848
02/22/2019 03:13:22
Android: Re-add "baseURL" support to WebView.setHtml() that was removed in 6.0.3
*Summary:* Titanium currently documents that the {{WebView.setHtml()}} method supports a 2nd argument on Android and iOS which can provide a "baseURL" setting. Android used to support this, but it was inadvertently removed in Titanium 6.0.3. This feature should be re-added since it's needed by "iframes" to indicate which URL an iframe's embedded paths are relative to. For example, a YouTube video embedded within an iframe will not play on Android or iOS unless a "baseURL" of "https://www.youtube.com" is provided. *Steps to reproduce:* # Build and run the below code on Android. # Tap on the video to attempt to play it. # Notice that the video won't play. Instead it reads "Video Unavailable". # Build and run on iOS. # Tap on the video play it. # Notice that the video plays fine. _(This is because the "baseURL" is being used.)_ {code:javascript} var htmlText = '<!DOCTYPE html>' + '<html>' + ' <body>' + ' <iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen/>' + ' </body>' + '</html>'; var window = Ti.UI.createWindow(); var webView = Ti.UI.createWebView(); //webView.html = htmlText; webView.setHtml(htmlText, { baseURL: "https://www.youtube.com" }); window.add(webView); window.open(); {code} *Work-Around:* The "baseURL" is not needed if the webpage was loaded from the Internet (ie: the "url" property). That is, "baseURL" is only applicable when loading HTML from string. So, hosting the webpage on your own web server will work-around this problem.
5
3,579
TIMOB-26850
02/22/2019 17:09:58
Android: Activity callbacks onStop/onDestroy not invoked on main thread as of 7.5.0
*Summary:* If "tiapp.xml" property "run-on-main-thread" is set to {{true}}, then the activity's {{onStop}} and {{onDestroy}} callbacks are not invoked upon app exit. This is a regression as of 7.5.0. *Steps to reproduce:* # Set "tiapp.xml" property "run-on-main-thread" to {{true}} as shown below. # Use the below "app.js" code. # Build and run on Android. # Wait for the app to launch. # Notice in the log that "onStart()" and "onResume()" were successfully called. # Back out of the app to exit. # Notice in the log that "TopActivity.onStop()", "TopActivity.onDestroy()", and "RootActivity.onDesroy()" did *+not+* get called. *tiapp.xml* {code:xml} <?xml version="1.0" encoding="UTF-8"?> <ti:app xmlns:ti="http://ti.appcelerator.org"> <property name="run-on-main-thread" type="bool">true</property> </ti:app> {code} *app.js* {code:javascript} function addActivityListenersTo(activity, name) { if (!activity) { return; } if (!name) { name = "Activity"; } activity.onCreate = function() { Ti.API.info("@@@ " + name + ".onCreate() called."); }; activity.onRestart = function() { Ti.API.info("@@@ " + name + ".onRestart() called."); }; activity.onStart = function() { Ti.API.info("@@@ " + name + ".onStart() called."); }; activity.onResume = function() { Ti.API.info("@@@ " + name + ".onResume() called."); }; activity.onPause = function() { Ti.API.info("@@@ " + name + ".onPause() called."); }; activity.onStop = function() { Ti.API.info("@@@ " + name + ".onStop() called."); }; activity.onDestroy = function() { Ti.API.info("@@@ " + name + ".onDestroy() called."); }; } addActivityListenersTo(Ti.Android.currentActivity, "RootActivity"); var window = Ti.UI.createWindow(); window.add(Ti.UI.createLabel({ text: "Activity Callback Test" })); window.addEventListener("open", function() { Ti.API.info("@@@ Window 'open' event fired."); }); addActivityListenersTo(window.activity, "TopActivity"); window.open(); {code} *Work-Around 1:* If you are building with Titanium 7.5.x, then setting "run-on-main-thread" to {{false}} then the {{onStop()}} and {{onDestroy()}} callbacks will be successfully invoked. *Work-Around 2:* Add a listener to the {{Ti.UI.Window}} object's "close" event instead. This event is supported on both Android and iOS, making it a portable solution.
3
3,580
TIMOB-26854
02/23/2019 19:24:19
iOS: Crash when handling user-activies
When trying to handle user activities, the app experiences a hard crash because the underlaying completion handler passed to the {{NSOrderedSet}} is GC'd due to a memory leak. It can be fixed by properly {{copy}}'ing the completion handler. I scanned other parts of the SDK where this can happen and fixed some more cases as well. I also fixed some duplicate method definitions / leftovers from the SDK 8 Swift support migration.
5
3,581
TIMOB-26855
02/24/2019 13:04:21
Windows: Add "baseURL" support to WebView.setHtml()
*Summary:* Titanium currently documents that the {{WebView.setHtml()}} method supports a 2nd argument on Android and iOS which can provide a "baseURL" setting. Android used to support this, but it was inadvertently removed in Titanium 6.0.3. This feature should be re-added since it's needed by "iframes" to indicate which URL an iframe's embedded paths are relative to. For example, a YouTube video embedded within an iframe will not play on Android or iOS unless a "baseURL" of "https://www.youtube.com" is provided. *Steps to reproduce:* # Build and run the below code on Android. # Tap on the video to attempt to play it. # Notice that the video won't play. Instead it reads "Video Unavailable". # Build and run on iOS. # Tap on the video play it. # Notice that the video plays fine. _(This is because the "baseURL" is being used.)_ {code:javascript} var htmlText = '<!DOCTYPE html>' + '<html>' + ' <body>' + ' <iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen/>' + ' </body>' + '</html>'; var window = Ti.UI.createWindow(); var webView = Ti.UI.createWebView(); //webView.html = htmlText; webView.setHtml(htmlText, { baseURL: "https://www.youtube.com" }); window.add(webView); window.open(); {code} *Work-Around:* The "baseURL" is not needed if the webpage was loaded from the Internet (ie: the "url" property). That is, "baseURL" is only applicable when loading HTML from string. So, hosting the webpage on your own web server will work-around this problem.
8
3,582
TIMOB-26859
02/25/2019 20:46:40
Android: Something broken with tabsBackgroundColor &tabsBackgroundSelectedColor on TabGroup refactoring -regression
*Test Steps:* 1.Run the app Tab1: background color: yellow background selected color: red Tab2/Tab3: background color: blue background selected color: red 3. Go to Tab 3, click on button 4. Now the following must be true: Tab1: background/background selected color remains UNCHANGED Tab2/Tab3: background color: orange background selected color: white *Actual:* changing the "tabsBackgroundColor" & "tabsBackgroundSelectedColor" with a click eventlistener it does not change.after button clicked on tab3 tab2/tab3 background/background selected color not changed app.js {code} // this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor('#000'); // create tab group var tabGroup = Titanium.UI.createTabGroup({ //Test tabsBackgroundColor and tabsBackgroundSelectedColor here. tabsBackgroundSelectedColor:'red', tabsBackgroundColor:'blue' }); var win1 = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'#fff' }); var tab1 = Titanium.UI.createTab({ backgroundColor: 'yellow', backgroundSelectedColor: 'red', icon:'KS_nav_views.png', title:'Tab 1', window:win1 }); var label1 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 1', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); win1.add(label1); // // create controls tab and root window // var win2 = Titanium.UI.createWindow({ title:'Tab 2', backgroundColor:'#fff', }); var tab2 = Titanium.UI.createTab({ icon:'KS_nav_ui.png', title:'Tab 2', window:win2 }); var label2 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 2', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); win2.add(label2); var win3 = Titanium.UI.createWindow({ title:'Tab 3', backgroundColor:'#fff' }); var tab3 = Titanium.UI.createTab({ icon:'KS_nav_views.png', title:'Tab 3', window:win3 }); var button3 = Titanium.UI.createButton({ title: "change background color" }); button3.addEventListener('click', function(e){ //Test tabsBackgroundColor and tabsBackgroundSelectedColor here. tabGroup.tabsBackgroundColor='orange'; tabGroup.tabsBackgroundSelectedColor = 'white'; }); win3.add(button3); // // add tabs // tabGroup.addTab(tab1); tabGroup.addTab(tab2); tabGroup.addTab(tab3); // open tab group tabGroup.open(); {code}
5
3,583
TIMOB-26862
02/26/2019 15:07:28
Android: TextField/TextArea within a TableView can have performance issues with some keyboards
*Summary:* Entering text into a {{TextField}}/{{TextArea}} embedded within a {{TableView}} can cause performance issues if the virtual keyboard shows/hides its top suggestion bar dynamically. It can also cause the cursor to suddenly move to the end of field and cause the field to flicker. *Reason:* By default, the "windowSoftInputMode" is set to {{Ti.UI.Android.SOFT_INPUT_ADJUST_PAN}} (aka: "adjustPan"), which means that showing/hiding the virtual keyboards will cause the window to resize. The resizing of a {{TableView}} triggers its row recycling/update behavior which can cause the "contents" of each row (such as the {{TextField}}) to be re-parented to a new row container view, which causes havoc with the virtual keyboard. For virtual keyboards that have a fixed height and do not pop-in/out a suggestion bar as you type, this isn't really an issue since the above mentioned resize behavior happens once. For example, this is not an issue on a Pixel phone. But some device pop-in/out a suggestion bar as you type which causes the {{TableView}} to resize every time you type in a character. This will cause massive performance issues. *Steps to reproduce:* # Build and run [^TableOfTextFieldsTest.js] on Android. # Tap on row 1's {{TextArea}}. # Notice that the cursor is moved to end of the field. (The code is supposed to highlight the whole text instead.) # Notice the below warnings get logged. {code} [WARN] IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection [WARN] IInputConnectionWrapper: getSelectedText on inactive InputConnection [WARN] IInputConnectionWrapper: getTextAfterCursor on inactive InputConnection {code} *Work-Around 1:* Set up the window to "adjustPan". This works-around the issue because it causes the virtual keyboard to be overlaid on top of the window instead of resizing it, which avoids the issue. {code:javascript} var window = Ti.UI.createWindow({ windowSoftInputMode: Ti.UI.Android ? Ti.UI.Android.SOFT_INPUT_ADJUST_PAN : null, }); {code} *Work-Around 2:* Use a {{ScrollView}} instead of a {{TableView}}.
13
3,584
TIMOB-26876
03/04/2019 18:15:25
iOS: Cannot debug a project with hyperloop enabled
Cannot debug a project that has hyperloop enabled. The issue is with debug on iOS only as the debug on same project works fine wth Android Steps to Reproduce: 1. Create a default titanium project with services enabled 2. Add a breakpoint in the js file 3. Debug on iOS simulator or device Actual Result: The breakpoints are not hit during the debug. If we remove hyperloop from the project the same breakpoints are hit successfully. Expected Result: The debug should work even for projects with hyperloop
0
3,585
TIMOB-26877
03/05/2019 23:26:09
Android: Ti.Database.install() should throw exception like iOS if source db file not found
*Summary:* The [Ti.Database.install()|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Database-method-install] API is intended to copy a "source" database file embedded within the app to a writeable location. The idea being that the app developer can preconfigure a SQLite database's tables/columns/indexes, embed that preconfigured database file within the app, thus avoiding having to do set up a database dynamically within the app's code. On iOS, if the 1st argument (the source database file path) is not found, then the {{install()}} function will throw an exception. This is good because this tells the app developer that he/she has set the path wrong to the embedded database file. On Android, if the source database file is not found, then an empty database is installed to the given location. This may confuse the app developer. It should throw an exception instead like iOS to clearly indicate that it's a path issue.
3
3,586
TIMOB-26898
03/06/2019 04:06:05
Android: Build error "Failed to run dexer" can occur when including several libraries
With the recent update, android compilation gets stuck at the "Running dexer" step. This happens when I add the cloudpush module to the project. To reproduce the error, you can simply create a blank project (alloy), add the cloudpush module for android, and try to compile the app for Android.
3
3,587
TIMOB-26879
03/06/2019 10:43:35
Hyperloop: iOS - Requiring Hyperloop files fails with SDK 8.0.0 RC
*Steps to reproduce the behavior* Run the hyperloop-examples project with the latest 8.0.0 build. *Actual behavior* The app fails to boot with the following error: {code} [ERROR] Script Error Couldn't find module: /hyperloop/titanium/tiapp for architecture: x86_64 [ERROR] Script Error Module "app.js" failed to leave a valid exports object {code} *Expected behavior* The app boots without error.
1
3,588
TIMOB-26884
03/07/2019 18:32:49
Android: Update ti.playservices to 16.1.2
- Update bundled {{ti.playservices}} module to {{16.1.2}}
3
3,589
TIMOB-26886
03/08/2019 02:08:07
Windows: Update module apiversion to 7
Update module apiversion because there's module binary incompatibility in upcoming 8.0.0.GA. All Windows module needs re-compiled to make it work with 8.0.0.
3
3,590
TIMOB-26888
03/08/2019 13:01:25
Windows: Update Hyperloop apiversion for 8.0.0.GA
Update Hyperloop module apiversion for Windows because there's module binary incompatibility in upcoming 8.0.0.GA. Windows Hyperloop module needs re-compiled with updated 8.0.0.
3
3,591
TIMOB-26891
03/11/2019 11:12:15
Update Hyperloop to 4.0.2
Update the SDK's bundled Hyperloop version to 4.0.2 Required because of TIMOB-26888
3
3,592
TIMOB-26901
03/11/2019 16:42:58
Android: Launcher icon uses Titanium's default icon instead of "appicon.png" as of 8.0.0
With this single change, the appicon.png is no longer applied to the android launcher icon. I don't know if iOS is affected by this. {code} <icon>appicon.png</icon> {code} {code} - <sdk-version>7.5.0.GA</sdk-version> + <sdk-version>8.0.0.v20190308114556</sdk-version> {code}
3
3,593
TIMOB-26892
03/11/2019 17:17:42
iOS: Video player orientation is not changing properly in iOS 11.x
Hello, The video player orientation is not changing properly in iOS 11.x but it's working fine for iOS 12 and above. Please have a look at the attachment videos. *Steps to reproduce the issue:* 1.Let app orientation be in portrait and play the video(Using the below app.js file) 2. make video go in full screen 3. switch the device in landscape mode, video orientation will come in landscape mode 4. Do not change the orientation any more and tap on cross button to go back to app exiting full screen video mode 5. you will notice window/screen in portrait mode. *Test Code:* app.js {code} var win = Ti.UI.createWindow({ width:"100%", height:"100%", color:"yellow" }); videoPlayerView = Ti.UI.createView({ left:'3%', backgroundColor:'#D8D8D8', borderColor:'#979797', borderWidth:'1', top:'10%', width:'94%' , height:'30%', }); win.add(videoPlayerView); videoPlayer =Titanium.Media.createVideoPlayer({ top : 0, autoplay : false, height : '100%', width : '100%', url:"https://www.radiantmediaplayer.com/media/bbb-360p.mp4", mediaControlStyle : Ti.Media.VIDEO_CONTROL_DEFAULT, scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FILL, repeatMode:Titanium.Media.VIDEO_REPEAT_MODE_ONE, }); videoPlayerView.add(videoPlayer); win.open(); {code} *Test Environment:* Appcelerator Command-Line Interface, version 7.0.9 Operating System Name = Mac OS X Version = 10.14 Architecture = 64bit CPUs = 4 Memory = 8589934592 Node.js Node.js Version = 8.9.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.1.1 Titanium SDK SDK Version = 7.5.1.GA,7.5.0.GA iOS simulator version: 12.1, 11.4 Thanks
5
3,594
TIMOB-26895
03/12/2019 03:05:27
Android: APK signing will fail when using MD5 keystore and JDK 8 or newer
*Summary:* Digitally signing an APK will fail when using a keystore using an MD5 encryption with JDK 8 or newer version. *Steps to reproduce:* # Go to a machine with JDK 8 or newer installed on it. # Create a Classic Titanium app. # Copy the [^testmd5.keystore] the project's root directory. # In Appc Studio, select "Package" from the top-left-most dropdown box. # In Appc Studio, select "Android Play Store" from the other dropdown box. # Click the build button. # For "Keystore Location", click the "Browse" button and select the "testmd5.keystore" file. # For "Keystore Password", enter: {{testmd5}} # For "Keypair Password", enter: {{testmd5}} # For "Key Alias", enter: {{testmd5}} # Click the "Publish" button. *Result:* Build fails with the following logged error messages. {code} [ERROR] : Failed to sign apk: [ERROR] : jarsigner error: java.security.NoSuchAlgorithmException: MD5withRSA (weak) Signature not available {code} *Cause:* When reading the keystore file's information via the JDK "keytool", the algorithm returned will be "MD5withRSA (weak)" with " (weak)" appended to it as of JDK 8. The returned "MD5withRSA (weak)" string is being blindly passed to the signing tool, when we should be passing "MD5withRSA" instead. *Note 1:* Issue was raised on github below... https://github.com/appcelerator/titanium_mobile/issues/10769 *Note 2:* Newest JDK "keytool" versions will typically create a keystore using SHA1 or SHA256 by default. I think MD5 was the default for JDK 6. *Note 3:* You can create a keystore file with "MD5withRSA" at the command line on Mac by entering the below in the Terminal. Note that we don't recommend signing a real app with MD5. You should use SHA256 instead. The below is for testing purposes only. {code} keytool -genkey -v -keystore <NewKeystoreFilePath> -alias <AliasName> -sigalg MD5withRSA -keyalg RSA -validity 999999 {code}
3
3,595
TIMOB-26954
03/14/2019 14:39:17
Android: Reading a JSON file fails on Android Q
Running the following code, returns t==null {quote} var file=Ti.Filesystem.getFile(Config.PathRoot.resources,'some.json'); var d=file.read(); var t=d.text; {quote} Analysis: TiBlob#getText checks TiMimeTypeHelper.isBinaryMimeType(mimetype) and if the file is binary, it only allows application/octet-stream. The detected mime type comes from android.webkit.MimeTypeMap#getMimeTypeFromExtension (in TiMimeTypeHelper#getMimeTypeFromFileExtension). This used to return the octet-steam mime on *.json files, but it was probably fixed to properly return application/json.
5
3,596
TIMOB-26903
03/16/2019 09:37:24
iOS: Webview Cookies is not working with 8.0.0.GA
Hello, Webview with cookies is working just fine with 7.5.1.GA but it's not working with 8.0.0.GA. *Testing Environment:* Appcelerator Command-Line Interface, version 7.0.10 Operating System Name = Mac OS X Version = 10.14 Architecture = 64bit # CPUs = 4 Memory = 8589934592 Node.js Node.js Version = 8.9.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.1.1 Titanium SDK SDK Version = 8.0.0.GA, 7.5.1.GA *Test Code One:* {code} var win = Ti.UI.createWindow({ layout : 'vertical' }); var testUrl = "https://jwogan5.github.io/"; var testDomain = "jwogan5.github.io"; Titanium.Network.addHTTPCookie(Titanium.Network.createCookie({ domain : testDomain, name : 'testCookie', path : '/', value : 'works' })); var testWebView = Ti.UI.createWebView({ url : testUrl, width : Ti.UI.FILL, top : 0, cacheMode : false, enableZoomControls : false, bottom : 0 }); win.add(testWebView); win.open(); {code} *Test Code Two(ti.wkwebview):* {code} var win = Ti.UI.createWindow({ layout : 'vertical' }); var WK = require('ti.wkwebview'); var testUrl = "https://jwogan5.github.io/"; var testDomain = "jwogan5.github.io"; Titanium.Network.addHTTPCookie(Titanium.Network.createCookie({ domain : testDomain, name : 'testCookie', path : '/', value : 'works' })); var testWebView = WK.createWebView({ url : testUrl, width : Ti.UI.FILL, top : 0, cacheMode : false, enableZoomControls : false, bottom : 0 }); win.add(testWebView); win.open(); {code} *Steps to reproduce the issue:* 1. Just add the app.js file on your project 2. Run using the 7.5.1.GA and the webview is added to the controller it will print out the cookie (testCookie=works). 3. If you run the exact same code with 8.0.0.GA when the webview loads it will alert an empty value. This shows the 8.0.0 does not read the cookie value. Note: The only difference between 7.5.1 and 8.0.0 is that 8.0.0 now uses WKWebview instead of UIWebview.
5
3,597
TIMOB-26919
03/18/2019 15:26:00
Android: Support d8 dexer.
https://developer.android.com/studio/command-line/d8 bq. d8 is a command line tool that Android Studio and the Android Gradle Plugin use to compile your project's Java bytecode into DEX bytecode that runs on Android devices, and it allows you to use Java 8 language features in your app's code. https://android-developers.googleblog.com/2018/04/android-studio-switching-to-d8-dexer.html {quote}Android Studio switching to D8 dexer 06 April 2018 D8 now default dex compiler{quote} With {{d8}} support, it will be possible to use libraries written with java 8 syntax. [Example|https://github.com/NetrisTV/ti.exoplayer/issues/9#issuecomment-460235431] related to [AC-5688] P.S. Also {{dx}} will be deprecated soon.
5
3,598
TIMOB-26908
03/18/2019 20:03:06
iOS: Focussed text-field freezes parent window
Closing a window with a search being in focus, the parent window freezes. We haven't been able to provide an isolated test case, but it can be reproduced with a list-view + search-bar. I suspect the search-controller does not hide before the parent window closes and then stays in the VC stack. I don't see any possible workaround so far, except overriding the native back button with an own one which is a no go as well.
3
3,599
TIMOB-26909
03/18/2019 22:17:02
Android: Improve V8 cold start performance
*Summary:* During an app cold start, Titanium will create a V8 {{Isolate}} one time for the lifetime of the app to be used as the JavaScript runtime. The C++ function call {{v8::Isolate::New()}} is unusually slow. [V8Runtime.cpp#L228|https://github.com/appcelerator/titanium_mobile/blob/master/android/runtime/v8/src/native/V8Runtime.cpp#L228] By running adding the following code, I'm able to benchmark this function call. {code:cpp} #include <time.h> uint64_t GetCurrentTimeInMilliseconds() { struct timespec currentTime; clock_gettime(CLOCK_MONOTONIC, &currentTime); uint64_t value = (uint64_t)currentTime.tv_sec * (uint64_t)1000000; value += (uint64_t)currentTime.tv_nsec / (uint64_t)1000; return value / (uint64_t)1000; } JNIEXPORT void JNICALL Java_org_appcelerator_kroll_runtime_v8_V8Runtime_nativeInit(...) { // ... uint64_t currentTime = GetCurrentTimeInMilliseconds(); isolate = Isolate::New(create_params); LOGI(TAG, "### Isolate::New() duration: %d", (int)(GetCurrentTimeInMilliseconds() - currentTime)); // ... } {code} The below are benchmarks from real physical devices: * Pixel 2 (Android 9.0; ARM64): {{750ms}} * Nexus 4 (Android 4.4; ARM32): {{2500ms}} The above eats about half the startup time on a simple "Hello World" project. It's unusually slow. *To be investigated:* * Supposedly, creating the {{Isolate}} with an empty snapshot created at build time should significantly improve the performance. * We should double check that the v8 {{.a}} static library was not compiled in debug mode.
13
3,600
TIMOB-26943
03/27/2019 19:25:07
iOS: WebView.setHtml() fails to load inner contents with "file://" URLs and relative paths if "baseURL" uses "app://" URL as of 8.0.0
*Summary:* As of Titanium 8.0.0, a call to {{WebView.setHtml()}} with a "baseURL" set to an "app://" URL such as {{Ti.Filesystem.resourcesDirectory}} will fail to load HTML content such as {{<img/>}} or {{<script/>}} if they're assigned relative paths or "file://" URLs. This is *not* an issue if: * "baseURL" is set to a "file://" URL. * If "baseURL" was never assigned in the {{setHtml()}} call. * If the contents such as {{<img/>}} use an "app://" URL instead, but this is not support on Android or Windows. *Steps to reproduce:* # Create a Classic "Default Project" Titanium app. # Set {{<use-app-thinning/>}} to {{false}} in the "tiapp.xml" as shown below. # Copy the below code to the project's "app.js". # Build and run on iOS. # Notice that 3 of the 4 images fail to load within the {{WebView}}. tiapp.xml {code:xml} <?xml version="1.0" encoding="UTF-8"?> <ti:app xmlns:ti="http://ti.appcelerator.org"> <use-app-thinning>false</use-app-thinning> </ti:app> {code} app.js {code:javascript} var sourceFile = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, "assets/images/tab1.png"); var targetFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, "tab1.png"); sourceFile.copy(targetFile.nativePath); var htmlText = '<!DOCTYPE html>\n' + '<html>\n' + ' <head>\n' + ' <meta name="viewport" content="width=device-width, initial-scale=1.0">\n' + ' </head>\n' + ' <body>\n' + ' <p>Resource File (Relative Path)</p>\n' + ' <img src="assets/images/tab1.png"/>\n' + ' <br/>\n' + ' <p>Resource File (app:// URL; iOS-only)</p>\n' + ' <img src="app://Resources/assets/images/tab1.png"/>\n' + // <- This works. ' <br/>\n' + ' <p>Resource File (file:// URL)</p>\n' + ' <img src="' + sourceFile.nativePath + '"/>\n' + ' <br/>\n' + ' <p>App Data File (file:// URL)</p>\n' + ' <img src="' + targetFile.nativePath + '"/>\n' + ' </body>\n' + '</html>\n'; Ti.API.info("### htmlText:\n" + htmlText); var window = Ti.UI.createWindow(); var webView = Ti.UI.createWebView({ // html: htmlText, // <- This works. }); //webView.setHtml(htmlText); // <- This works. webView.setHtml(htmlText, { baseURL: Ti.Filesystem.resourcesDirectory }); // <- This fails!!! //webView.setHtml(htmlText, { baseURL: Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory).nativePath }); // <- This works. window.add(webView); window.open(); {code} *Work-Around:* Set "baseURL" to a "file://" URL instead. For example instead of doing this... {code:javascript} webView.setHtml(htmlText, { baseURL: Ti.Filesystem.resourcesDirectory }); {code} ...do this instead... {code:javascript} webView.setHtml(htmlText, { baseURL: Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory).nativePath }); {code} Alternatively, don't set the "baseURL" in the {{setHtml()}} function call. By default, the HTML's contents are relative to the Titanium app's "Resources" directory.
5
3,601
TIMOB-26948
03/28/2019 17:36:29
CLI: File provider extension capability not appropriately set
h3. Description While creating an iOS project using the file provider extension, we found that the capability was not appearing correctly in the generated Xcode project h3. Steps to reproduce 1) Create an iOS project 2) Create a file provider target, add the app groups capability 3) Ensure you have the appropriate provisioning profiles 4) Build the project 5) Examine the capabilities in the generated xCode project h3. Result The capability is not set correctly.
8
3,602
TIMOB-26952
03/29/2019 20:56:59
Android: Verify that Ti.UI.Android.openPreferences() works on Android Q
Android Q is deprecating the "android.preference" library which Titanium's {{Ti.UI.Android.openPreferences()}} API uses. https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Android-method-openPreferences https://developer.android.com/preview/behavior-changes-all#preferences Google's docs suggests that "android.preference" library is deprecated, not removed. So, we should first check that the deprecated usage still works while targeting API Level 29. The best solution is to change Titanium to depend on the AndroidX libraries instead of the older Support libraries per [TIMOB-26472]. This is a much bigger change that effects all modules that we may want to defer to a later date.
3
3,603
TIMOB-26957
04/01/2019 17:35:33
Android: Update V8 runtime to 7.3.492.26
- Upgrade V8 to the latest stable version {{7.3.492.26}} - Includes snapshot support - Maintain backwards compatibility
13
3,604
TIMOB-26961
04/02/2019 03:17:12
Windows: Save HttpClient instance until callback is fired
Currently HttpClient may be garbege-collected before its callback is fired under some circumstances if you don't save HttpClient instance from garbage collector. In that case application crashes. We might want to save HttpClient instance from garbage collection by protecting its instance until {{onerror}} or {{onload}} callback is called. {code} var win = Ti.UI.createWindow({ backgroundColor: 'green' }); win.addEventListener('open', function () { var _tmpURL = "https://docs.appcelerator.com/platform/latest/#!/api/" var _tmpClient = Ti.Network.createHTTPClient({ onload: function (e) { alert('Loaded'); }, onerror: function (e) { alert("Error:" + e.error); }, timeout: 30000 }); _tmpClient.open("GET", _tmpURL); _tmpClient.send(); // In this case _tmpClient may be garbage-collected as soon as this function is finished. // We could think this as "logical" failure but I think Titanium developers tend to use HttpClient like this. }); win.open(); {code}
8
3,605
TIMOB-26967
04/02/2019 04:27:13
iOS: Memory leak in Ti.API.debug
h2. Description We have tried the candidate sdk v8.1.0 and v8.0.1, however, the memory leak issue still exists. We have done a comparison between v6.3.0.GA, and candidates sdk v8.x.x, you can find the result in screenshots which indicate that the memory is not released. It is the same issue as our previous bug report https://jira.appcelerator.org/browse/TIMOB-26811 h2. Sample App https://github.com/lukeluluke/simpleApp h2. How to reproduce 1. Clone the project and build with sdk v8.1.0.v20190328075104 2. Use Instruments to monitor the memory usage and leaks 3. You will find the memory keep increasing , and the are memory leaks for almost each api request. 4. Rebuild the app with sdk v.6.3.0.GA. 5. Use Instruments to monitor the memory usage and leaks 6. You will see memory is freed at some time
13
3,606
TIMOB-26973
04/02/2019 13:39:46
iOS: Add accessibilityIdentifier
In UI testing one way of selecting element is by "Accessibility ID", e.g. in Appium: http://appium.io/docs/en/commands/element/find-elements/index.html#selector-strategies {quote} *Strategy* Accessibility ID *Description* Read a unique identifier for a UI element. For XCUITest it is the element's _+accessibility-id+_ attribute. For Android it is the element's _+content-desc+_ attribute. {quote} In Titanium SDK "content description" for Android views [composed from three other properties|https://github.com/appcelerator/titanium_mobile/blob/8_0_X/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java#L2177]: * accessibilityLabel * accessibilityValue * accessibilityHint On iOS property ["accessibilityIdentifier"|https://developer.apple.com/documentation/uikit/uiaccessibilityidentification/1623132-accessibilityidentifier?language=objc] is not used by Ti SDK. I suggest to compose "accessibilityIdentifier" value on iOS same way it is done on Android for "content description".
5
3,607
TIMOB-26969
04/09/2019 07:39:21
Windows: Codec encodeNumber/decodeNumber should throw Error on invalid setup
{{Codec.encodeNumber}} and {{decodeNumber}} should throw Exception when specific parameter is not specified. See test case fro details: https://github.com/appcelerator/titanium-mobile-mocha-suite/blob/master/Resources/ti.codec.test.js#L355 and https://github.com/appcelerator/titanium-mobile-mocha-suite/blob/master/Resources/ti.codec.test.js#L390.
5
3,608
TIMOB-26976
04/10/2019 18:40:03
Html having links with target="_blank" is not working
Html having links with target="_blank" is not working from SDK 8.0.0 as we have moved to use WKWebView in TiUIWebview instead of UIWebView The fix is provided by [~arif] in [PR|https://github.com/appcelerator-modules/Ti.WKWebView/pull/26] of WKWbView module. Test Case - {code:java} var win = Ti.UI.createWindow({ backgroundColor: 'white' }); var webview = Ti.UI.createWebView({ top: 60, }); webview.setHtml("<!DOCTYPE html><html><body><p>Open link: <a href=\"https://www.google.com\" target=\"_blank\">click me</a></p></body></html>"); win.add(webview); win.open(); {code} Expected Result - It should open webpage on click of 'click me'.
2
3,609
TIMOB-26978
04/11/2019 02:49:04
Android: Showing/hiding dialog while window is being destroyed by "Don't keep activities" sometimes crashes
*Summary:* Showing or hiding a dialog (alert or progress indicator) from an activity window that is in the middle of being destroy, but not "finished", will sometimes cause the following crashes. Note that an Android activity can be flagged as "destroyed", but not "finished", if the Android OS destroys it due to low memory or if system developer option "Don't keep activities" is enabled. When this happens, the Android OS intends to restore the activity when the end-user navigates back to it. ---- *Steps to reproduce dialog "dismiss" crash:* _Unknown._ Theoretically, this should be possible by calling a dialog's {{hide()}} method via the {{Ti.UI.Window}} object's {{window.activity.onDestroy}} callback, but it doesn't crash for me. Below is the stack trace reported by some app developers when this issue happens {code} java.lang.IllegalArgumentException: View=DecorView@1a43283[TiActivity] not attached to window manager at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:485) at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:394) at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:124) at android.app.Dialog.dismissDialog(Dialog.java:375) at android.app.Dialog.dismiss(Dialog.java:358) at ti.modules.titanium.ui.widget.TiUIProgressIndicator.handleHide(TiUIProgressIndicator.java:252) at ti.modules.titanium.ui.widget.TiUIProgressIndicator.handleMessage(TiUIProgressIndicator.java:78) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6718) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) {code} ---- *Steps to reproduce dialog "show" crash:* # Go to the Android device's main "Settings" screen. # Tap on "System" under "Settings. # Tap on "Developer options" under "System" settings. # Enable "Don't keep activities", which should be near the bottom of the list. # Build and run the below code on the above Android device. # Press the Android "Home" button. # Resume the app. # Press the Android "Back" button. # Observe the Android log. You'll see one of the below exception stack traces. app.js {code:javascript} var progressIndicator = Ti.UI.Android.createProgressIndicator({ message: "Progressing...", location: Ti.UI.Android.PROGRESS_INDICATOR_DIALOG, type: Ti.UI.Android.PROGRESS_INDICATOR_INDETERMINANT, cancelable: false, }); var window = Ti.UI.createWindow(); window.add(Ti.UI.createLabel({ text: "Press Back" })); window.activity.onDestroy = function() { var isShowingAlert = true; if (isShowingAlert) { alert("Hello World!"); } else { var progressIndicator = Ti.UI.Android.createProgressIndicator({ message: "Progressing...", location: Ti.UI.Android.PROGRESS_INDICATOR_DIALOG, type: Ti.UI.Android.PROGRESS_INDICATOR_INDETERMINANT, cancelable: false, }); progressIndicator.show(); } } window.open(); {code} Stack trace in 7.5.x... {code} [ERROR] TiExceptionHandler: (main) [611,6711] Attempt to invoke virtual method 'java.lang.Object org.appcelerator.kroll.KrollObject.callProperty(java.lang.String, java.lang.Object[])' on a null object reference [ERROR] TiExceptionHandler: [ERROR] TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1210) [ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.ActivityProxy.handleMessage(ActivityProxy.java:394) [ERROR] TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] TiExceptionHandler: android.os.Looper.loop(Looper.java:193) [ERROR] TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6669) [ERROR] TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method) [ERROR] TiExceptionHandler: com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) [ERROR] TiExceptionHandler: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) [ERROR] TiExceptionHandler: (main) [34,6745] Unable to add window -- token android.os.BinderProxy@b66e705 is not valid; is your activity running? [ERROR] TiExceptionHandler: [ERROR] TiExceptionHandler: android.view.ViewRootImpl.setView(ViewRootImpl.java:798) [ERROR] TiExceptionHandler: android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:356) [ERROR] TiExceptionHandler: android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93) [ERROR] TiExceptionHandler: android.app.Dialog.show(Dialog.java:329) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiExceptionHandler.createDialog(TiExceptionHandler.java:233) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiExceptionHandler$1.onCurrentActivityReady(TiExceptionHandler.java:171) [ERROR] TiExceptionHandler: org.appcelerator.titanium.util.TiUIHelper.waitForCurrentActivity(TiUIHelper.java:193) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiApplication.waitForCurrentActivity(TiApplication.java:817) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiExceptionHandler.handleOpenErrorDialog(TiExceptionHandler.java:167) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiExceptionHandler.openErrorDialog(TiExceptionHandler.java:139) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiExceptionHandler.handleException(TiExceptionHandler.java:264) [ERROR] TiExceptionHandler: org.appcelerator.kroll.KrollRuntime.dispatchException(KrollRuntime.java:540) [ERROR] TiExceptionHandler: org.appcelerator.titanium.TiApplication$1.uncaughtException(TiApplication.java:362) [ERROR] TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1225) [ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.ActivityProxy.handleMessage(ActivityProxy.java:394) [ERROR] TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] TiExceptionHandler: android.os.Looper.loop(Looper.java:193) [ERROR] TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6669) [ERROR] TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method) [ERROR] TiExceptionHandler: com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) [ERROR] TiExceptionHandler: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) {code} Stack trace in 8.0.0... {code} [ERROR] WindowManager: android.view.WindowLeaked: Activity org.appcelerator.titanium.TiActivity has leaked window DecorView@89a3790[TiActivity] that was originally added here [ERROR] WindowManager: at android.view.ViewRootImpl.<init>(ViewRootImpl.java:511) [ERROR] WindowManager: at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:346) [ERROR] WindowManager: at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93) [ERROR] WindowManager: at android.app.Dialog.show(Dialog.java:329) [ERROR] WindowManager: at ti.modules.titanium.ui.widget.TiUIProgressIndicator.handleShow(TiUIProgressIndicator.java:231) [ERROR] WindowManager: at ti.modules.titanium.ui.widget.TiUIProgressIndicator.show(TiUIProgressIndicator.java:146) [ERROR] WindowManager: at ti.modules.titanium.ui.android.ProgressIndicatorProxy.handleShow(ProgressIndicatorProxy.java:59) [ERROR] WindowManager: at org.appcelerator.titanium.proxy.TiViewProxy.show(TiViewProxy.java:763) [ERROR] WindowManager: at ti.modules.titanium.ui.TiDialogProxy.access$001(TiDialogProxy.java:29) [ERROR] WindowManager: at ti.modules.titanium.ui.TiDialogProxy$1.onCurrentActivityReady(TiDialogProxy.java:47) [ERROR] WindowManager: at org.appcelerator.titanium.util.TiUIHelper.waitForCurrentActivity(TiUIHelper.java:194) [ERROR] WindowManager: at ti.modules.titanium.ui.TiDialogProxy.show(TiDialogProxy.java:42) [ERROR] WindowManager: at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method) [ERROR] WindowManager: at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:75) [ERROR] WindowManager: at org.appcelerator.kroll.KrollProxy.callPropertySync(KrollProxy.java:753) [ERROR] WindowManager: at org.appcelerator.titanium.TiBaseActivity.dispatchCallback(TiBaseActivity.java:1304) [ERROR] WindowManager: at org.appcelerator.titanium.TiBaseActivity.onDestroy(TiBaseActivity.java:1589) [ERROR] WindowManager: at org.appcelerator.titanium.TiActivity.onDestroy(TiActivity.java:58) [ERROR] WindowManager: at android.app.Activity.performDestroy(Activity.java:7395) [ERROR] WindowManager: at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1306) [ERROR] WindowManager: at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4443) [ERROR] WindowManager: at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4476) [ERROR] WindowManager: at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:39) [ERROR] WindowManager: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145) [ERROR] WindowManager: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70) [ERROR] WindowManager: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) [ERROR] WindowManager: at android.os.Handler.dispatchMessage(Handler.java:106) [ERROR] WindowManager: at android.os.Looper.loop(Looper.java:193) [ERROR] WindowManager: at android.app.ActivityThread.main(ActivityThread.java:6669) [ERROR] WindowManager: at java.lang.reflect.Method.invoke(Native Method) [ERROR] WindowManager: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) [ERROR] WindowManager: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) {code} ---- *Solution:* The dialog handling code will attempt to show a dialog use the top-most activity that is being shown. This activity is fetched via {{TiApplication.getCurrentActivity()}}. This method will checks the top-most activity's {{isFinishing()}} method and ignores skips them knowing that they are in the middle of being destroyed... but this code is also missing an {{isDestroyed()}} check since an activity can be destroyed but not finished for the "Don't keep activities" edge-case. [TiApplication.getCurrentActivity()|https://github.com/appcelerator/titanium_mobile/blob/864d8f10b30b5d4fabb4d235a44e715973750c5a/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java#L252] Our dialog dismissing code needs to check if the hosting activity has been destroyed as well, not just finished. We should also wrap a {{dismiss()}} call with a try/catch block just in case since we don't know how to reproduce this issue (might be a bug on Google's end that we need to work-around?). [TiUIDialog.java|https://github.com/appcelerator/titanium_mobile/blob/864d8f10b30b5d4fabb4d235a44e715973750c5a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIDialog.java] [TiUIProgressIndicator.java|https://github.com/appcelerator/titanium_mobile/blob/864d8f10b30b5d4fabb4d235a44e715973750c5a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUIProgressIndicator.java]
13
3,610
TIMOB-26979
04/11/2019 04:45:34
Windows: Save callback instances to stablize tests on Jenkins
Save object instance at callbacks around networking (e.g. {{Ti.Network}}/{{Ti.UI.WebView}}) to stablize Jenkins tests.
5
3,611
TIMOB-26980
04/11/2019 16:52:48
Android: module clean command deletes too much of libs folder
Our module clean command for Android is too aggressive with the {{libs}} directory, wiping it entirely. For most modules this is fine, but if a module has a pre-built static library inside, we'll blow it away. {{appcelerator.encrypteddatabase}} is one such module.
5
3,612
TIMOB-26981
04/11/2019 19:00:40
iOS: Module builds broken
Some of the iOS native module build are completely broken with SDK 8.0.0. {{appcelerator.encrytpeddatabase}} is one that breaks due to the removal of some headers in the packaged SDK's {{iphone/include}} folder. The necessary headers are included in {{iphone/Classes}}, but used to have duplicates in {{iphone/include}}. we should have redirecting headers placed there. Additionally, a good deal of the core code moved into the TitaniumKit framework and this headers are inside the framework. We need redirecting headers for those. Lastly, we should consider some mechanism to automatically include the TitaniumKit framework into the module build. Otherwise module authors have to modify the {{titanium.xcconfig}} to add: {code} DEVELOPER_FRAMEWORKS_DIR = "$(TITANIUM_SDK)/iphone/Frameworks" FRAMEWORK_SEARCH_PATHS = $(DEVELOPER_FRAMEWORKS_DIR) $(inherited) {code}
5
3,613
TIMOB-26985
04/16/2019 01:51:39
iOS: Native modules are not protected
- Native modules are not protected from deallocation by JavascriptCore. This means cached modules can have their proxies released.
8
3,614
TIMOB-26987
04/17/2019 19:48:53
iOS: ACA module is crashing with iOS 12 and later
Hello, Just added the following line of code against a button click. When I clicked on, the app suddenly closed. We have attached the crash log on the attachment file. {code} function doClick(e) { const aca = require('com.appcelerator.aca'); aca.setUsername("Testing"); } $.index.open(); {code} *Tested this issue on with this environment:* Ti SDK 8.0.0.GA ACA v1.0.3 iOS device: iPhone 5s (12.2) Please let us know if you need any more information. Thanks
8
3,615
TIMOB-26992
04/24/2019 01:46:45
Android: HTTPClient may use SSLv3 by default on Android 4.x when it shouldn't
*Summary:* Titanium's {{HTTPClient}} is internally coded to always disable the SSLv3 protocol and only support TLS 1.0 and higher protocols for "https://" communications. This is because SSLv3 is no longer considered secure as of 2014. https://blog.mozilla.org/security/2014/10/14/the-poodle-attack-and-the-end-of-ssl-3-0/ Unfortunately, there is a bug on Google's end where Android 4.4 and older OS versions will ignore our TLS settings in Java and default to the SSLv3 protocol instead. This can cause communication errors since modern web servers typically respond to SSLv3 requests with an error since this protocol is not considered secure. The Android bug report can be found here... https://issuetracker.google.com/issues/37008635 *Steps to reproduce:* # Acquire an Android 4.4 device. # Make sure the device has Internet access. # Build and run with the below code. # Tap on the "HTTP Get" button. # Notice an "SSLProtocolException" error is displayed on screen. # Run the app on Android 5.0 or newer device. # After tapping on "HTTP Get", notice that a valid HTTP response is displayed onscreen. {code:javascript} var window = Ti.UI.createWindow(); var scrollView = Ti.UI.createScrollView({ width: Ti.UI.FILL, height: Ti.UI.FILL, }); var label = Ti.UI.createLabel({ width: Ti.UI.FILL, height: Ti.UI.SIZE, }); scrollView.add(label); window.add(scrollView); var button = Ti.UI.createButton({ title: "HTTP Get", bottom: "10dp", right: "10dp", }); button.addEventListener("click", function(e) { var httpClient = Ti.Network.createHTTPClient({ onload: function(e) { label.text = httpClient.responseText; button.enabled = true; }, onerror: function(e) { var message = e.error; if (!message) { message = "Unknown error occurred."; } label.text = message; button.enabled = true; }, }); label.text = "Fetching..."; button.enabled = false; httpClient.open("GET", "https://www.nasa.gov"); httpClient.send(); }); window.add(button); window.open(); {code} *Result:* The following SSLv3 error gets logged when running on Android 5.1 and older OS versions. {code} [ERROR] : TiHTTPClient: (TiHttpClient-1) [8913,9013] HTTP Error (javax.net.ssl.SSLHandshakeException): javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x76d92718: Failure in SSL library, usually a protocol error [ERROR] : TiHTTPClient: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x733bdd74:0x00000000) [ERROR] : TiHTTPClient: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x76d92718: Failure in SSL library, usually a protocol error [ERROR] : TiHTTPClient: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x733bdd74:0x00000000) [ERROR] : TiHTTPClient: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:448) [ERROR] : TiHTTPClient: at com.android.okhttp.Connection.upgradeToTls(Connection.java:146) [ERROR] : TiHTTPClient: at com.android.okhttp.Connection.connect(Connection.java:107) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:294) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:503) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:136) [ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1319) [ERROR] : TiHTTPClient: at java.lang.Thread.run(Thread.java:841) [ERROR] : TiHTTPClient: Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x76d92718: Failure in SSL library, usually a protocol error [ERROR] : TiHTTPClient: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x733bdd74:0x00000000) [ERROR] : TiHTTPClient: at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) [ERROR] : TiHTTPClient: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:405) {code} *Work-around:* Simplest solution is to change the app's min supported Android version to 5.0 (aka: API Level 21). This can be done by adding the following to the "tiapp.xml" file. {code:xml} <?xml version="1.0" encoding="UTF-8"?> <ti:app xmlns:ti="http://ti.appcelerator.org"> <android xmlns:android="http://schemas.android.com/apk/res/android"> <manifest> <uses-sdk android:minSdkVersion="21"/> </manifest> </android> </ti:app> {code} Alternatively, this can be worked-around server side by allowing the SSLv3 protocol, but this is not advised since this protocol is not considered secure. Unfortunately, setting the {{HTTPClient}} "tlsVersion" property will not work since Android 4.4 and older OS versions may ignore this setting and use SSLv3 instead, which is the bug on Google's end that this ticket is about.
13
3,616
TIMOB-26993
04/24/2019 22:43:57
Android: WebView sometimes crashes on window close after zooming content
*Summary:* Android's {{WebView}} will sometimes crash when closing its parent window after zooming its web content. *Result:* The following stack trace happens when it crashes. {code} [ERROR] TiExceptionHandler: (main) [412568,573163] null [ERROR] TiExceptionHandler: [ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.webview.TiUIWebView.setZoomLevel(TiUIWebView.java:578) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.webview.TiWebViewClient.onScaleChanged(TiWebViewClient.java:376) [ERROR] TiExceptionHandler: com.android.webview.chromium.WebViewContentsClientAdapter.onScaleChangedScaled(WebViewContentsClientAdapter.java:789) [ERROR] TiExceptionHandler: com.android.org.chromium.android_webview.AwContentsClientCallbackHelper$MyHandler.handleMessage(AwContentsClientCallbackHelper.java:139) [ERROR] TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] TiExceptionHandler: android.os.Looper.loop(Looper.java:136) [ERROR] TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:5001) [ERROR] TiExceptionHandler: java.lang.reflect.Method.invokeNative(Native Method) [ERROR] TiExceptionHandler: java.lang.reflect.Method.invoke(Method.java:515) [ERROR] TiExceptionHandler: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) [ERROR] TiExceptionHandler: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) [ERROR] TiExceptionHandler: dalvik.system.NativeStart.main(Native Method) {code} *Note:* This issue is difficult to reproduce, but it sometimes occurs with our mocha unit tests here... https://github.com/appcelerator/titanium-mobile-mocha-suite/blob/master/Resources/ti.ui.webview.test.js This issue has been mentioned on Slack here... https://ti-slack.slack.com/archives/C03CVLS0U/p1547721498070400
3
3,617
TIMOB-26996
04/26/2019 01:38:24
Android: Window/TabGroup close() method call is ignored until "open" event has been fired
*Summary:* On Android, a {{Ti.UI.Window}} or {{Ti.UI.TabGroup}} object's {{close()}} method call is ignored if it hasn't finished opening yet. The {{Window}} or {{TabGroup}} will remain open and not automatically close itself. This means the following won't close the window. The window will remain open. {code:javascript} var window = Ti.UI.createWindow(); window.open(); window.close(); // <- This method call will be ignored. {code} *Steps to reproduce:* # Build and run the below code on Android. # Tap on the "Open/Close Window" button. # Notice a red window is displayed. (This is a bug. The {{close()}} method was ignored.) # Press the Android "Back" button. # Tap on the "Open/Close TabGroup" button. # Notice a red tab group is displayed. (This is a bug. The {{close()}} method was ignored.) {code:javascript} var parentWindow = Ti.UI.createWindow(); var openWindowButton = Ti.UI.createButton({ title: "Open/Close Window", top: "30%", }); openWindowButton.addEventListener("click", function() { var childWindow = Ti.UI.createWindow({ backgroundColor: "red" }); childWindow.add(Ti.UI.createLabel({ text: "Uh-oh!", color: "white", })); childWindow.open(); childWindow.close(); // <- This method call will be ignored. }); parentWindow.add(openWindowButton); var openTabGroupButton = Ti.UI.createButton({ title: "Open/Close TabGroup", top: "50%" }); openTabGroupButton.addEventListener("click", function() { function createTab(title) { var window = Ti.UI.createWindow({ title: title, backgroundColor: "red" }); window.add(Ti.UI.createLabel({ text: "Uh-oh!", color: "white" })); var tab = Ti.UI.createTab({ title: title, window: window, }); return tab; } var tabGroup = Ti.UI.createTabGroup({ tabs: [createTab("Tab 1"), createTab("Tab 2"), createTab("Tab 3")], }); tabGroup.open(); tabGroup.close(); // <- This method call will be ignored or crash in older versions. }); parentWindow.add(openTabGroupButton); parentWindow.open(); {code} *Note:* For {{TabGroup}}, calling the {{close()}} method will crash if the app was built with Titanium 7.x.x or older versions. In Titanium 8.0.0, it does not crash and the method call is ignored. *Expected Result:* The {{close()}} method call should be respected, eve before the window has finished opening. This is how it works on iOS. The only time {{close()}} should be ignored is if the window has never been opened or has already been closed. *Work-around:* Don't call the {{close()}} method until the "open" event has been fired.
5
3,618
TIMOB-27007
04/26/2019 18:24:39
Android: Mocha test Titanium.UI.TextField width test failure
Titanium.UI.TextField width please investigate the failure. Please use https://github.com/ewanharris/titanium-mobile-mocha-suite/tree/TIMOB-24816 to find the related test You can use https://github.com/ewanharris/mocha-test to quickly debug (most) mocha tests)
3
3,619
TIMOB-27030
04/26/2019 18:49:08
iOS: Mocha test Titanium.UI.TextField width test failure
Titanium.UI.TextField width please investigate the failure. Please use https://github.com/ewanharris/titanium-mobile-mocha-suite/tree/TIMOB-24816 to find the related test You can use https://github.com/ewanharris/mocha-test to quickly debug (most) mocha tests)
3
3,620
TIMOB-27042
04/30/2019 00:58:04
Android: Update ti.playservices to 16.1.3
- Update {{ti.playservices}} module to {{16.1.3}}
3
3,621
TIMOB-27043
04/30/2019 09:52:17
Cache JS processing between builds
The build times for apps was already increased in TIMOB-26917 by processing JS files in parallel. However, we still process JS on every build, ignoring wether they were changed or not. Further improvements to the build time could be achieved by using the file change detection from [appc-tasks|https://github.com/appcelerator/appc-tasks]. This would only process the JS files that actually changed and avoid unnecessary transpilation and analyzation steps on every build.
13
3,622
TIMOB-27045
04/30/2019 14:43:56
Pass along ENV variables to process.env on development builds
Currently we have an empty process.env object for Node API compatibility. We should consider passing along the current ENV variables to be used in some internal JSON file, similarly to how Ti.App.Properties are inserted. To protect apps, this should likely only be done in development builds, and we could consider suggesting using of https://github.com/motdotla/dotenv to developers who want to pass along/set ENV vars in production builds of the app (or maybe hook in some babel plugin that works in conjunction with dotenv to inline values? Not really sure any sensitive data should be in the app's contents at all though...)
8
3,623
TIMOB-27047
04/30/2019 23:08:06
iOS: Version of SDKs default modules are not up to date
Default modules, which are shipped with sdk, do not have updated module versions. e.g 1. urlSession - latest version is 2.2.0 but sdk has 2.1.0 2. ti.map - latest version is 3.1.2 but sdk has 3.1.0 3. ti.safaridialog - latest version is 3.1.0 but sdk has 1.1.1 4. ti.identity - latest version is 1.0.6 but sdk has 1.0.5 We need to update [module.json|https://github.com/appcelerator/titanium_mobile/blob/master/support/module/packaged/modules.json]
2
3,624
TIMOB-27054
05/02/2019 18:40:59
iOS: Ti.API.log() function no longer works within WebView's HTML JS code as of 8.0.0
*Summary:* The [Ti.API.log()|https://docs.appcelerator.com/platform/latest/#!/api/Titanium.API-method-log] function no longer works within a {{WebView}}'s HTML {{<script/>}} code as of Titanium 8.0.0. *Steps to reproduce:* # Set up a Classic Titanium "app.js" with the below code. # Build and run on iOS with Titanium 8.0.0 or 8.0.1. # Notice that *none* of the below messages get logged. # Build and run with Titanium 7.x.x. # Notice that the below message do get logged. {code:javascript} var htmlText = '<!DOCTYPE html>\n' + '<html>\n' + ' <head>\n' + ' <meta name="viewport" content="width=device-width, initial-scale=1.0">\n' + ' </head>\n' + ' <body>\n' + ' <p>HTML JavaScript Logging Test</p>\n' + ' </body>\n' + ' <script>\n' + ' document.addEventListener("DOMContentLoaded", function(e) {\n' + ' Ti.API.log("info", "@@@ Logging via Ti.API.log(info,message) method.");\n' + ' Ti.API.log("warn", "@@@ Logging via Ti.API.log(warn,message) method.");\n' + ' Ti.API.log("error", "@@@ Logging via Ti.API.log(error,message) method.");\n' + ' });\n' + ' </script>\n' + '</html>\n'; var window = Ti.UI.createWindow(); var webView = Ti.UI.createWebView({ html: htmlText, }); window.add(webView); window.open(); {code} *Work-Around:* Use the following instead. They work in 8.0.x and older versions. {code:javascript} Ti.API.info("My info."); Ti.API.warn("My warning."); Ti.API.error("My error"); {code}
2
3,625
TIMOB-27056
05/02/2019 19:36:04
iOS: WebView HTML JS code can no longer access "Titanium." API (but "Ti." exists) as of 8.0.0
*Summary:* The {{Titanium}} object is undefined within a {{WebView}}'s HTML {{<script/>}} as of 8.0.0. Only the {{Ti}} object is defined. *Steps to reproduce:* # Set up a Classic Titanium "app.js" with the below code. # Build and run on iOS with Titanium 8.0.0 or 8.0.1. # Observe the log. {code:javascript} var htmlText = '<!DOCTYPE html>\n' + '<html>\n' + ' <head>\n' + ' <meta name="viewport" content="width=device-width, initial-scale=1.0">\n' + ' </head>\n' + ' <body>\n' + ' <p>HTML JavaScript Titanium API Test</p>\n' + ' </body>\n' + ' <script>\n' + ' document.addEventListener("DOMContentLoaded", function(e) {\n' + ' Ti.API.info("@@@ Logging via Ti.API.info() method.");\n' + ' Titanium.API.info("@@@ Logging via Titanium.API.info() method.");\n' + ' Ti.App.fireEvent("app:requestLogMessage", {\n' + ' message: "@@@ Fired event via Ti.App.fireEvent() method",\n' + ' });\n' + ' Titanium.App.fireEvent("app:requestLogMessage", {\n' + ' message: "@@@ Fired event via Titanium.App.fireEvent() method",\n' + ' });\n' + ' Ti.App.addEventListener("app:signalHtml", function eventHandler() {\n' + ' Ti.API.info("@@@ Received event via Ti.App.addEventListener() method.");\n' + ' Ti.App.removeEventListener("app:signalHtml", eventHandler);\n' + ' });\n' + ' Titanium.App.addEventListener("app:signalHtml", function eventHandler() {\n' + ' Titanium.API.info("@@@ Received event via Titanium.App.addEventListener() method.");\n' + ' Titanium.App.removeEventListener("app:signalHtml", eventHandler);\n' + ' });\n' + ' Ti.App.fireEvent("app:webViewReady", {})\n' + ' });\n' + ' </script>\n' + '</html>\n'; Ti.App.addEventListener("app:requestLogMessage", function(e) { Ti.API.info(e.message); }); Ti.App.addEventListener("app:webViewReady", function(e) { Ti.App.fireEvent("app:signalHtml", {}); }); var window = Ti.UI.createWindow(); var webView = Ti.UI.createWebView({ html: htmlText, }); window.add(webView); window.open(); {code} *Expected Result:* The following should be logged. (You'll get the below with a 7.5.1 built app.) {code} [INFO] @@@ Logging via Ti.API.info() method. [INFO] @@@ Logging via Titanium.API.info() method. [INFO] @@@ Fired event via Ti.App.fireEvent() method [INFO] @@@ Fired event via Titanium.App.fireEvent() method [INFO] @@@ Received event via Ti.App.addEventListener() method. [INFO] @@@ Received event via Titanium.App.addEventListener() method. {code} *Actual Result:* Only the 1st message gets logged in Titanium 8.0.0 or 8.0.1 because the script errors out when using the {{Titanium}} object. _(This is the bug.)_ {code} [INFO] @@@ Logging via Ti.API.info() method. {code} *Recommended Solution:* Add a {{var Titanium = Ti;}} to the code that gets injected into the WKWebView here... [TiUIWebView.m|https://github.com/appcelerator/titanium_mobile/blob/3d1569dededb35387b197a71317ffa3e7fb42ea8/iphone/Classes/TiUIWebView.m#L390] *Work-Around:* Use the {{Ti}} object instead of the {{Titanium}} object within the HTML's script.
2