Mycroft Community Forum

Pairing (on Arch Linux) [RESOLVED]

Hi guys,
I am trying to set up a MyCroft client on my Arch Linux machine, and so far I am getting Mycroft to listen to my voice input, but MyCroft will not generate a code to authenticate to the home.mycroft.ai website (neither via speech nor in the logs). Which means I get no answers to queries because access is always denied. Mycroft speech does work though, because it’s telling me that it’s updated and ready, and I can hear the sound when it detects the wakeword.

How can I debug this? Is there a way to generate a key via the cli?

This is the output of the cli client:

2017-04-21 16:44:59,344 - mycroft.client.speech.mic - DEBUG - Recording...
2017-04-21 16:44:59,344 - SpeechClient - INFO - Begin Recording...
Wiedergabe: WAVE '/home/stefan/git/mycroft-core/mycroft/res/snd/start_listening.wav' : Signed 16 bit Little Endian, Rate: 44100 Hz, stereo
2017-04-21 16:45:01,688 - SpeechClient - INFO - End Recording...
2017-04-21 16:45:01,689 - mycroft.client.speech.mic - DEBUG - Thinking...
2017-04-21 16:45:01,690 - mycroft.session - INFO - New Session Start: 40f9fb4a-ad72-4ab4-9bab-417a47540cfd
2017-04-21 16:45:01,690 - SpeechClient - INFO - Wakeword Detected: hey mycroft
2017-04-21 16:45:01,703 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
2017-04-21 16:45:02,642 - mycroft.client.speech.mic - DEBUG - Waiting for wake word...
2017-04-21 16:45:02,721 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "POST /v1/stt?lang=en-US&limit=1 HTTP/1.1" 401 38
2017-04-21 16:45:02,727 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
2017-04-21 16:45:03,576 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/auth/token HTTP/1.1" 401 38
2017-04-21 16:45:03,580 - mycroft.client.speech.listener - WARNING - Access Denied at mycroft.ai
2017-04-21 16:45:03,580 - SpeechClient - INFO - Utterance: ['pair my device']

and this is the output of the mycroft-skills.log:

2017-04-21 16:44:59,345 - Skills - DEBUG - {"type": "recognizer_loop:record_begin", "data": {}, "context": null}
2017-04-21 16:45:01,691 - Skills - DEBUG - {"type": "recognizer_loop:record_end", "data": {}, "context": null}
2017-04-21 16:45:01,694 - Skills - DEBUG - {"type": "recognizer_loop:wakeword", "data": {"session": "40f9fb4a-ad72-4ab4-9bab-417a47540cfd", "utterance": "hey mycroft"}, "context": null}
2017-04-21 16:45:03,582 - Skills - DEBUG - {"type": "recognizer_loop:utterance", "data": {"lang": "en-US", "session": "40f9fb4a-ad72-4ab4-9bab-417a47540cfd", "utterances": ["pair my device"]}, "context": null}
2017-04-21 16:45:03,583 - mycroft.skills.intent_service - ERROR - 
Traceback (most recent call last):
  File "/home/stefan/git/mycroft-core/mycroft/skills/intent_service.py", line 54, in handle_utterance
    normalize(utterance, lang), 100))
StopIteration
2017-04-21 16:45:03,584 - Skills - DEBUG - {"type": "intent_failure", "data": {"lang": "en-US", "utterance": "pair my device"}, "context": null}

This log message:

2017-04-21 16:45:03,583 - mycroft.skills.intent_service - ERROR - 
Traceback (most recent call last):
  File "/home/stefan/git/mycroft-core/mycroft/skills/intent_service.py", line 54, in handle_utterance
    normalize(utterance, lang), 100))
StopIteration

is the ugly form of say: there are no any installed skill that understands the phrase “pair my device”.

Can be check in mycroft-skills.log that “skill-pairing” is loaded?

Thanks for the quick reply. It actually says that the directory “skill-pairing” cant be found.

Digging a little deeper, it seems like a lot of the skills were not properly installed. It tries to clone the skill from git, then throws several errors:

error: waitpid for unpack-objects failed: no child processes
fatal: unpack-objects failed
error: waitpid for fetch-pack failed: no child processes

and then it says the directory cant be found. but in the next line it says “skill installed” anyway.

not sure what to make of this.

Hi @Stefan_Bommer,

Could you check if the folder /opt/mycroft/skills exist and your user have permission to write there?

if it doesn’t exist can you run ./scripts/prepare-msm.sh

let me know if it works : )

thank you.

Hi thanks again for the reply.

/opt/mycroft/skills exists and belongs to my user, but the directory is empty. /opt/mycroft belongs to root.

however, running ./scripts/prepare-msm.sh throws the error

chmod: accessing msm/msm not possible: file or directory doesnt exist

Ok, I re-setup mycroft-core today, and this time prepare-msm.sh went through without errors. however, the problem still persists, because while I can read and write to /opt/mycroft/skillls, the directory is empty, and I have the same error as mentioned in the first post.

I am willing to provide more debug information if you can point me to it.

Alright, I think I got a step further.

This time, I tried running msm directly:
./msm install https://github.com/MycroftAI/skill-pairing.git

And it worked. I could then successfully pair my Mycroft.

However, no other skills are installed yet. I will try installing other skills manually and report back.

No idea, why none of the skills installed automatically.

Could you try run ./msm/msm default
we’re having a problem in some environments to run the msm default inside the python.

thank you, I’m sorry the delay to response.

This worked, thanks a lot!

Edit: Also the manual install worked, but it’s way cleaner like this.

I’m having this issue. I don’t know how you reset your’s up, but I’m stuck at

chmod: accessing msm/msm not possible: file or directory doesnt exist

I have no idea what to do now.

Make sure you’re in the right directory when you run the command. you need to be in the top-level git directory (mycroft-core) when you run ./scripts/prepare-msm.sh.

I second @liliburnett on this. There is no msm directory, and prepare-msm.sh doesn’t seems to help

This thread’s older than dirt =P there is indeed no msm directory.

How’d you install?

Yes, and yet here I am, with the same problem haha couldn’t figure it out yet.

I am on Manjaro, installed via cloning the master branch from the git repo. The problem is pretty much how op described:

I am getting Mycroft to listen to my voice input, but MyCroft will not generate a code to authenticate to the home.mycroft.ai website (neither via speech nor in the logs). Which means I get no answers to queries because access is always denied. Mycroft speech does work though, because it’s telling me that it’s updated and ready, and I can hear the sound when it detects the wakeword.

I’ve noticed the skills directory does exist, but is empty. I can provide more info if you need, and thanks in advance for any help!

Well, I’m gratified to hear you used git. There’s an AUR package and a Manjaro package; neither are official, neither are kept current, and both have caused threads like these before =P

Given that speech works, the answer is probably yes, but it’s worth checking: did you run dev_setup.sh after cloning? This should invoke pamac and download a bunch of deps, but I (also on Manjaro) haven’t had to install fresh in well over a year, so I might not notice if something broke in that regard.

Incidentally, try the dev branch (repo default) or let dev_setup pick stable. I think something might be up with the master branch, I’m gonna go ping MycroftAI’s community person about it.