phonegap / phonegap-cli

PhoneGap and PhoneGap/Build command-line interface
Apache License 2.0
489 stars 157 forks source link

Strange <Buffer 0a> issue with phonegap-cli commands #603

Closed Muffinman closed 7 years ago

Muffinman commented 7 years ago

Hi,

I've got a strange issue with the phonegap-cli where any command I use ends up with loads of <Buffer ... message being printed to my screen, and then it exits with no debug message at all.

➤ phonegap platform update android --verbose
(node:9925) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
<Buffer 55 70 64 61 74 69 6e 67 20 61 6e 64 72 6f 69 64 20 70 72 6f 6a 65 63 74 2e 2e 2e>
<Buffer 0a>
<Buffer 6c 73 3a 20 6e 6f 20 73 75 63 68 20 66 69 6c 65 20 6f 72 20 64 69 72 65 63 74 6f 72 79 3a 20 2f 55 73 65 72 73 2f 6d 61 74 74 2f 53 69 74 65 73 2f 67 ... >
<Buffer 41 6e 64 72 6f 69 64 20 70 72 6f 6a 65 63 74 20 75 70 64 61 74 65 64 20 77 69 74 68 20 63 6f 72 64 6f 76 61 2d 61 6e 64 72 6f 69 64 40 35 2e 31 2e 31>
<Buffer 0a>
<Buffer 6c 73 3a 20 6e 6f 20 73 75 63 68 20 66 69 6c 65 20 6f 72 20 64 69 72 65 63 74 6f 72 79 3a 20 2f 55 73 65 72 73 2f 6d 61 74 74 2f 53 69 74 65 73 2f 67 ... >
<Buffer 45 72 72 6f 72 3a 20 4e 6f 20 4a 61 76 61 20 66 69 6c 65 73 20 66 6f 75 6e 64 20 77 68 69 63 68 20 65 78 74 65 6e 64 20 43 6f 72 64 6f 76 61 41 63 74 ... >

I've just re-installed node (using Homebrew) & phonegap so I'm pretty sure I'm on the latest version of everything.

➤ node -v
v6.2.1

➤ npm -v
3.9.3

➤ phonegap -v
(node:9975) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
6.2.6

It's worth noting that I previously had node v0.12 installed on this machine, and I upgraded it to v6.2.1 using Homebrew.

Muffinman commented 7 years ago

It's also worth noting that very simple commands like phonegap help actually work without any issues or strange terminal output.

EDIT: Ok so actually on further inspection the buffer code I am seeing is actually the normal console output... but in hex format?

Is this an error in my setup or something internal to node / npm / phonegap? I'm not really familiar with the node internals, so not sure where the issue lies.

surajpindoria commented 7 years ago

Hey @Muffinman,

Thanks for bringing this to our attention! I will begin to look into this. Just to check, when you installed phonegap did you uninstall first, npm uninstall -g phonegap? If not can you try this and then reinstall, npm install -g phonegap.

Muffinman commented 7 years ago

No I didn't initially uninstall first, but I've since tried that and I still get the same problem.

pdebruic commented 7 years ago

I'm running into this too. I've uninstalled and reinstalled.

phonegap platform

outputs

<Buffer 49 6e 73 74 61 6c 6c 65 64 20 70 6c 61 74 66 6f 72 6d 73 3a 0a 20 20 61 6e 64 72 6f 69 64 20 34 2e 31 2e 31 0a 20 20 62 72 6f 77 73 65 72 20 34 2e 31 ... >
<Buffer 0a>
surajpindoria commented 7 years ago

Hi @pdebruic,

Are you using Mac / Windows? Also what version of PhoneGap do you have installed?

pdebruic commented 7 years ago

It was happening on mac. I 'fixed' it by wiping out node & npm and reinstalling everything. I had node (v6.?) installed with homebrew. After deleting everything I installed node 4.4.5 from the nodejs.org site and npm from the npmjs.com site and things started working. I've no idea why they stopped working in the first place.

I'm not sure whether it was a phonegap issue or not. Its just the only node package that had the problem that I noticed.

nicodeslandes commented 7 years ago

I have the same issue on Windows with node 6.2.1 and PhoneGap 6.2.7.

robertbenjamin commented 7 years ago

Getting the same issue on OS X 10.11.5, Node 6.2.2 and PhoneGap 6.2.8.

Tried reinstalling PhoneGap to no avail.

memeweb commented 7 years ago

Same issue on OSX 10.9.5, Phonegap 6.2.9, Node 6.2.1 (npm 3.9.3). It was working with older phonegap versions (two years old?) until I just uninstall/reinstalled everything fresh (using brew and npm -g -> Node, npm , Cordova, Phonegap). Cordova command line works. Latest phonegap GUI tool works. Phonegap "help" works, but everything else spills buffer contents.

surajpindoria commented 7 years ago

The fix for this was released in phonegap@6.3.0. Closing this.