dbankier / TiShadow

Quick Titanium previews across devices
http://tishadow.yydigital.com
Other
385 stars 122 forks source link

ts @ run -u no longer triggers on changed files #521

Closed bitfabrikken closed 7 years ago

bitfabrikken commented 7 years ago

I'm used to running with "ts @ run -u", which then auto-uploads and reloads TiShadow, when a change is detected in whatever file(s) I'm working on.

It doesn't seem to detect changes any longer, when I change something and hit save.

It does work to ctrl+c the command and run it again (ts @ run -u)

Any ideas?

bitfabrikken commented 7 years ago

TiShadow 2.9.0 both app and server on Ti SDK 6.0.1.GA

cubico commented 7 years ago

Same problem with same versions executing ti build -p android -T device --shadow on MacOS (El Capitan):

[ERROR] TiHTTPClient: (TiHttpClient-1) [28,3965] HTTP Error (java.net.ConnectException): failed to connect to /127.0.0.1 (port 3000): connect failed: ECONNREFUSED (Connection refused)
[ERROR] TiHTTPClient: java.net.ConnectException: failed to connect to /127.0.0.1 (port 3000): connect failed: ECONNREFUSED (Connection refused)
[ERROR] TiHTTPClient:   at libcore.io.IoBridge.connect(IoBridge.java:124)
[ERROR] TiHTTPClient:   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
[ERROR] TiHTTPClient:   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
[ERROR] TiHTTPClient:   at java.net.Socket.connect(Socket.java:882)
[ERROR] TiHTTPClient:   at com.android.okhttp.internal.Platform.connectSocket(Platform.java:139)
[ERROR] TiHTTPClient:   at com.android.okhttp.Connection.connect(Connection.java:148)
[ERROR] TiHTTPClient:   at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
[ERROR] TiHTTPClient:   at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
[ERROR] TiHTTPClient:   at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
{
[ERROR] TiHTTPClient:   at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
[ERROR] TiHTTPClient:   at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:491)
[ERROR] TiHTTPClient:   at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1175)
[ERROR] TiHTTPClient:   at java.lang.Thread.run(Thread.java:818)
[ERROR] TiHTTPClient: Caused by: android.system.ErrnoException: connect failed: ECONNREFUSED (Connection refused)
[ERROR] TiHTTPClient:   at libcore.io.Posix.connect(Native Method)
[ERROR] TiHTTPClient:   at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:111)
[ERROR] TiHTTPClient:   at libcore.io.IoBridge.connectErrno(IoBridge.java:137)
[ERROR] TiHTTPClient:   at libcore.io.IoBridge.connect(IoBridge.java:122)
[ERROR] TiHTTPClient:   ... 12 more

Edited: Emm.. Problem solved when the device is in the same network. I have two wifi and i am stupid :_(

bitfabrikken commented 7 years ago

@dbankier this is one of the core features of TiShadow, and I miss it very much and my productivity has greatly decreased. Do you have any idea what could be happening? Disregard cubico's post above.

dbankier commented 7 years ago

"Works for me". Check your "ts config" that you are not binding to a bad network interface.

On Wed, 8 Mar 2017, 6:11 PM Dan Kronholm, Bitfabrikken < notifications@github.com> wrote:

@dbankier https://github.com/dbankier this is one of the core features of TiShadow, and I miss it very much and my productivity has greatly decreased. Do you have any idea what could be happening? Disregard cubico's post above.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/dbankier/TiShadow/issues/521#issuecomment-284965199, or mute the thread https://github.com/notifications/unsubscribe-auth/AAxN3UgxJt0lWcF2rvs9CoURy4cqtrpyks5rjlScgaJpZM4MC9lI .

bitfabrikken commented 7 years ago

ts config outputs this

{
    "useAppcCLI": true,
    "isWatching": false
}

how can I set isWatching to true?

cubico commented 7 years ago

@bitfabrikken tishadow generates ~/.tishadow.json. You can update this content.

bitfabrikken commented 7 years ago

@dbankier + @cubico Setting isWatching to true did nothing. And there's no info about network interfaces with "ts config".

File changes/saves are not detected in realtime - Changing and saving a .js file in the project, would send and update in the tishadow app (1 file(s) bundled). To do this now, I must manually run "ts @ run -u" every time I want to push the changed files to the tishadow app. So somehow the detection mecanism for changed files doesn't detect file changes..

dbankier commented 7 years ago

forget that config setting - that is for something else. Basic questions first: OS? Buidling to which device? Most importantly, how are you installing ts? npm link or install? Worst case, you could always roll back to a previous version...

bitfabrikken commented 7 years ago

@dbankier Windows 10, 64 bit, building to devices mostly, but also have the ts app running on ios simulator + device. Installed ts via console (start -> run -> cmd) as administrator: npm install -g tishadow (output pasted below) I run the server in Titanium's built in console by using 'ts server' and whatever project I'm working on, I go to that directory and type 'ts @ run -u'. It just does not detect any changes to my projects' files, until I ctrl+c and type 'ts @ run -u' again.

Edit: 'npm install -g tishadow' output:

C:\Windows\system32>npm install -g tishadow
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated wrench@1.4.4: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.
npm WARN deprecated minimatch@0.0.5: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN optional dep failed, continuing fsevents@1.1.1
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
-
> ws@0.4.32 install C:\Program Files (x86)\nodejs\node_modules\tishadow\node_modules\socket.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

C:\Program Files (x86)\nodejs\node_modules\tishadow\node_modules\socket.io-client\node_modules\ws>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): err
or MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK ve
rsion in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Program Fi
les (x86)\nodejs\node_modules\tishadow\node_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): err
or MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK ve
rsion in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Program Fi
les (x86)\nodejs\node_modules\tishadow\node_modules\socket.io-client\node_modules\ws\build\validation.vcxproj]

> ws@0.4.32 install C:\Program Files (x86)\nodejs\node_modules\tishadow\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

C:\Program Files (x86)\nodejs\node_modules\tishadow\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): err
or MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK ve
rsion in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Program Fi
les (x86)\nodejs\node_modules\tishadow\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\buffe
rutil.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140\Toolset.targets(34,5): err
or MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK ve
rsion in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Program Fi
les (x86)\nodejs\node_modules\tishadow\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build\valid
ation.vcxproj]
C:\Program Files (x86)\nodejs\ts -> C:\Program Files (x86)\nodejs\node_modules\tishadow\cli\tishadow
C:\Program Files (x86)\nodejs\tishadow -> C:\Program Files (x86)\nodejs\node_modules\tishadow\cli\tishadow

> tishadow@2.9.0 postinstall C:\Program Files (x86)\nodejs\node_modules\tishadow
> node cli/tishadow express

'ti' is not recognized as an internal or external command,
operable program or batch file.
tishadow@2.9.0 C:\Program Files (x86)\nodejs\node_modules\tishadow
├── async@0.2.10
├── underscore@1.8.3
├── pkginfo@0.2.3
├── colors@1.1.2
├── mkdirp@0.3.5
├── commander@1.3.2 (keypress@0.1.0)
├── wrench@1.4.4
├── multiparty@4.1.3 (fd-slicer@1.0.1)
├── form-data@0.1.4 (mime@1.2.11, async@0.9.2, combined-stream@0.0.7)
├── lazystream@0.1.0 (readable-stream@1.0.34)
├── jshint@0.9.1 (cli@0.4.3, minimatch@0.0.5)
├── ipselector@0.1.4 (underscore@1.6.0, fields@0.1.24)
├── glob@3.2.11 (inherits@2.0.3, minimatch@0.3.0)
├── body-parser@1.17.1 (content-type@1.0.2, bytes@2.4.0, depd@1.1.0, qs@6.4.0, on-finished@2.3.0, raw-body@2.2.0, http-errors@1.6.1, iconv-lite@0.4.15, debug@2.6.1, type-is@1.6.14)
├── archiver@0.4.10 (readable-stream@1.0.34, iconv-lite@0.2.11)
├── tiapp@0.0.3 (underscore@1.5.2, xml2js@0.2.8)
├── uglify-js@2.8.11 (uglify-to-browserify@1.0.2, source-map@0.5.6, yargs@3.10.0)
├── mocha@1.21.5 (commander@2.3.0, escape-string-regexp@1.0.2, diff@1.0.8, growl@1.8.1, debug@2.0.0, mkdirp@0.5.0, glob@3.2.3, jade@0.26.3)
├── chokidar@1.6.1 (path-is-absolute@1.0.1, inherits@2.0.3, async-each@1.0.1, glob-parent@2.0.0, is-glob@2.0.1, is-binary-path@1.0.1, readdirp@2.1.0, anymatch@1.3.0)
├── jade@1.11.0 (commander@2.6.0, character-parser@1.2.1, void-elements@2.0.1, jstransformer@0.0.2, mkdirp@0.5.1, constantinople@3.0.2, with@4.0.3, clean-css@3.4.25, transformers@2.1.0)
├── node-notifier@4.6.1 (shellwords@0.1.0, semver@5.3.0, growly@1.3.0, minimist@1.2.0, which@1.2.12, lodash.clonedeep@3.0.2, cli-usage@0.1.4)
├── express@3.21.2 (merge-descriptors@1.0.0, commander@2.6.0, utils-merge@1.0.0, methods@1.1.2, vary@1.0.1, content-type@1.0.2, basic-auth@1.0.4, parseurl@1.3.1, etag@1.7.0, range-parser@1.0.3, content-disposition@0.5.0, escape-html@1.0.2, cookie@0.1.3, cookie-signature@1.0.6, fresh@0.3.0, depd@1.0.1, debug@2.2.0, proxy-addr@1.0.10, send@0.13.0, mkdirp@0.5.1, connect@2.30.2)
├── istanbul@0.3.22 (abbrev@1.0.9, async@1.5.2, wordwrap@1.0.0, nopt@3.0.6, esprima@2.5.0, once@1.4.0, supports-color@3.2.3, which@1.2.12, mkdirp@0.5.1, fileset@0.2.1, resolve@1.1.7, escodegen@1.7.1, js-yaml@3.8.2, handlebars@4.0.6)
├── update-notifier@0.1.10 (semver@2.3.2, chalk@0.4.0, configstore@0.3.2, request@2.81.0)
├── socket.io-client@0.9.17 (xmlhttprequest@1.4.2, uglify-js@1.2.5, active-x-obfuscator@0.0.1, ws@0.4.32)
└── socket.io@0.9.17 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.16)
bitfabrikken commented 7 years ago

I've just tried rolling back via 'npm install -g tishadow@2.8.2' and this version does detect file changes when 'ts @ run -u' is running :)

dbankier commented 7 years ago

Ahhh!!! Windows Ok there is a chokidar bug (which we switched to from gaze) when trying to watch non-existant directories. The ready event is not callled. . I just replicated the issue and fixed it. It is if you are using a non-Alloy or pre-Alloy 1.8 and i18n folder does not exists.

Fix and new version on the way