corbindavenport / nexus-tools

Installer for ADB, Fastboot, and other Android tools on Linux, macOS, Chrome OS, and Windows
http://forum.xda-developers.com/general/general/tool-nexus-tools-2-8-featured-xda-t3258661
GNU General Public License v3.0
844 stars 86 forks source link

Error on downloading: "RangeError (length): invalid value" #68

Closed tomwitt2 closed 2 years ago

tomwitt2 commented 2 years ago

While trying to install on ChromeOS (crostini linux), getting this error There was an error downloading Platform Tools: RangeError (length): Invalid value: Not in inclusive range 0..271: 272

First attempt, I copied and pasted the bash install command Second attempt, I download the linux zip file with wget, unzipped, chmod +x nexustools, ./nexustools -i but resulted in the same message.

Edit: I also tried the zip file download (expand zip, set exec priv, ./nexustools -i) with the prior stable version (.52, I think) with the same result. I will do the screenshot tomorrow.

corbindavenport commented 2 years ago

Can you share a full screenshot of the error? I'll try running it on my Chromebook when I get time and see if I get the same result.

tomwitt2 commented 2 years ago

This is the entire transcript for attempting to install on ChromeOS

joeuser@penguin:~/blah$ bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)
[INFO] Nexus Tools 5.4
[ OK ] Created folder at /home/joeuser/.nexustools.
[ OK ] Your hardware platform is supported, yay!
[WARN] Chrome OS 75 or higher is required for USB support.
[....] Downloading Platform Tools package, please wait.
[EROR] There was an error downloading Platform Tools: RangeError (length): Invalid value: Not in inclusive range 0..271: 272

I'm on Chrome OS Version 97.0.4692.91 (Official Build) (64-bit)

corbindavenport commented 2 years ago

It turns out the latest Platform Tools package (r32) can't be uncompressed by Dart's archive library for some reason, but the zip files for the previous release (r31.0.3) work fine. I'm not sure what's going on here yet, especially since the files open fine outside of Nexus Tools. This issue also affects all Linux platforms and maybe Windows/Mac too (the Windows/Mac files fail on my Linux PC).

In the meantime, I'm rolling out a quick fix that will limit Nexus Tools to downloading r31 across all platforms.

corbindavenport commented 2 years ago

Filed a bug with the archive library: https://github.com/brendan-duncan/archive/issues/186

corbindavenport commented 2 years ago

This has been fixed by updating the archive library to v3.2.2, I'm updating the release packages to download the latest version again.

cocoonkid commented 2 years ago

Nice @corbindavenport Readme.md doesn't need the warning at the top anymore.

corbindavenport commented 2 years ago

Oh yep, forgot about that, thanks!