[TIMOB-13554] LiveView: Unable to run an Alloy app through LiveView
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2013-07-29T00:31:35.000+0000 |
| Affected Version/s | Release 3.1.0 |
| Fix Version/s | n/a |
| Components | LiveView |
| Labels | n/a |
| Reporter | Ingo Muschenetz |
| Assignee | Christian Sullivan |
| Created | 2013-04-14T23:46:51.000+0000 |
| Updated | 2013-07-29T00:31:35.000+0000 |
Description
Steps to reproduce
Install LiveView from https://wiki.appcelerator.org/display/tools/LiveView
Create a new Alloy project
Run the project from the command line using a command like (replace the appropriate spots): \\
"/usr/local/bin/titanium" "--no-colors" "--no-prompt" "build" "--platform" "iphone" "--sdk" "3.1.0.v20130412191547" "--log-level" "trace" "--target" "simulator" "--ios-version" "6.1" "--device-family" "iphone" "--sim-version" "6.1" "--skip-js-minify"
Now do the same, but add the --liveview flag to the end.
Result
I've gotten a number of different behaviors. * A syntax error in app.js * [DEBUG] Bad plugin hooks that failed to load: [DEBUG] /usr/local/lib/node_modules/liveview/hook/lvhook.jsAttachments
| File | Date | Size |
|---|---|---|
| app.js | 2013-04-15T03:50:46.000+0000 | 146455 |
| Screen Shot 2013-04-14 at 7.47.54 PM.png | 2013-04-15T02:49:19.000+0000 | 111667 |
The syntax error:
app.js is attached. Note I've used the _unminifed_ version to help debug the issue. I did this by having the hook include the liveview.js over liveview.min.js-- Start simulator log ------------------------------------------------------- [INFO] Application started [DEBUG] Reading stylesheet from: /Users/ingo/Library/Application Support/iPhone Simulator/6.1/Applications/CB58C071-E8B4-4E34-AF2B-C19E7A9FD4E8/TestApp3.app/stylesheet.plist [INFO] TestApp3/1.0 (3.1.0.v20130412191547.0464b6c) [DEBUG] Analytics is enabled = YES [DEBUG] Loading: /Users/ingo/Library/Application Support/iPhone Simulator/6.1/Applications/CB58C071-E8B4-4E34-AF2B-C19E7A9FD4E8/TestApp3.app/app.js, Resource: app_js [DEBUG] Assigning Exception Handling Delegate... [DEBUG] Done [INFO] [object ComCrittercismTiModule] loaded [DEBUG] Loading: /Users/ingo/Library/Application Support/iPhone Simulator/6.1/Applications/CB58C071-E8B4-4E34-AF2B-C19E7A9FD4E8/TestApp3.app/com.crittercism.ti.js, Resource: com_crittercism_ti_js [ERROR] [LiveView] { [ERROR] error = { [ERROR] backtrace = "#0 () at file://localhost/Users/ingo/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/CB58C071-E8B4-4E34-AF2B-C19E7A9FD4E8/TestApp3.app/app.js:4903\n#1 Controller() at :27\n#2 () at :72\n#3 () at :3\n#4 () at file://localhost/Users/ingo/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/CB58C071-E8B4-4E34-AF2B-C19E7A9FD4E8/TestApp3.app/app.js:5022\n#5 () at file://localhost/Users/ingo/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/CB58C071-E8B4-4E34-AF2B-C19E7A9FD4E8/TestApp3.app/app.js:4903\n#6 () at file://localhost/Users/ingo/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/CB58C071-E8B4-4E34-AF2B-C19E7A9FD4E8/TestApp3.app/app.js:5062"; [ERROR] line = 1; [ERROR] message = "Parse error"; [ERROR] name = SyntaxError; [ERROR] sourceId = 290265920; [ERROR] }; [ERROR] module = "app.js"; [ERROR] } [INFO] LiveView Alloy project monitor started [DEBUG] Application booted in 856.863976 ms [INFO] Client connectedFormatted nicer:
app.js, line 4903 is:line 5062 is:4902: if (global.ENV !== 'liveview') { freshModule.cache(); } 4903: freshModule._compile();5062: var app = require('app');Duplicate, covered in more detail in TIMOB-13563