[TIMOB-15956] LiveView: Windows: Fails to run on android device/emulator. "Arguments to path.join must be strings"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-12-12T23:16:05.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | 2013 Sprint 25, 2013 Sprint 25 Tooling, Release 3.2.0 |
Components | Android, LiveView |
Labels | qe-closed-3.2.0, qe-testadded, triage |
Reporter | Allen Yeung |
Assignee | Christian Sullivan |
Created | 2013-12-11T06:18:22.000+0000 |
Updated | 2014-02-24T18:19:06.000+0000 |
Description
Steps to reproduce:
1. Create an alloy app in Studio
2. Enable liveview
3. Run the app on either device or emulator
Expected:
Liveview should run correctly
Actual:
The liveview hook fails with the error:
path.js:204
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at f (path.js:204:15)
at Object.filter (native)
at exports.join (path.js:209:40)
at Object.<anonymous> (C:\Users\Thomas Anderson\AppData\Local\Appcelerator Studio\plugins\com.appcelerator.titanium.liveview.core_1.0.0.1385592010\node_modules\liveview\lib\fserver.js:24:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2013-12-10 at 11.15.03 PM.png | 2013-12-11T07:16:08.000+0000 | 46287 |
What version of liveview are you using?
I'm not sure how to check for the version, but I attached the plugin version
FWIW, line 24 is:
Which suggests that process.env.HOME is not a string: http://nodejs.org/api/path.html#path_path_join_path1_path2 It would be helpful if in the case a path was incorrect, it printed out the path it was _trying_ to use into the error message. You can find the LiveView version by running diagnostics and it's one of the things printed out. You could alternately open up the plugin folder on disk and look for the package.json file there.
Just checked... LiveView Version: 0.1.35
Perhaps there is a better way of determining the HOME? http://stackoverflow.com/questions/9080085/node-js-find-home-directory-in-platform-agnostic-way
Changing process.env.HOME to process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'] works for me in windows, but now launches, and it does not update correctly on my device.
RESOLVED in [MASTER] https://github.com/appcelerator/liveview/commit/025fdf04d54863b494a98a37c4ab2a1e367f497c
Tested on: Windows 8 Appcelerator Studio, build: 3.2.0.201312121648 Titanium SDK, build: 3.2.0.v20131212122847 CLI: 3.2.0-cr3 Alloy: 1.3.0-cr LiveView: 0.1.35 Android Emulator: 2.3.3 Studio launches emulator and app starts successfully. Closing.