adbkit-logcat icon indicating copy to clipboard operation
adbkit-logcat copied to clipboard

Error when get logcat from huawei P9

Open willysys opened this issue 7 years ago • 10 comments

There is a error when I get logcat from huawei P9. seems adbkit can't handle the corner case with empty entry data,error details as follows:

events.js:160 throw er; // Unhandled 'error' event ^

Error: Unprocessable entry data '' at Binary._processEntry (/usr/lib/nodejs/npm/node_modules/lib/node_modules/stf/node_modules/adbkit-logcat/lib/logcat/parser/binary.js:77:26) at Binary.parse (/usr/lib/nodejs/npm/node_modules/lib/node_modules/stf/node_modules/adbkit-logcat/lib/logcat/parser/binary.js:54:14) at LineTransform. (/usr/lib/nodejs/npm/node_modules/lib/node_modules/stf/node_modules/adbkit-logcat/lib/logcat/reader.js:84:33) at emitOne (events.js:96:13) at LineTransform.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at LineTransform.Readable.push (_stream_readable.js:134:10) at LineTransform.Transform.push (_stream_transform.js:128:32) at LineTransform._transform (/usr/lib/nodejs/npm/node_modules/lib/node_modules/stf/node_modules/adbkit/lib/adb/linetransform.js:39:12) at LineTransform.Transform._read (_stream_transform.js:167:10) at LineTransform.Transform._write (_stream_transform.js:155:12) at doWrite (_stream_writable.js:334:12) at writeOrBuffer (_stream_writable.js:320:5) at LineTransform.Writable.write (_stream_writable.js:247:11) at Socket.ondata (_stream_readable.js:555:20) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at TCP.onread (net.js:548:20)

willysys avatar Dec 06 '17 03:12 willysys

Have you tried turning the fixLineFeeds option off?

sorccu avatar Dec 06 '17 03:12 sorccu

This error occurred during the STF run.

willysys avatar Dec 06 '17 03:12 willysys

Maybe adbkit can't handle the corner case with empty entry data.

willysys avatar Dec 06 '17 03:12 willysys

Ok... well, run adb logcat -B -d > adbkit-logcat-issue-8.log && gzip adbkit-logcat-issue-8.log. Then send the newly created adbkit-logcat-issue-8.log.gz to simo @ {the name of this github org} .io or attach it here. Note that private information may be exposed in the log output. However, without having access to the output I can do nothing.

I will eventually look into the issue but don't expect a fix immediately, I'm super busy.

sorccu avatar Dec 06 '17 03:12 sorccu

@sorccu How do you set the fixLineFeeds option to be false? Getting this error on newer versions of Android and I can't figure out how to disable that feature.

Andychochocho avatar May 29 '19 22:05 Andychochocho

Show me how you've attempted to do it.

sorccu avatar May 31 '19 00:05 sorccu

I've tried looking through the logcat documentation for something to implement like a flag maybe I'm missing, but I can't seem to find anything like how there's the -B for the binary issue.

Andychochocho avatar Jun 01 '19 04:06 Andychochocho

@sorccu Is there a way you recommend going about this, or am I just missing something very obvious here? 😬

Andychochocho avatar Jun 06 '19 01:06 Andychochocho

@willysys Seems the problem starts here, and do you have a solution already? image

histronger avatar Aug 27 '19 07:08 histronger

@sorccu Can you help to have a look? Thanks!

histronger avatar Aug 27 '19 07:08 histronger