Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-32] Windows: jdklib v2 - If you move your JDK while running jdklib.watch(), then "TypeError: Path must be a string" error is returned

GitHub Issuen/a
TypeBug
PriorityHigh
StatusResolved
ResolutionInvalid
Resolution Date2017-10-17T03:53:20.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsjdklib
Labelsn/a
ReporterWilson Luu
AssigneeChris Barber
Created2016-08-30T00:53:30.000+0000
Updated2017-10-17T03:53:20.000+0000

Description

*Details:* On Windows, if you move your JDK while running jdklib.watch(), then TypeError: Path must be a string error is returned. *Notes:* This is not reproducible with JDK on Mac. *Steps to reproduce:*

Make sure you are using Node 4.X.X on Windows

Clone and run npm install on https://github.com/appcelerator/jdklib

Symlink to the above built jdklib v2

Run this Node script:

'use strict';

const jdklib = require('jdklib');

jdklib
    .watch()
    .on('results', results => {
        console.log(JSON.stringify(results, null, 4));
    });

Find your JDK and move it

*Actual:* TypeError: Path must be a string error is returned:
TypeError: Path must be a string. Received null
    at assertPath (path.js:8:11)
    at Object.win32.join (path.js:221:5)
    at Watcher.onChange (C:\Users\qe\Desktop\something\node_modules\jdklib\node_modules\node-appc\dist\fs.js:270:19)
    at emitTwo (events.js:87:13)
    at FSWatcher.emit (events.js:172:7)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1221:12)
*Expected:* No errors should be returned while watching the JDK.

Attachments

FileDateSize
bug.gif2016-08-30T00:53:28.000+0000771907

Comments

  1. Chris Barber 2017-02-14

    This ticket is probably no longer valid. Must wait a while longer before it can be re-validated.
  2. Chris Barber 2017-10-17

    This issue is no longer valid.

JSON Source