Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with downgrading to 3.0.2 (for 1.26) #74

Open
Maj-ew opened this issue Dec 23, 2023 · 5 comments
Open

Help with downgrading to 3.0.2 (for 1.26) #74

Maj-ew opened this issue Dec 23, 2023 · 5 comments

Comments

@Maj-ew
Copy link

Maj-ew commented Dec 23, 2023

So I got same issue as people before so I installed 4.0.0 as u adviced then downgraded but still it doesn't work. I don't know if downgrade was 100% successful. Here is log

added 33 packages in 5s

3 packages are looking for funding
  run `npm fund` for details
PS J:\warcraft 333\Warcraft\map\patchwork\WC3MapTranslator-4.0.0> npm install --save [email protected]

up to date, audited 324 packages in 1s

21 packages are looking for funding
  run `npm fund` for details

5 vulnerabilities (3 moderate, 2 high)

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
PS J:\warcraft 333\Warcraft\map\patchwork\WC3MapTranslator-4.0.0> npm audit
# npm audit report

diff  <3.5.0
Severity: high
Regular Expression Denial of Service (ReDoS) - https://github.com/advisories/GHSA-h6ch-v84p-w6p9
No fix available
node_modules/diff-buf/node_modules/diff
  diff-buf  *
  Depends on vulnerable versions of diff
  node_modules/diff-buf

request  *
Severity: moderate
Server-Side Request Forgery in Request - https://github.com/advisories/GHSA-p8p7-x288-28g6
Depends on vulnerable versions of tough-cookie
No fix available
node_modules/request
  coveralls  *
  Depends on vulnerable versions of request
  node_modules/coveralls

tough-cookie  <4.1.3
Severity: moderate
tough-cookie Prototype Pollution vulnerability - https://github.com/advisories/GHSA-72xf-g2v4-qvf3
No fix available
node_modules/tough-cookie

5 vulnerabilities (3 moderate, 2 high)

Some issues need review, and may require choosing
a different dependency.```
@ChiefOfGxBxL
Copy link
Owner

Hi @Maj-ew,

Based on the logs you provided it looks like the package installed successfully. Are you experiencing any other issues with it?

@Maj-ew
Copy link
Author

Maj-ew commented Jan 2, 2024

I tried it again everything fresh I guess? Deleted everything in C:\Users\ernes\AppData\Roaming\npm then deleted WC3MapTranslator-4.0.0 folder (not sure if this is everything I should delete to make clean reinstall of this module) then redownloaded your latest release, unpacked and did this: (also here is all log)

PS J:\> cd "J:\warcraft 333\Warcraft\map\patchwork"
PS J:\warcraft 333\Warcraft\map\patchwork> npm i -g patchwork-mapconverter

added 33 packages in 3s

3 packages are looking for funding
  run `npm fund` for details
npm notice
npm notice New patch version of npm available! 10.2.3 -> 10.2.5
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.5
npm notice Run npm install -g [email protected] to update!
npm notice
PS J:\warcraft 333\Warcraft\map\patchwork> npm install --save [email protected]

added 3 packages in 2s
PS J:\warcraft 333\Warcraft\map\patchwork> npx patchwork-mapconverter war2json "J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i" "J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json" -td "J:\warcraft 333\Warcraft\map\patchwork\TriggerData.txt"
2024-01-02 10:31:07.755 DEBUG           main    command: war2json
2024-01-02 10:31:07.758 DEBUG           main    arguments: J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i, J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json
2024-01-02 10:31:07.759 DEBUG           main    options: {"importsFolderName":"imports","triggerData":"J:\\warcraft 333\\Warcraft\\map\\patchwork\\TriggerData.txt","ignore":"patchwork.ignore","sourceFolder":"src","customScriptExtension":".lua","guiExtension":".json","containerInfoExtension":".ini","commentExtension":".txt","mapHeader":"header"}
2024-01-02 10:31:07.759 INFO            TriggerDataLoader       Loading trigger data from J:\warcraft 333\Warcraft\map\patchwork\TriggerData.txt                   npx patchwork-mapconverter war2json "J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i" "J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json" -td "J:\warcraft 333\Warcraft\map\patchwork\TriggerData.txt"
2024-01-02 10:39:17.589 DEBUG           main    command: war2json
2024-01-02 10:39:17.592 DEBUG           main    arguments: J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i, J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json
2024-01-02 10:39:17.592 DEBUG           main    options: {"importsFolderName":"imports","triggerData":"J:\\warcraft 333\\Warcraft\\map\\patchwork\\TriggerData.txt","ignore":"patchwork.ignore","sourceFolder":"src","customScriptExtension":".lua","guiExtension":".json","containerInfoExtension":".ini","commentExtension":".txt","mapHeader":"header"}
2024-01-02 10:39:17.593 INFO            TriggerDataLoader       Loading trigger data from J:\warcraft 333\Warcraft\map\patchwork\TriggerData.txt
2024-01-02 10:39:17.598 INFO            War2Json        Converting Warcraft III binaries in J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i and outputting to J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json
2024-01-02 10:39:17.600 INFO            War2Json:InfoTranslator-0       Processing J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i
2024-01-02 10:39:17.622 FATAL           main
 RangeError  The value of "offset" is out of range. It must be >= 0 and <= 734. Received 737
error stack:
  • buffer      boundsError
        internal\buffer:88
  • buffer      Buffer.readInt32LE
        internal\buffer:392
  • \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\W3Buffer.ts       W3Buffer.readInt
        \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\W3Buffer.ts:13
  • \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\translators\InfoTranslator.ts     InfoTranslator.warToJson
        \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\translators\InfoTranslator.ts:400
  • \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts       processFile
        \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts:25
  •

  • \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts       Object.convert
        \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts:195
  • \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\index.ts   Command.<anonymous>
        \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\index.ts:89
PS J:\warcraft 333\Warcraft\map\patchwork>

@Maj-ew
Copy link
Author

Maj-ew commented Jan 6, 2024

@ChiefOfGxBxL
tried 1.1.0 version too but not working tbh idk what's up am I installing it wrong?

PS J:\warcraft 333\Warcraft\map\patchwork\WC3MapTranslator-4.0.0> npm install --save [email protected]
npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.

added 327 packages, and audited 328 packages in 15s

16 packages are looking for funding
  run `npm fund` for details

21 vulnerabilities (6 moderate, 10 high, 5 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
PS J:\warcraft 333\Warcraft\map\patchwork\WC3MapTranslator-4.0.0> npx patchwork-mapconverter war2json "J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i" "J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json" -td "J:\warcraft 333\Warcraft\map\patchwork\TriggerData.txt"
2024-01-06 23:38:26.757 DEBUG           main    command: war2json
2024-01-06 23:38:26.760 DEBUG           main    arguments: J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i, J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json
2024-01-06 23:38:26.760 DEBUG           main    options: {"importsFolderName":"imports","triggerData":"J:\\warcraft 333\\Warcraft\\map\\patchwork\\TriggerData.txt","ignore":"patchwork.ignore","sourceFolder":"src","customScriptExtension":".lua","guiExtension":".json","containerInfoExtension":".ini","commentExtension":".txt","mapHeader":"header"}
2024-01-06 23:38:26.760 INFO            TriggerDataLoader       Loading trigger data from J:\warcraft 333\Warcraft\map\patchwork\TriggerData.txt
2024-01-06 23:38:26.813 INFO            War2Json        Converting Warcraft III binaries in J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i and outputting to J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\W3I.json
2024-01-06 23:38:26.850 INFO            War2Json:InfoTranslator-0       Processing J:\warcraft 333\Warcraft\map\RMPQExtractor 1.0\werewolf\war3map.w3i
2024-01-06 23:38:26.877 FATAL           main
 RangeError  The value of "offset" is out of range. It must be >= 0 and <= 734. Received 737
error stack:
  • buffer      boundsError
        internal\buffer:88
  • buffer      Buffer.readInt32LE
        internal\buffer:392
  • \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\W3Buffer.ts       W3Buffer.readInt
        \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\W3Buffer.ts:13
  • \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\translators\InfoTranslator.ts     InfoTranslator.warToJson
        \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\wc3maptranslator\translators\InfoTranslator.ts:400
  • \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts       processFile
        \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts:25
  •

  • \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts       Object.convert
        \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\converter\War2JsonService.ts:195
  • \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\index.ts   Command.<anonymous>
        \Users\ernes\AppData\Roaming\npm\node_modules\patchwork-mapconverter\src\index.ts:89
PS J:\warcraft 333\Warcraft\map\patchwork\WC3MapTranslator-4.0.0>```

@ChiefOfGxBxL
Copy link
Owner

@Maj-ew Is the above output for an older war3map file (i.e. one for an older map)?

Would you mind sharing the file you're trying to translate? I'm guessing there's a version mismatch between the war3map file and what's supported by the version of WC3MapTranslator you've installed. I can help debug / troubleshoot if I can see the war3map file.

@Maj-ew
Copy link
Author

Maj-ew commented Jan 17, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants