question

Onrail avatar image
Onrail asked

failed to Structure an HTTP/2 Request for AVS , Error Domain=NSPOSIXErrorDomain Code=100 "Protocol error"

The voice interaction suddenly failed. The app still works normally a month ago.


error :

Error Domain=NSPOSIXErrorDomain Code=100 "Protocol error" UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <7F75641E-CDA8-4EA6-91FD-F383D5289331>.<22>, _kCFStreamErrorDomainKey=1, NSErrorPeerAddressKey=<CFData 0x28372a350 [0x238129430]>{length = 16, capacity = 16, bytes = 0x100201bb345ee57a0000000000000000}, _kCFStreamErrorCodeKey=100, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalUploadTask <7F75641E-CDA8-4EA6-91FD-F383D5289331>.<22>"
)}


request:


<NSMutableURLRequest: 0x2816138c0> { URL: https://avs-alexa-na.amazon.com/v20160207/events }

request.allHTTPHeaderFields:

{
    ":method" = POST;
    ":path" = "/v20160207/events";
    ":scheme" = https;
    Authorization = "Bearer Atza|IwEBIFXm1zeJaNK-381qGqyEc76xChvjF-xZx_UhARwZDXzIEDvTdqP6qoJtv50renSGQ0stE9sUissnu1v6woO-k9QKhQU1cMh8k7fHvKJ907WGccQxjxYIhBQMGLRVNUX28WAfH7oee7M2N5msUDmPD81fhyvv0ebecxJHSYMtJrXbmESidYYjxI6rhF9-c_65578rzDS7pOoUknwEnKj-rvPVLsUdCUAoVpYV13_t6n9KV_lLvgQ4t8-ksmD_CfzDyOnr1xDpiqw9WwwwLD9jW5bXmL2vj9Gy8h9RsTkzITBGqLQx1dRiat8UdtPT9xayfBO5Ciarz-WUe1L-F8Q2BJynJKiqoXP56rauBL5xBuCWMf530umHGSCxJFHYtVy__j0QC4m0pyzA7f7yJOYF37xBqe04f-EpXoGFi1kuzMO-ng";
    "Content-Type" = "multipart/form-data; boundary=CUSTOM_BOUNDARY_TERM";
}
alexa voice servicealexaiosomg yes
10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

sungyoo avatar image
sungyoo answered

Hey @Onrail, please take a look in our tech doc for structuring HTTP2 request just in case there are no malformed fields in the request. You can also try dumping the whole request to do sanity checking.

https://developer.amazon.com/docs/alexa-voice-service/structure-http2-request.html


I would also recommend trying Postman to do some test pings as well!

https://www.getpostman.com/

10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.