Google Drive REST API – Corrupted ZIP file after upload

I’m using the Google Drive REST API to upload a ZIP file but all my ZIP files become corrupted after the upload. When I download the file and then try to unzip it on my computer, on MacOS it says “Unable to expand ‘FILE_NAME.zip’ into FOLDER. Error 79 – Inappropriate file type or format.”. I made sure it wasn’t just my computer by having another person on a different computer try to unzip it and they had the same problem. I also confirmed that the ZIP file wasn’t becoming corrupted before I uploaded it to Google Drive.

Why await within async function doesn’t work for fs modules?

I am trying to read a sample.json file through my js code. First my program checks for sample.json within every folder in the specified path. And it reads the sample.json if available and fetches the data. But the await used doesn’t work as expected and simply passes the empty object to the calling function before the async functions completes it execution. I have attached the image for the issue.

Async.parallelLimit Function Executing Callback Function Before Tasks

I am attempting to setup some newman test runs in parallel for different environments, and then create a Jira ticket via API request once all are completed with the results. However, when I use the ansync.parallelLimit function for that task, I find that the jira ticket gets created without any of the information from the test runs.