Build an open future with us.

Invest in Mycroft and become a community partner.

Unable to pair, internet issue?


#1

In messing around with Mycroft, I broke something, I am not sure, so I decided to just reinstall. And now it will not pair. The issue could be that I moved since my last install, but I am not sure. Maybe firewall problems?

I am running linux mint 18.3 on a dell latitude.

In the cli debug mode, I get this:
18:06:46.080 - main:handle_record_begin:35 - INFO - Begin Recording…
18:06:47.938 - AlarmSkill - INFO - on ended…
18:06:47.936 - main:handle_record_end:40 - INFO - End Recording…
18:06:47.938 - main:handle_wakeword:56 - INFO - Wakeword Detected: hey mycroft
18:06:48.438 - mycroft.client.speech.listener:transcribe:173 - WARNING - Access Denied at mycroft.ai
18:06:48.439 - main:handle_utterance:61 - INFO - Utterance: [‘pair my device’]
18:07:31.855 - ConfigurationSkill - WARNING - Impossible to update configuration because device isn’t paired

It can’t even tell me the time.

Back in the terminal

8:06:19.225 - mycroft.identity:_load:44 - DEBUG - Loading identity
18:06:19.258 - mycroft.identity:_load:44 - DEBUG - Loading identity
18:06:19.279 - mycroft.api:refresh_token:79 - DEBUG - Refreshing token
18:06:19.948 - mycroft.api:refresh_token:94 - DEBUG - Refresh is already in progress, waiting until done
18:06:21.177 - mycroft.api:refresh_token:98 - DEBUG - new credentials loaded
18:06:21.180 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
18:06:21.417 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device/ce1f90af-XXXXXXXXXXXXXXXcensored HTTP/1.1" 401 38
18:06:21.439 - mycroft.api:refresh_token:79 - DEBUG - Refreshing token
18:06:21.441 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai:443
18:06:21.671 - urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/auth/token HTTP/1.1" 401 38
18:06:21.690 - mycroft.configuration.config:load_local:109 - DEBUG - Configuration /var/tmp/mycroft_web_cache.json loaded
18:06:21.713 - mycroft.configuration.config:load_local:114 - DEBUG - Configuration '/etc/mycroft/mycroft.conf' not found
18:06:21.729 - mycroft.configuration.config:load_local:109 - DEBUG - Configuration /home/doctor/.mycroft/mycroft.conf loaded


Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/doctor/mycroft-core/mycroft/client/text/__main__.py", line 61, in <module>
    main()
  File "/home/doctor/mycroft-core/mycroft/client/text/__main__.py", line 55, in main
    curses.wrapper(gui_main)
  File "/usr/lib/python3.5/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/doctor/mycroft-core/mycroft/client/text/text_client.py", line 1075, in gui_main
    set_screen_dirty()
KeyboardInterrupt
user@Komputer $

On an attempt to connect using other means:

user@Komputer ~/mycroft-core $ nslookup https://api.mycroft.ai
Server:		fe80::f6f5:e8ff:fe14:6730%3
Address:	fe80::f6f5:e8ff:fe14:6730%3#53

** server can't find https://api.mycroft.ai: NXDOMAIN

user@Komputer ~/mycroft-core $ telnet https://api.mycroft.ai 443
telnet: could not resolve https://api.mycroft.ai/443: Name or service not known

This is all mycroft ever says:

Connection to mycroft dot a.i, failed, pairing code could not be fetched. Check   skills.log, other                                                                
    your internet connection and try again. 

Any ideas?


#2

I am able to connect to api.mycroft.ai in a browser from different locations (aws/gcp/local internet).
Your nslookup and telnet command might need to drop the “https://” bit from those.

Have you used the cli to try and pair the device?


#3

This is the second report I’ve had today of pairing not working; the other person who reported this is now back up and running OK; is this still an issue?

I suspect we’ve had a transient failure of api.mycroft.ai that has since righted itself.


#4

Unfortunately I am still not able to pair.

Launching the debug, even if I say something, it comes out as “pair my device” which is good and default. But typing or saying pair my device returns the same result.

08:28:13.951 - __main__:handle_wakeword:56 - INFO - Wakeword Detected: hey mycroft
08:28:14.453 - mycroft.client.speech.listener:transcribe:173 - WARNING - Access Denied at mycroft.ai
08:28:14.454 - __main__:handle_utterance:61 - INFO - Utterance: ['pair my device']
08:28:34.378 - __main__:handle_record_begin:35 - INFO - Begin Recording...
08:28:34.380 - AlarmSkill - INFO - on started...
08:28:36.863 - __main__:handle_record_end:40 - INFO - End Recording...

Along with the same “Connection to mycroft dot a.i, failed…” message that plays.

@baconator attempting to use my browser (firefox, as updated as mint tells me it is) either typing it straight in or clicking on the link gets me a white buffer with just

The requested resource could not be found.

When I try to see the page source, it returns the exact same thing.

Dropping the https:// part from nslookup and telnet seems to do part of the trick

user@Komputer ~/mycroft-core $ nslookup api.mycroft.ai
Server:		fe80::f6f5:e8ff:fe14:6730%3
Address:	fe80::f6f5:e8ff:fe14:6730%3#53

Non-authoritative answer:
Name:	api.mycroft.ai
Address: 192.241.186.250

I wasn’t sure what to put in the telnet, so I tried that long UUID-looking thing and got this

user@Komputer ~/mycroft-core $ telnet api.mycroft.ai 443
Trying 192.241.186.250...
Connected to api.mycroft.ai.
Escape character is '^]'.
GET /v1/device/ce1f90af-XXXXXXXXXXXXXXXXcensored HTTP/1.1
Connection closed by foreign host.

It wouldn’t let me hit enter twice, just the once before closing the connection.

I think the problem may be on my side, but I don’t know enough to know what that would be. I just know enough to get myself in trouble. :roll_eyes:


#5

If it makes any difference, i used git from the master branch at a depth of 1.


#6

Did you run ./dev_setup.sh? If not, run this file. If so, try running that file again, just to make sure that all your dependencies are updated.


#7

@KathyReid Yes I have. I get a bunch of “already newest version” some complaining that I could be using pip 18.1 (happened every time even with the old install), and lots of “Requirement already satisfied.” Then it says “Building with 4 cores” and “Skipping mimic build.”

Here’s what I know:

Well, Mycroft can sing, tell me the time, set a timer, tell me my ip address, but not tell me what the weather is going to be like or who Spock is. Mycroft will gladly start in on the news, gleefully tell me eight hobbits are a hobbyte, knows when it was “born”, but not flip a coin (not installed at all) or tell me its Social Security number :wink: . I have to rely on my own brain to tell me how many teaspoons are in a tablespoon. But all this has to be typed in, any voice input just comes out as “pair my device.”

I know the text-to-speech part is working, it is even using the “slt” voice as it is configured to do.

Do I need to punch holes in my firewall or check with my Internet Provider? As demonstrated, I can (kinda) telnet to it, and nslookup gets it. I can even ping it with a 90-odd ms response time.


#8

Hey @DutchFoxtrotZulu, just reading through the history of this one;

  • The Speech to Text (STT) component is failing because you need to be paired with api.mycroft.ai in order for the default STT to work. So it’s a cascade failure. We need to figure out why you can’t get paired.

  • In one of the logs above, Mycroft is attempting to refresh token, which suggests that at some point, the installation was paired, but has lost the pairing. The pairing is done using JWT tokens.

Do you have an identity2.json file? On a linux install this is usually installed at
$HOME/.mycroft/identity/identity2.json

kathyreid@kathyreid-Oryx-Pro:~/.mycroft/identity$ ls
identity2.json

One of the tricks we have to get Mycroft to repair is to move this file to another file using
mv identity2.json identity2.BAK
then restart the mycroft-cli-client.

kathyreid@kathyreid-Oryx-Pro:~/.mycroft/identity$ mv identity2.json identity2.BAK
kathyreid@kathyreid-Oryx-Pro:~/.mycroft/identity$ ls -las
total 12
4 drwxr-xr-x 2 kathyreid kathyreid 4096 Nov 11 18:00 .
4 drwxr-xr-x 6 kathyreid kathyreid 4096 Oct 26 04:48 ..
4 -rw-r--r-- 1 kathyreid kathyreid  283 Nov  9 22:33 identity2.BAK

Can you try this and see how you go?


#9

Whoohoo! Thanks @KathyReid, that did the trick! I am now paired!

Now that I think about it, since my last install, I did not delete or do anything with the ~/.mycroft folder at all. Thank you!


#10

Fantastic! Thanks for confirming. This sometimes happens - the JWT tokens can get out of sync. It more frequently happens when a unit is powered down for some length of time or if there is a power outage or a network outage.