iOS-Alexa icon indicating copy to clipboard operation
iOS-Alexa copied to clipboard

Parser crashes, when i speak "Whats up" to the Alexa

Open vivekmpios opened this issue 8 years ago • 5 comments

*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[OS_dispatch_data rangeOfData:options:range:]: range {0, 134169} exceeds data length 86317'

Function func parseResponse(data:NSData, boundry:String) -> [PartData] crashes at a point when i use/speak "Whats up" with Alexa.

Something with Range logic i guess.

Thanks

vivekmpios avatar Dec 15 '16 17:12 vivekmpios

I am looking into this issue. But right now you can continue with enabling any skill and try with "tell ". It should work as of now. Of you can ask "what is weather outside"

chintan1891 avatar Dec 16 '16 12:12 chintan1891

i think when you say "Whats up" in the [innerRanges] array, there comes a inner Range( innerRanges[6] at times innerRanges[7]) which exceeds the "innerData" length.

So i can add a patch there to skip (add a break or something) that part in which this exceptions occurs, not sure if there will be some other cases where this might occur.

Parser logic is correct, perhaps i think there is some problem with AVS response, it is not generic.

Rest i ll keep you posted on this, if i figure out a good work around.

ref - https://forums.developer.amazon.com/questions/46880/parsing-alexa-audio-response.html

Thanks

vivekmpios avatar Dec 17 '16 10:12 vivekmpios

Or perhaps reponse Parser need to be more generic to handle all kinds of AVS response.

vivekmpios avatar Dec 19 '16 10:12 vivekmpios

Any update on this ?

vivekmpios avatar Dec 21 '16 19:12 vivekmpios

@vivekmpios I saw your post on the Apple developer forum with Eskimo.

Were you able to get streaming from microphone samples to the API and chunks working? Thank you so much!

nickoli58 avatar Apr 16 '19 06:04 nickoli58