-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading between version using arduino IDE fails on first attempt #377
Comments
HI, The issue is related that starting 2.x version the same tar-name is used for each version: Arduino_Apollo3.tar.gz. Opposite to V1.x where the filename contained a version e.g. v1.2.1.tar.gz. I installed 2.0.4. the tar size is 325,830, then I updated to the latest 2.0.6 and see the bogus size of 683,492. This 683,492 is the size of the 2.0.4 tar (325,830) + the size of 2.0.6 (357,662). As it fails, the size of Arduino_Apollo3.tar.gz shows 683K. So the downloaded 2.0.6 is appended to the original 2.0.4 tar-file. After it fails and trying for a second time it downloads the right size and installs. I then installed 2.0.3 with tar-size 325,9 and update to 2.0.4 which has tar-size 325,83 (smaller!!). Works without problems. Now update to 2.0.5 which has tar-size 348,333(larger). It then failed the first time as it tried with a bogus size of 348,333 + 325,833. I expect this to be an issue in the ArduinoIDE. In FileDownloader.java, there is the function downloadFile(boolean noResume). I suspect that if the tar-file is existing BUT smaller it will try to resume the download and append. I have not tried to debug that further as it would take me too much time. A fast workaround/solution is to use a different tar-filename for each version. Looking at the other files in staging I see they all have a version number in them.. but that said, they are all much smaller. Using the same name helps to save package-staging disc-space. The disadvantage is when switching between 2.x versions the tar-file needs to be downloaded each time. The size of the Sparkfun package is around 350MB. Next to taking a large amount of disk-space, it takes longer to download and long to install. How to reduce? Cores OR as others do, make the Mbed-os source files available to download separately. Keep them on github, but do not include the distribution tar-file. save another 30 to 40MB on the TAR file) One last remark about the size. I use Linux (Ubuntu 20.4). I have unpacked the Arduino_Apollo3.tar.gz from Sparkfun in a folder. I have then created a new Arduino_Apollo3.tar.gz with compress from Ubuntu. The size of Sparkfun is 357MB, the size created locally is 204MB, Unchanged.. same content.. Maybe use a different TAR-Utility. Saves 150MB to download and store.... |
this seems to happen less with smaller package sizes. I am closing this for now due to reduced size. Future releases will likely be smaller. |
When a previous version of the core is installed, upgrading to the latest may fail the first attempt. The first download shows a bogus size (600MB+, but starts at 300MB+) and fails the CRC check.
Retrying immediately will result in a successful install on the next attempt.
Still yet to determine if this is a problem with arduino, our json file, or our file storage.
The text was updated successfully, but these errors were encountered: