[ALOY-363] MobileWeb: Default Project: fails with Uncaught TypeError: Cannot use 'in' operator to search for 'click' in undefined index.html:5219
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2012-11-30T19:03:40.000+0000 |
Affected Version/s | Alloy 0.3.1 |
Fix Version/s | n/a |
Components | Samples & Templates |
Labels | n/a |
Reporter | Dustin Hyde |
Assignee | Tony Lukasavage |
Created | 2012-11-02T22:25:41.000+0000 |
Updated | 2014-06-22T13:23:15.000+0000 |
Description
Running the default alloy project in mobileweb fails with runtime error:
Uncaught TypeError: Cannot use 'in' operator to search for 'click' in undefined index.html:5219
Steps to Reproduce:
1. Create Default Alloy Project.
2. Run project in MobileWeb.
Actual Result:
Runtime Error.
Expected Result:
'Hello, World!'
This happens as a result of the fact that Mobileweb does not support compiler plugins in the pre-3.0.0 CLI. Because it does not support compiler plugins, alloy's compile process does not run and that vague error is the end result of an uncompiled app attempting to run for mobileweb. The only way now to successfully compile and run an alloy app for mobileweb through TiStudio is to first compile the application from the command line, then run it in TiStudio.
In the long term, once TiSDK 3.0.0 is the minimum version supported by Alloy, this can be totally avoided as the new CLI in 3.0.0 will support compiler plugins (now called "hooks") for mobileweb. If you test against the new CLI now this should be the case, as it was when I tested last week. I have linked ALOY-323 to this ticket. As you can see, there's a lot of further Alloy advancements that hinge on the official release of 3.0.0.
I was able to run the two-tab template for some reason in mobileweb.
Chances are that you recently built the two tabbed template for another platform, and the two tabbed template has nothing specific to that platform at compile time. In essence it will "work", but it is not actually compiled for mobileweb.
This is a bug with the old CLI as it relates to Mobileweb's lack of implementation of compiler plugins. The new CLI, available in Titanium 3.0+, will work as expected making this issue irrelevant when 3.0 is officially released. In the meantime, those still using Titanium < 3.0 will just need to do a
before attempting to run alloy mobileweb apps in tistudio
Closing.