[ALOY-1169] Test samples/mobileweb: 'Uncaught No support for Titanium.Database' error when running binding_destroy sample
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-10-27T15:42:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Tim Statler |
Assignee | Tim Poulsen |
Created | 2014-10-16T13:34:28.000+0000 |
Updated | 2018-03-07T22:28:26.000+0000 |
Description
Steps:
1. Build https://github.com/appcelerator/alloy/tree/master/test/apps/models/binding_destroy for mobile web.
Result:
"Uncaught No support for Titanium.Database in MobileWeb environment. at / (line 319)" application error.
Expected:
Since index.xml declares a mobileweb-specific layout I would expect the sample to work for that platform.
This is due to the nature of our test apps and how our test framework loads some data from the HarnessTemplate and the rest from the test app. You will get the same error with any of the test apps that include a config.json file which specifies sql as the adapter type. Typically you'd prevent these errors by setting the target platform in your tiapp.xml file. Our HarnessTemplate's tiapp targets all platforms, even though some test apps have limitations. The error is thrown prior to UI code being evaluated (when the adapter code is rigged up). Short of changing how the code is generated to perform a platform check, I don't see a way within the test apps to catch such configurations. Because existing app methods prevent this error, I'm not going to make such changes.
Closing as invalid. If this is incorrect, please reopen.