Comments (7)
vsix link need to be grabbed with compressed flag
when downloaded from the marketplace
curl --compressed https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ukoloff/vsextensions/win-ca/3.1.0/vspackage
will produce a valid zip
while curl https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ukoloff/vsextensions/win-ca/3.1.0/vspackage
won't
from win-ca.
I can suggest some Ansible-specific debugging techniques that might help in this situation:
-
Use the Ansible Debug Module: The Ansible debug module can be used to print statements during execution. This can be useful for debugging variables or expressions without necessarily halting the playbook. You can add a debug task right after the
get_url
task to print the result of the download task. This can help you understand if the file was downloaded correctly. -
Check the Downloaded File: You can add a task to check if the downloaded file exists and is not empty. This can help confirm whether the
get_url
task is working as expected. -
Try Using a Different Module for Download: If
get_url
continues to have issues, you might want to try using a different module or method to download the file. For example, you could use theuri
module or even acommand
orshell
module to run acurl
orwget
command. Here's how you might modify the playbook:- name: Windows - Download win-ca extension using curl with --compressed command: cmd: "curl --compressed -o /mnt/c/temp/ukoloff.win-ca-3.1.0.vsix https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ukoloff/vsextensions/win-ca/3.1.0/vspackage" when: "'ukoloff.win-ca' not in result.stdout_lines"
This will run the
curl
command with the--compressed
flag to download the VSIX file. If the file is being served compressed, this should result in a valid ZIP file being downloaded. -
Enable Ansible's Retry and Verbose Options: When running the playbook, you can use the
-vvv
option for a verbose output, which might give you more insight into what's happening. If a task fails, Ansible can retry the task if you provide aretries
parameter. -
Check Ansible get_url Module Documentation: Review the official Ansible documentation for the
get_url
module. There might be additional parameters or features that could help in this situation. -
Seek Help from the Ansible Community: If all else fails, consider asking for help on Ansible-related forums or communities. Be sure to provide them with all the details, including the Ansible version, the exact playbook you're running, and the full error message you're seeing.
Remember, the error message indicates that the downloaded VSIX file is not a valid ZIP file. So the issue might be with the file being downloaded, rather than Ansible itself. It's possible that the URL is incorrect, the file at the URL is not a valid VSIX file, or there's an issue with the network connection causing the file to be downloaded incompletely or incorrectly. These are all things you can check and test independently of Ansible.
from win-ca.
@ukoloff / @benoitf / @stevenaw / @addaleax / @mavaddat -- Please kindly take a look and help me on this issue
from win-ca.
@mavsravikiran
Many of the people you have tagged are one-time contributors to the project who may not have worked with it in a while. As an open source project, we also all do this in our spare time, the quantity of which may vary daily or weekly.
I would recommend a bit of patience. I'm sure that those familiar with the issue will reply once they're able
from win-ca.
- I am Facing Issues while installation of
win-ca
for visual studio code and refer url (https://marketplace.visualstudio.com/items?itemName=ukoloff.win-ca&ssr=false#overview) [✂]a [Error]: Corrupt ZIP: end of central directory record signature not found
The issue appears to be that the VSIX file you downloaded is not a valid ZIP file.
I would investigate whether this is true by attempting to open the downloaded VSIX using an archiving application like 7-Zip and check if it has the expected structure.
-
If it does not have that structure, I would try using a different browser or using PowerShell or curl to download the VSIX file. Repeat the steps above to check if the download is valid.
-
If it does have the expected structure, then try reinstalling Visual Studio Code or installing another extension using the same technique. If this does not work, do a fully clean reinstall of VS Code.
- If the issue persists with other extensions, your problem is in how VS Code is functioning — not this extension, per se. In this case, I would seek assistance on StackOverflow rather than on GitHub issues.
from win-ca.
Thanks @benoitf / @mavaddat / @stevenaw 👍 for the quick response
- Actually i am using the marketplace url
https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ukoloff/vsextensions/win-ca/3.1.0/vspackage
for downloading to my local application and try to install the extension - Below is the Sample Code Block which i am using ansible for installation
- name: Windows - Download win-ca extension using url
get_url:
url: "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ukoloff/vsextensions/win-ca/3.1.0/vspackage"
dest: "/mnt/c/temp/ukoloff.win-ca-3.1.0.vsix"
force: false
mode: "0440"
when: "'ukoloff.win-ca' not in result.stdout_lines"
- name: Windows - Install extension in download folder C:\Users\userid\Downloads\ukoloff.win-ca-3.5.1.vsix
command: "{{ powershell_path }} 'code --install-extension C:\\Temp\\ukoloff.win-ca-3.1.0.vsix'"
- Getting the below error message
a [Error]: Corrupt ZIP: end of central directory record signature not found
at E (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\node\cliProcessMain.js:18:13335)
at C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\node\cliProcessMain.js:18:14772
at C:\Program Files\Microsoft VS Code\resources\app\node_modules.asar\yauzl\index.js:37:7
at C:\Program Files\Microsoft VS Code\resources\app\node_modules.asar\yauzl\index.js:187:5
at C:\Program Files\Microsoft VS Code\resources\app\node_modules.asar\yauzl\index.js:631:5
at C:\Program Files\Microsoft VS Code\resources\app\node_modules.asar\fd-slicer\index.js:32:7
at FSReqCallback.wrapper [as oncomplete] (node:fs:686:5) {
type: 'CorruptZip',
cause: Error: end of central directory record signature not found
at C:\Program Files\Microsoft VS Code\resources\app\node_modules.asar\yauzl\index.js:187:14
at C:\Program Files\Microsoft VS Code\resources\app\node_modules.asar\yauzl\index.js:631:5
at C:\Program Files\Microsoft VS Code\resources\app\node_modules.asar\fd-slicer\index.js:32:7
at FSReqCallback.wrapper [as oncomplete] (node:fs:686:5)
}
Failed Installing Extensions: file:///c%3A/Temp/ukoloff.win-ca-3.1.0.vsix
- Need a workaround and help how it can be implemented in my application 👍
from win-ca.
Thanks @mavaddat for the quick response and your solution has helped me, it was worked successfully 💯
from win-ca.
Related Issues (20)
- can this library be used in browser context? HOT 2
- Wrapper for npm
- Unreadable codes in Chinese when use win-ca HOT 6
- can win-ca certify or inject certificates to https from express? HOT 1
- CVE-2020-7720 fix from node-forge HOT 4
- Broken hash for Unicode certificates HOT 1
- License discrepancy HOT 2
- Allow roots.exe's path to be configurable HOT 3
- roots.exe considered as malware by some engines HOT 1
- Issues with VSCode Extension HOT 1
- Extension breaks VSCode https connections when installed on MacOS HOT 4
- Issue with expired certs on Windows
- win-ca dependent library has security vulnerability HOT 4
- [HELP] problem "nssm" when I use "win-ca"
- Intellij extension HOT 2
- Running a test on github actions windows server crashes root.exe with ENOBUFS
- Usage with workers
- Visual Studio compatibility HOT 2
- Could this tool be extended to have a Azure Data Studio extension as well HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from win-ca.