Solved [ERR_STREAM_WRITE_AFTER_END]
-
HI! i install this module and dont understand what is the problem. when detectror is closed write this:
[GA:AS] CONVERSATION:TRANSCRIPTION { transcription: ‘what’, done: false }
[17.02.2022 11:30.28.982] [LOG] [GA:AS] CONVERSATION:TRANSCRIPTION { transcription: ‘what time’, done: false }
[17.02.2022 11:30.28.992] [LOG] [GA:AS] CONVERSATION:TRANSCRIPTION { transcription: ‘what time is’, done: false }
[17.02.2022 11:30.29.145] [LOG] [GA:AS] CONVERSATION:TRANSCRIPTION { transcription: ‘what time is it’, done: true }
[17.02.2022 11:30.29.836] [LOG] [GA:AS] CONVERSATION:SCREEN object
[17.02.2022 11:30.29.845] [LOG] [GA:AS] CONVERSATION:ACTION { requestId: ‘620e61e9-0000-2515-80bd-883d24f6f858’ }
[17.02.2022 11:30.29.852] [LOG] [GA:AS] CONVERSATION:RESPONSE
[17.02.2022 11:30.29.861] [LOG] [GA:AS] CONVERSATION:AUDIO 1600
[17.02.2022 11:30.29.865] [LOG] [GA:AS] CONVERSATION:AUDIO 1600
[17.02.2022 11:30.29.869] [LOG] [GA:AS] CONVERSATION:AUDIO 1600
[17.02.2022 11:30.29.873] [LOG] [GA:AS] CONVERSATION:AUDIO 1536
[17.02.2022 11:30.29.880] [LOG] [GA:AS] CONVERSATION_ALL_RESPONSES_RECEIVED
[17.02.2022 11:30.29.880] [LOG] [GA:AS] CONVERSATION_END:COMPLETED
[17.02.2022 11:30.29.881] [LOG] [GA:AS] CONVERSATION_PP:RESPONSE_AUDIO_PROCESSED
[17.02.2022 11:30.29.883] [LOG] [MP3] MP3 FILE CREATED 6336 bytes
[17.02.2022 11:30.29.940] [LOG] [MP3] Try to close but MP3 not created !
[17.02.2022 11:30.29.942] [LOG] [GA:AS] CONVERSATION_ERROR: Error [ERR_STREAM_WRITE_AFTER_END]: write after end
[17.02.2022 11:30.29.945] [LOG] [GA:SP] CONVERSATION:SCREENOUTPUT_CREATED
[17.02.2022 11:30.29.947] [LOG] [GA] ASSISTANT_RESULT {
error: {
error: ‘CONVERSATION_ERROR’,
message: ‘Error [ERR_STREAM_WRITE_AFTER_END]: write after end’,
audio: false
},
action: { requestId: ‘620e61e9-0000-2515-80bd-883d24f6f858’ },
text: null,
screen: {
text: ‘.show_text_container{width:100%;padding:41px 0px 41px 112px;box-sizing:border-box}.show_text_content{font-size:1em;line-height:1.4em;width:24.7em;white-space:pre-wrap;color:#ffffff}#scroll-up{background-image:url(“https://www.gstatic.com/actions/devices_platform/expand-less.png”);background-size:48px 48px;color:#FFFFFF;height:48px;width:48px;margin-bottom:24px;display:none}#scroll-up:focus{background-color:#8e4e76}#scroll-down{background-image:url(“https://www.gstatic.com/actions/devices_platform/expand-more.png”);background-size:48px 48px;color:#FFFFFF;height:48px;width:48px;display:none}#scroll-down:focus{background-color:#8e4e76}.scroll-bar{left:32px;position:absolute;display:flex;flex-direction:column;margin-top:48px}.scroll_active{background-color:#424242}.scroll_inactive{opacity:0.3}\n’ +
‘.U050If{margin:24px 0}\n’ +
‘:focus{outline:none}\n’ +
“/* cyrillic / @font-face { font-family: ‘Google Sans’; font-style: normal; font-weight: 400; src: local(‘Google Sans Regular’), local(‘GoogleSans-Regular’), url(https://fonts.gstatic.com/s/googlesans/v11/4UaGrENHsxJlGDuGo1OIlL3Kwp5MKg.woff2) format(‘woff2’); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } / greek / @font-face { font-family: ‘Google Sans’; font-style: normal; font-weight: 400; src: local(‘Google Sans Regular’), local(‘GoogleSans-Regular’), url(https://fonts.gstatic.com/s/googlesans/v11/4UaGrENHsxJlGDuGo1OIlL3Nwp5MKg.woff2) format(‘woff2’); unicode-range: U+0370-03FF; } / vietnamese / @font-face { font-family: ‘Google Sans’; font-style: normal; font-weight: 400; src: local(‘Google Sans Regular’), local(‘GoogleSans-Regular’), url(https://fonts.gstatic.com/s/googlesans/v11/4UaGrENHsxJlGDuGo1OIlL3Bwp5MKg.woff2) format(‘woff2’); unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB; } / latin-ext / @font-face { font-family: ‘Google Sans’; font-style: normal; font-weight: 400; src: local(‘Google Sans Regular’), local(‘GoogleSans-Regular’), url(https://fonts.gstatic.com/s/googlesans/v11/4UaGrENHsxJlGDuGo1OIlL3Awp5MKg.woff2) format(‘woff2’); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } / latin / @font-face { font-family: ‘Google Sans’; font-style: normal; font-weight: 400; src: local(‘Google Sans Regular’), local(‘GoogleSans-Regular’), url(https://fonts.gstatic.com/s/googlesans/v11/4UaGrENHsxJlGDuGo1OIlL3Owp4.woff2) format(‘woff2’); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } / cyrillic / @font-face { font-family: ‘Google Sans’; font-style: normal; font-weight: 500; src: local(‘Google Sans Medium’), local(‘GoogleSans-Medium’), url(https://fonts.gstatic.com/s/googlesans/v11/4UabrENHsxJlGDuGo1OIlLU94Yt3CwZ-Pw.woff2) format(‘woff2’); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } / greek / @font-face { font-family: ‘Google Sans’; font-style: normal; font-weight: 500; src: local(‘Google Sans Medium’), local(‘GoogleSans-Medium’), url(https://fonts.gstatic.com/s/googlesans/v11/4UabrENHsxJlGDuGo1OIlLU94YtwCwZ-Pw.woff2) format(‘woff2’); unicode-range: U+0370-03FF; } / vietnamese / @font-face { font-family: ‘Google Sans’; font-style: normal; font-weight: 500; src: local(‘Google Sans Medium’), local(‘GoogleSans-Medium’), url(https://fonts.gstatic.com/s/googlesans/v11/4UabrENHsxJlGDuGo1OIlLU94Yt8CwZ-Pw.woff2) format(‘woff2’); unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB; } / latin-ext / @font-face { font-family: ‘Google Sans’; font-style: normal; font-weight: 500; src: local(‘Google Sans Medium’), local(‘GoogleSans-Medium’), url(https://fonts.gstatic.com/s/googlesans/v11/4UabrENHsxJlGDuGo1OIlLU94Yt9CwZ-Pw.woff2) format(‘woff2’); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } / latin */ @font-face { font-family: ‘Google Sans’; font-style: normal; font-weight: 500; src: local(‘Google Sans Medium’), local(‘GoogleSans-Medium’), url(https://fonts.gstatic.com/s/googlesans/v11/4UabrENHsxJlGDuGo1OIlLU94YtzCwY.woff2) format(‘woff2’); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }\n” +
‘.hk5Wqb{padding:32px 112px}\n’ +
‘.rUSMDc{margin:40px 0}\n’ +
‘.BNeawe{white-space:pre-line;word-wrap:break-word}\n’ +
‘.s3v9rd{font-size:28px;line-height:40px}\n’ +
‘.s3v9rd.HrGdeb{color:#fff}\n’ +
‘.s3v9rd.AP7Wnd{color:#202124}\n’ +
‘.xUrNXd.VyZZLb{color:rgba(255,255,255,.70)}\n’ +
‘.xUrNXd.UMOHqf{color:#70757a}\n’ +
‘.tAd8D{font-size:28px;line-height:40px}\n’ +
‘.tAd8D.HrGdeb{color:rgba(255,255,255,.70)}\n’ +
‘.tAd8D.AP7Wnd{color:#70757a}\n’ +
‘.Ey4n2{padding-bottom:24px}\n’ +
‘.iBp4i{font-size:48px;line-height:64px;font-weight:500}\n’ +
‘.iBp4i.HrGdeb{color:#fff}\n’ +
‘.iBp4i.AP7Wnd{color:#202124}\n’ +
‘London, UK / Local Time\n’ +
‘10:30\n’ +
‘Thursday, 17 February 2022\n’ +
‘Time in London, UK’,
links: [],
photos: [],
path: ‘/home/pi/MagicMirror/modules/MMM-GoogleAssistant/tmp/responseOutput.html’,
uri: ‘tmp/responseOutput.html’
},
audio: {
path: ‘/home/pi/MagicMirror/modules/MMM-GoogleAssistant/tmp/lastResponse.mp3’,
uri: ‘tmp/lastResponse.mp3’
},
transcription: { transcription: ‘what time is it’, done: true },
continue: false,
volume: null,
lastQuery: {
type: ‘MIC’,
key: null,
lang: ‘en-US’,
useResponseOutput: true,
useAudioOutput: true,
status: ‘standby’,
chime: true
}
}
[17.02.2022 11:30.30.081] [LOG] [DETECTOR] Starts listening. 1 Models
[17.02.2022 11:30.39.237] [LOG] Shutting down server…I am listening lastResponse.mp3 and the assistant speak.
-
I have the case one time yesterday.
Don’t know why actually.
I will inspect… If I can reproduce each time
It’s not the case… Maybe I have not configured properly my pinhole server -
{
module: “MMM-Detector”,
position: “top_left”,
configDeepMerge: true,
config: {
debug: false,
detectors: [
{
detector: “Snowboy”,
Model: “alexa”,
Sensitivity: null,
Logo: “alexa”,
autoRestart: false,
onDetected: {
notification: “GA_ACTIVATE”
}
},
]
}
},
{
module: “MMM-GoogleAssistant”,
position: “top_left”,
configDeepMerge: true,
config: {
debug: true,
assistantConfig: {
lang: “en-US”,
latitude: 51.508530,
longitude: -0.076132,
},
responseConfig: {
useFullscreen: true,
useResponseOutput: true,
responseOutputCSS: “response_output.css”,
screenOutputTimer: 5000,
activateDelay: 250,
useAudioOutput: true,
useChime: true,
confirmationChime: true,
useInformations: true
},
Extented: {
useEXT: true,
deviceName: “MagicMirror”,
stopCommand: “stop”,
youtube: {
useYoutube: true,
youtubeCommand: “youtube”,
displayResponse: true,
useVLC: true,
minVolume: 30,
maxVolume: 100
},
links: {
useLinks: true,
displayDelay: 60 * 1000,
scrollActivate: false,
scrollStep: 25,
scrollInterval: 1000,
scrollStart: 5000
},
photos: {
usePhotos: false,
},
welcome: {
useWelcome: false,
},
cast: {
useCast: false,
},
spotify: {
useSpotify: false,
},
recipes: [],
NPMCheck: {}
}
},
}, -
This is my config, i use node 16.14.0 and npm 6.14.15. this error alway for me not sometimes… i search this error and read anything node error: https://stackoverflow.com/questions/60714212/error-err-stream-write-after-end-write-after-end <-- i find this
help me i pls i love this module
-
Why node v16?
-
I test it but this problem simular node 14 or 16. Before i use node 14
-
now i will reinstall node 14. test it again
-
the issue is resolved!
My install method was wrong. Test again and again.
My wrong install: Rasp OS -> Magic Mirror auto script after downgrade node and npm. (ERR_STREAM_WRITE_AFTER_END]) (dont enough rebuild the modules —> use "npm install in MagicMirror and the module is work good.
After resolved goog install Rasp OS -> Node 14 --> npm (your version) --> magic mirror manuals install (If use this the modules is ok) -
perfect so
It’s write on this wiki page.
You have apply the rule and works -
bugsounet