rokucommunity / roku-deploy

An npm module for zipping and deploying to Roku devices.
MIT License
41 stars 17 forks source link

Retry the convertToSquahsfs request given the HPE_INVALID_CONSTANT error #145

Closed Christian-Holbrook closed 7 months ago

Christian-Holbrook commented 7 months ago

We occasionally see the convertToSquashfs request fail. It seems determined by the size of the zip and the length of the file name. The Roku responds with half of the response body and roku-deploy cannot handle the bad data.

The squashfs conversion looks like it successfully created, the error is in the response.

The work around is to make a second request to squashfs when we see the 'HPE_INVALID_CONSTANT' error. If that response includes 'fileType': 'squashfs' then we return the result saying it succeeded.