Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15956] LiveView: Windows: Fails to run on android device/emulator. "Arguments to path.join must be strings"

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-12-12T23:16:05.000+0000
Affected Version/sRelease 3.2.0
Fix Version/s2013 Sprint 25, 2013 Sprint 25 Tooling, Release 3.2.0
ComponentsAndroid, LiveView
Labelsqe-closed-3.2.0, qe-testadded, triage
ReporterAllen Yeung
AssigneeChristian Sullivan
Created2013-12-11T06:18:22.000+0000
Updated2014-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

FileDateSize
Screen Shot 2013-12-10 at 11.15.03 PM.png2013-12-11T07:16:08.000+000046287

Comments

  1. Christian Sullivan 2013-12-11

    What version of liveview are you using?
  2. Allen Yeung 2013-12-11

    I'm not sure how to check for the version, but I attached the plugin version
  3. Ingo Muschenetz 2013-12-11

    FWIW, line 24 is:
       var TMP_DIR = join(process.env.HOME, '/.titanium/')
       
    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.
  4. Allen Yeung 2013-12-11

    Just checked... LiveView Version: 0.1.35
  5. Ingo Muschenetz 2013-12-11

    Perhaps there is a better way of determining the HOME? http://stackoverflow.com/questions/9080085/node-js-find-home-directory-in-platform-agnostic-way
  6. Allen Yeung 2013-12-11

    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.
  7. Christian Sullivan 2013-12-12

    RESOLVED in [MASTER] https://github.com/appcelerator/liveview/commit/025fdf04d54863b494a98a37c4ab2a1e367f497c
  8. Samuel Dowse 2013-12-13

    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.

JSON Source