Closed Jakosaur closed 6 years ago
Hey @Jakosaur,
thanks for submitting this issue. I tried to reproduce what you said, but I was unable to get the error you posted. Can you give me a short code block in which your error appears and which I can try to run to figure out what the problem is ? That would be very nice
I've just been using the example on the GitHub page. I run this when I start up the program, which works fine, but when I try to refresh the manifest it gives the error
traveler.getDestinyManifest().then(result => { traveler.downloadManifest(result.Response.mobileWorldContentPaths.en, './manifest.content').then(filepath => { const manifest = new Manifest(filepath); manifest.queryManifest('SELECT name FROM sqlite_master WHERE type="table"').then(queryResult => { console.log(queryResult); }).catch(err => { console.log(err); }); }).catch(err => { console.log(err); }) })
I assume you are on Windows right ? Which version of the-traveler are you using ?
Yeah Windows. v-0.7.1
I've done a new Node Project from scratch, all I did was the normal npm init
, npm install the-traveler
& npm install sqlite3
Then ran this code
Still throws the error. It seems when the manifest function is called the second time, it deletes the ZIP and then tries to open it?
Thanks for the code snippet. I was able to reproduce the issue on a windows machine.
The idea was to unzip the zip file and if it is unzipped delete it right away, leaving the directory with the unzipped Sqlite3 database. I will investigate what exactly is happening there
I am not sure how fast I can get a solution for this. Feel free to also investigate the issue on your own. I assume it must be somewhere in those lines https://github.com/alexanderwe/the-traveler/blob/master/src/Traveler.ts#L1084-L1094. It seems I try to open the .zip but is not there.
I assume the following happens:
Also be aware to not post your API key publicly
Thanks for pointing my key is on there haha, I even made a note to remove it before uploading the code. At least its a new key I made this morning
What I've noticed is that if the program ends the .zip is deleted. If the program continues running after the manifest is refreshed, the .zip stays in File Explorer "until" the downloadManifest function is called again.
Resolved with pull-request #31 Thanks again for investigating and resolving this issue. Helps a lot 👍 I will publish a new version with your fix to npm
Can download the manifest fine, but then when I then try to download the manifest again I get
Error: EPERM: operation not permitted, open 'mylongfilepath\world_sql_content_d122ea6e6d07e448d34868985f7a9cb9.content.zip'