Giter VIP home page Giter VIP logo

Comments (7)

E3V3A avatar E3V3A commented on August 27, 2024

This may be related to #9...

from mmm-assistant.

E3V3A avatar E3V3A commented on August 27, 2024

Not sure if related, but I found this in the error log in the updated version when frozen.

[ASSTNT] Conversation Error: { Error: Service unavailable.
    at ClientDuplexStream._emitStatusIfDone (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/client.js:255:19)
    at ClientDuplexStream._receiveStatus (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/client.js:233:8)
    at /home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/client.js:757:12 code: 14, metadata: Metadata { _internal_repr: {} } }

The code generating the log message is:

        .on('error', (error) => {
          console.log('[ASSTNT] Conversation Error:', error);
          record.stop()
          this.sendSocketNotification('ERROR', 'CONVERSATION')
        })

from mmm-assistant.

E3V3A avatar E3V3A commented on August 27, 2024

Another error that arrived today out-of-the-blue, while using Google.

Error: write after end
    at writeAfterEnd (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/readable-stream/lib/_stream_writable.js:288:12)
    at Speaker.Writable.write (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/readable-stream/lib/_stream_writable.js:332:20)
    at Conversation.conversation.on (/home/pi/MagicMirror/modules/MMM-Assistant/node_helper.js:259:21)
    at emitOne (events.js:96:13)
    at Conversation.emit (events.js:188:7)
    at ClientDuplexStream.Conversation.conversation.on (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/components/conversation.js:118:12)
    at emitOne (events.js:96:13)
    at ClientDuplexStream.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at ClientDuplexStream.Readable.push (_stream_readable.js:134:10)

I have no fcuking idea what this means!
Anyone else seen this?

If this has anything to do with this module, then line 259 is here:

      conversation
        .on('audio-data', (data) => {
          //record.stop()
          const now = new Date().getTime()
          if (mode == 'ASSISTANT') {
            this.sendSocketNotification('MODE', {mode:'ASSISTANT_SPEAKING'})
            speaker.write(data);             //   <<=== ERROR LINE =================== 
            spokenResponseLength += data.length;
            const audioTime = spokenResponseLength / (this.config.assistant.conversation.audio.sampleRateOut * 16 / 8) * 1000;
            clearTimeout(speakerTimer);
            speakerTimer = setTimeout(() => { speaker.end(); }, audioTime - Math.max(0, now - speakerOpenTime));
          } else {

from mmm-assistant.

E3V3A avatar E3V3A commented on August 27, 2024

The original error is coming from Line 133 in alert.js of the default Alert module of MM:

	hide_alert: function(sender) {
		//Dismiss alert and remove from this.alerts
		this.alerts[sender.name].dismiss();  // <<========= LINE  113 !
		this.alerts[sender.name] = null;
		//Remove overlay
		var overlay = document.getElementById("overlay");
		overlay.parentNode.removeChild(overlay);
},

I have filed an issue here.

from mmm-assistant.

E3V3A avatar E3V3A commented on August 27, 2024

note:

  • all modules are receiving and handling SHOW_ALERT and HIDE_ALERT...
  • /var/log/auth.log has some mysterious message:
    systemd-logind[351]: Removed session c30.

EDIT: systemd seem to com from cron...

EDIT2: This comment invalid.

from mmm-assistant.

E3V3A avatar E3V3A commented on August 27, 2024

This was fixed in MM PR: MagicMirrorOrg/MagicMirror#1248

The other issues now seem unrelated to OP. (Open new issue for those if they re-occur.)

from mmm-assistant.

E3V3A avatar E3V3A commented on August 27, 2024

PS. To fix this while MM dev PR is being considered, fix yourself with:

    hide_alert: function(sender) {
        //Dismiss alert and remove from this.alerts
        if (this.alerts[sender.name]) {
            this.alerts[sender.name].dismiss();
            this.alerts[sender.name] = null;
            //Remove overlay
            var overlay = document.getElementById("overlay");
            overlay.parentNode.removeChild(overlay);
        }
    },

from mmm-assistant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.