Skip to content

Fails to Download and Unzip Some Extensions #13

@relaxaback

Description

@relaxaback

ExtAnalysis will sometimes fail when attempting to download and unzip an extension. It seems that the dl_url it generates does not actually lead to a downloadable .crx file.

Steps to Reproduce

  1. Enter https://chrome.google.com/webstore/detail/screencastify-screen-vide/mmeijimgabbpbgpdklnllpncmdofkcpn as the chrome webstore url
  2. Click DOWNLOAD & ANALYZE

Logs

[i] Downloader says: save_path is <path>/ExtAnalysis/lab/screencastify.crx
Download URL: https://clients2.google.com/service/update2/crx?response=redirect&x=id%3Dmmeijimgabbpbgpdklnllpncmdofkcpn%26uc&prodversion=32
[+] Extension downloaded successfully: <path>/ExtAnalysis/lab/screencastify.crx
[i] analyze func: screencastify.crx
[i] Trying to unzip <path>/ExtAnalysis/lab/screencastify.crx to <path>/ExtAnalysis/lab/screencastify
ERROR:root:Traceback (most recent call last):
  File "<path>/ExtAnalysis/core/analyze.py", line 122, in analyze
    zip_contents = zipfile.ZipFile(ext_path, 'r')
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/zipfile.py", line 1267, in __init__
    self._RealGetContents()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/zipfile.py", line 1334, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

[!] Something went wrong while unzipping extension
Error: File is not a zip file
$ file screencastify.crx
screencastify.crx: empty

Metadata

Metadata

Assignees

Labels

FixedbugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions