question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Check downloaded binary file size

See original GitHub issue

When downloading binary, it might be corrupted / intercepted by a proxy. Sometimes even CDN has a hiccup like shown below from a test project run

Instead we will install version: https://cdn.cypress.io/beta/binary/1.0.3/win64/appveyor-develop-7b4c223233ca8eb6e147dc5e89b30a01061f6581-11678682/cypress.zip
Note: there is no guarantee these versions will work properly together.
Installing Cypress (version: https://cdn.cypress.io/beta/binary/1.0.3/win64/appveyor-develop-7b4c223233ca8eb6e147dc5e89b30a01061f6581-11678682/cypress.zip)
[?25l[18:21:09]  Downloading Cypress     [started]
[18:21:16]  Downloading Cypress     [completed]
[18:21:16]  Unzipping Cypress       [started]
[18:22:16]  Unzipping Cypress       [completed]
[18:22:16]  Finishing Installation  [started]
[18:22:16]  Finishing Installation  [completed]
[?25h
You can now open Cypress by running: node_modules\.bin\cypress open
https://on.cypress.io/installing-cypress
[?25h
> node-sass@4.5.3 postinstall C:\projects\cypress-test-example-repos\cypress-example-piechopper\node_modules\node-sass
> node scripts/build.js
Binary found at C:\projects\cypress-test-example-repos\cypress-example-piechopper\node_modules\node-sass\vendor\win32-ia32-57\binding.node
Testing binary
Binary is fine
npm ERR! path C:\projects\cypress-test-example-repos\cypress-example-piechopper\node_modules\fsevents\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall lstat

Need to validate downloaded zip file size. If it < 50 MB something went terribly wrong.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
brian-manncommented, Oct 25, 2017

This is why we should use a checksum / sha like other big files do 😛

You would just verify the integrity of that and boom, done.

0reactions
cypress-bot[bot]commented, Jul 9, 2019

Released in 3.4.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to determine binary file data set size - NI Community
Solved: Hi all I am writing specific sets of array data to a binary file, appending each time so the file grows by...
Read more >
10 ways to analyze binary files on Linux - Opensource.com
Linux provides a rich set of tools that makes analyzing binaries a breeze! ... What it does: Help to determine the file type....
Read more >
Get size of a file before downloading in Python - Stack Overflow
I have reproduced what you are seeing: import urllib, os link = "http://python.org" print "opening url:", link site = urllib.urlopen(link) ...
Read more >
How to calculate the size of binary file? - SAP Community
Hi! I have to download a file in binary mode to presentation server but I need the file size in order to use...
Read more >
BLOB (Binary) file download fails over 95 mb - OutSystems
While executing download logic, different size of files are downloaded everytime like 30 mb, 27 mb, etc.. We haven't used Binary size action...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found