Eclipse Error When Sideloading

Hello,

I am having a problem that I am unable to resolve.

For any package that I am trying to sideload to my Roku device, I am getting the following error:

=================================================================
An error occurred while attempting to install the application:

------->Unzip failed. Invalid or corrupt zip archive. Unloading.

I have done some research, and I see that this may be due to the package being signed. However, prior to the first occurrence of this issue, I was able to use the same package without any issues.

Any help with this is appreciated.

Roku will not load package files as side-loaded applications, only zip files.
The only local use of a pkg file is to rekey the device with the developer key used to sign the package.

Perhaps I did not word my initial post properly.

In the “out” folder in my Brightscript Project on Eclipse, I do have a *.zip file which I am trying to load into the Roku device, not a package file.

This is the error I have after trying to export the *.zip file in eclipse:
Unable to install application to Roku Box at IP Address ‘192.168.0.5’

Reason:
java.io.IOException: Error writing to server
at
sun.net.[www.protocol.http.HttpURLConnection.writeRequests(Unknown](http://www.protocol.http.HttpURLConnection.writeRequests(Unknown) Source)
at
sun.net.[www.protocol.http.HttpURLConnection.writeRequests(Unknown](http://www.protocol.http.HttpURLConnection.writeRequests(Unknown) Source)
at
sun.net.[www.protocol.http.HttpURLConnection.getInputStream0(Unknown](http://www.protocol.http.HttpURLConnection.getInputStream0(Unknown) Source)
at
sun.net.[www.protocol.http.HttpURLConnection.getInputStream(Unknown](http://www.protocol.http.HttpURLConnection.getInputStream(Unknown) Source)
at
java.net.HttpURLConnection.getResponseCode(Unknown Source)
at
com.roku.brightscript.ide.eclipse.core.comms.HTTPClientWithProgress$UrlConnectionRunnable.run(HTTPClientWithProgress.java:441)
at
java.lang.Thread.run(Unknown Source)

This error is followed by this dialog:

Unable to package application on Roku Box at IP Address ‘192.168.0.5’

Reason:
Unexpected response:

And this is the error in the console:

=================================================================

An error occurred while attempting to install the application:

------->Unzip failed. Invalid or corrupt zip archive. Unloading.

Why don’t you try uploading the zip that Eclipse created using the web interface built into the Roku? At least you’d know whether or not it’s really a problem with the zip.

-JT

I see it frequently have have some workarounds, all work:

  • Either go to web interface and erase the current zip/package (everything), close eclipse. Open it and try again. If not, erase and reboot roku
  • Or just go to the web interface and download the package. It’s already created but just a matter of some communication in downloading the package.
  • And sometime I also use JT’s workaround above

For anyone finding this later, like me, I had the same problem. It started after I experienced a power bump that reset my computer.

Solution: I found that the reset erased the selected files on the BrightScript Application Deployment box. Once I checked the right files, all worked again.