I have exactly the same error as OP when running ionic cordova run android:
Package name: com.SORRYYOUMAYNOTSEEWHATIAMWORKING.ON
LAUNCH SUCCESS
[ERROR] An error occurred while running subprocess cordova.
cordova run android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
net.js:701
throw new TypeError(
^
TypeError: Invalid data, chunk must be a string or buffer, not object
at WriteStream.Socket.write (net.js:701:11)
at process.<anonymous> (C:\Users\XXXXX\AppData\Roaming\npm\node_modules\ionic\bin\ionic:9:63)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emitPendingUnhandledRejections (internal/process/promises.js:94:22)
at process._tickCallback (internal/process/next_tick.js:189:7)
Hmmm… Ok, never mind… The problem solved itself after I removed and re-installed 3 plugins in my environment. I had updated those prior to the error appearing, and now it’s fixed.
This doesn’t seem to be the real solution. I have cordova globally installed, removed platform and all plugins on my current project.
D:\ftproApp>ionic cordova platform list
cordova platform ls
Installed platforms:
Available platforms:
android ~7.0.0
browser ~5.0.1
ios ~4.5.4
osx ~4.0.1
windows ~5.0.0
www ^3.12.0
net.js:701
throw new TypeError(
^
TypeError: Invalid data, chunk must be a string or buffer, not object
at WriteStream.Socket.write (net.js:701:11)
at process. (C:\Users\evalega\AppData\Roaming\npm\node_modules\ionic\bin\ionic:9:63)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emitPendingUnhandledRejections (internal/process/promises.js:94:22)
at process._tickCallback (internal/process/next_tick.js:189:7)
D:\ftproApp>ionic info
√ Gathering environment info - done!