jeshab
(Jeremy)
November 2, 2019, 6:08pm
21
If you go at the end of the issue you linked, you can see that all the workarounds that were applied didn’t resolve the root cause and that it seems that the default buffering feature on the cloud connector nginx instance may be the culprit.
opened 04:10PM - 19 Aug 19 UTC
bug
Per the skill logs, several users discovery requests are failing due to the erro… r below
```
error: discover failed with error:items.forEach is not a function
{
"stack": "TypeError: items.forEach is not a function\n at Promise.all.then (/var/task/alexa/v3/discovery.js:45:13)\n at <anonymous>\n at process._tickDomainCallback (internal/process/next_tick.js:228:7)"
}
```
After enabling debug mode, the issue seems to be related to the items data value being a string because the request call seems to only have read/received a partial response preventing the expected JSON object from being parsed properly.
The example based on the reference below isn't that considerably big in size, although it's just partial data, and the Lambda execution time for that request was about 5 seconds.
[Lambda request log reference](https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logEventViewer:group=/aws/lambda/openhab-alexa-v3;stream=2019/08/16/%5B$LATEST%5D64be4d08d373457fa4a1b2468f58d794;refid=34922537345580123117038527377609257753437664721776476160;reftime=1565980734486)
ceedee:
A possible workaround could be to put all Alexa relevant items into a single file, temporarily delete all other item files, have Alexa discover the devices and then then re-integrate the deleted item files.
This is unfortunately the only workaround for your issue.
This is correct. During the discovery process, the full list is required to determine which items are Alexa-enabled.