Posts: 5
Joined: May 2018
Reputation:
0
I'm attempting to self-host in a container on opensuse Leap 42.3.
I've deployed the Kanzi skill, changed the endpoint to use a self-signed certificate and uploaded the certificate but Alexa responds:
"There was a problem with the requested skill response" (it was a 500 server error). The relevant logs are:
[client 54.240.197.98:9476] [2018-05-04 18:16:37,796] ERROR in app: Exception on / [POST]
[client 54.240.197.98:9476] Traceback (most recent call last):
[client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
[client 54.240.197.98:9476] response = self.full_dispatch_request()
[client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
[client 54.240.197.98:9476] rv = self.handle_user_exception(e)
[client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
[client 54.240.197.98:9476] reraise(exc_type, exc_value, tb)
[client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
[client 54.240.197.98:9476] rv = self.dispatch_request()
[client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
[client 54.240.197.98:9476] return self.view_functions[rule.endpoint](**req.view_args)
[client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask_ask/core.py", line 728, in _flask_view_func
[client 54.240.197.98:9476] ask_payload = self._alexa_request(verify=self.ask_verify_requests)
[client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask_ask/core.py", line 662, in _alexa_request
[client 54.240.197.98:9476] cert = verifier.load_certificate(cert_url)
[client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask_ask/verifier.py", line 21, in load_certificate
[client 54.240.197.98:9476] if not _valid_certificate(cert):
[client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/flask_ask/verifier.py", line 63, in _valid_certificate
[client 54.240.197.98:9476] value = str(extension)
[client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 779, in __str__
[client 54.240.197.98:9476] return self._subjectAltNameString()
[client 54.240.197.98:9476] File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 740, in _subjectAltNameString
[client 54.240.197.98:9476] method = _lib.X509V3_EXT_get(self._extension)
[client 54.240.197.98:9476] AttributeError: 'module' object has no attribute 'X509V3_EXT_get'
I've also done an strace on the apache processes and that reveals that it fails when it can not find /var/lib/ca-certificates/openssl/8ad296c9.0 which should be a Certificate Authority file but doesn't exist. This isn't associated with my self generated cert or the one deployed at certifi/cacert.pem since they have different issuer/subject hashes.
Any ideas?
NOTE for area2051 you can not specify a custom port for the endpoint, it has to use the default https port (443)
pip list
aniso8601 (1.2.0)
asn1crypto (0.24.0)
boto3 (1.7.12)
botocore (1.10.12)
bottle (0.12.8)
click (6.7)
configparser (3.5.0)
cryptography (2.2.2)
cupshelpers (1.0)
docutils (0.14)
Flask (0.12.1)
Flask-Ask (0.9.8)
fuzzywuzzy (0.16.0)
gunicorn (19.8.1)
idna (2.6)
itsdangerous (0.24)
Jinja2 (2.10)
jmespath (0.9.3)
Kodi-Voice (1.1.2)
MarkupSafe (1.0)
num2words (0.5.6)
pip (7.1.2)
py (1.4.31)
pyasn1 (0.1.9)
pycups (1.9.72)
pycurl (7.19.5.1)
pygobject (3.20.1)
pyocclient (0.4)
pyOpenSSL (17.0.0)
pysmbc (1.0.15.4)
python-dateutil (2.7.2)
pytz (2018.4)
PyYAML (3.12)
requests (2.7.0)
roman (2.0.0)
s3transfer (0.1.13)
setuptools (39.1.0)
simplejson (3.8.2)
six (1.11.0)
Werkzeug (0.14.1)
Posts: 188
Joined: Sep 2011
Reputation:
14
I've seen that error before from cryptography being at a incompatible version. Should be: cryptography==2.1.4 if you are on the latest master branch.
Posts: 5
Joined: May 2018
Reputation:
0
Cheers that sorted it.
When I installed kodi-voice that automatically installed the latest version of cryptography and I didn't spot that the requirement was for a specific version.
Next problem.
I'm talking to kodi and requests such as "Ask Kanzi to open music" or "Play all Music" work, but when I ask it to play something specific I get the "there was a problem with the requested skill response" (500 server error). Here are the relevant logs:
[2018-05-04 23:22:30,891] ERROR in app: Exception on / [POST]
Traceback (most recent call last):
File "/srv/www/htdocs/Kanzi/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/srv/www/htdocs/Kanzi/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/srv/www/htdocs/Kanzi/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/srv/www/htdocs/Kanzi/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/srv/www/htdocs/Kanzi/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/srv/www/htdocs/Kanzi/flask_ask/core.py", line 767, in _flask_view_func
result = self._map_intent_to_view_func(self.request.intent)()
File "/srv/www/htdocs/Kanzi/alexa.py", line 74, in decorated_function
kodi = Kodi(config, context)
File "/srv/www/htdocs/Kanzi/kodi_voice/kodi.py", line 387, in __init__
if not self.scheme or not self.address or not self.port or not self.username or not self.password:
AttributeError: Kodi instance has no attribute 'password'
Any ideas?
Posts: 5
Joined: May 2018
Reputation:
0
Here's some logs from Alexa.
Alexa heard: "ask kodi to play all music" - Party Mode - Starting party play
Alexa heard: "ask kodi to skip" - Playing next item
Alexa heard: "ask kodi to start over" - Starting current item over
Alexa heard: "ask kodi to pause" - Play/Pause
Alexa heard: "ask kodi to go back" - Skill response was marked as failure - The skill responded with 500 HTTP status code
Alexa heard: "ask kodi to stop" - Stopping playback - Playback stopped
Alexa heard: "ask kodi to" - Skill response was marked as failure - The skill responded with 500 HTTP status code
Alexa heard: "ask kodi what's playing" - Skill response was marked as failure - The skill responded with 500 HTTP status code
The "go back" command caused kodi to go back in the menu's rather than the playlist. Is it configured for a specific skin?
Tomorrow I'll snoop the communications between kodi and the host and see if can spot anything obvious.
(Kodi version 17.6., OSMC 2018-04-1, Skin Confluence 3.1.43)
Posts: 65
Joined: Apr 2013
Reputation:
0
where does init-config get downloaded when running:
C:\WINDOWS\system32>lexigram init-config
Posts: 65
Joined: Apr 2013
Reputation:
0
Should I start over and change directory and run non-admin. Or just do it for the config? And continue.
Posts: 188
Joined: Sep 2011
Reputation:
14
I'd just change your directory since you already did admin. It might mess up permissions if you don't.