Coder Social home page Coder Social logo

Exception about papyrusjs HOT 13 CLOSED

papyrus-mc avatar papyrus-mc commented on June 11, 2024
Exception

from papyrusjs.

Comments (13)

pogzie avatar pogzie commented on June 11, 2024

Ok I loaded me up a fresh Ubuntu 16.04 and tried it out again. Am I missing something here?

sudo apt-get install -y apache2 unzip

<im SCPing the files from my Minecraft server to this server>

cd ~
wget https://github.com/clarkx86/papyrusjs/releases/download/v1.0.5-alpha/papyrusjs-linux_v1.0.5-alpha-64.zip
unzip papyrusjs-linux_v1.0.5-alpha-64.zip -d ~/papyrusjs
cd papyrusjs

./papyrus --world="/root/Bedrock" --output="/root/GeneratedMap" -v

Then boom. Surprise.

root@ubuntu:~/papyrusjs# ./papyrus --world="/root/Bedrock" --output="/root/GeneratedMap" -v
papyrus.js v1.0.5a by clarkx86
Verbose mode is on! You will see debug console output.
Threads: 2
Texture directory is missing or --force-download has been specified. Downloading...
/root/papyrusjs/textures/textures.tmp.zip
[=================================] 100%DownloadDownloading...2045632250/ 45632250
Extracting...
Reading database. This can take a couple of seconds up to a couple of minutes.
Allocated 21 MB of memory when iterating through the database.
Creating Leaflet map...
Furthest X (negative):  0       Furthest X (positive):  341
Furthest Z (negative):  -83     Furthest Z (positive):  84
Processing and rendering 16172 Chunks, which 73830 of them are valid SubChunks...
[--------------------------------] 0%   Processing chunk 136/ 16172     48 chunks/Second
[WARNING] Failed to load TGA for        minecraft:jungle_door   1       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[--------------------------------] 1%   Processing chunk 208/ 16172     52 chunks/Second
[WARNING] Failed to load TGA for        minecraft:wooden_door   2       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[====-----------------------------] 8%  Processing chunk 1306/ 16172    61 chunks/Secondbuffer.js:207
    throw new ERR_INVALID_ARG_TYPE(
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object
    at Function.from (buffer.js:207:11)
    at process.on (/snapshot/papyrusjs/app.js:0:0)
    at process.emit (events.js:194:15)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
[=====----------------------------] 12% Processing chunk 2056/ 16172    49 chunks/Second
[WARNING] Failed to load TGA for        minecraft:wooden_door   0       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'

[WARNING] Failed to load TGA for        minecraft:wooden_door   4       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[=====----------------------------] 13% Processing chunk 2185/ 16172    48 chunks/Second
[WARNING] Failed to load TGA for        minecraft:wooden_door   2       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[=====----------------------------] 13% Processing chunk 2186/ 16172    48 chunks/Second
[WARNING] Failed to load TGA for        minecraft:wooden_door   6       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[=====----------------------------] 13% Processing chunk 2189/ 16172    48 chunks/Second
[WARNING] Failed to load TGA for        minecraft:wooden_door   1       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[=====----------------------------] 13% Processing chunk 2208/ 16172    48 chunks/Second
[WARNING] Failed to load TGA for        minecraft:spruce_door   0       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[======---------------------------] 14% Processing chunk 2324/ 16172    47 chunks/Second
[WARNING] Value not matching:   smoker_top      (minecraft:smoker       2)
[======---------------------------] 16% Processing chunk 2733/ 16172    45 chunks/Second
[WARNING] Failed to load TGA for        minecraft:dark_oak_door 1       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[=======--------------------------] 17% Processing chunk 2868/ 16172    45 chunks/Second
[WARNING] Failed to load TGA for        minecraft:iron_door     3       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[=======--------------------------] 17% Processing chunk 2869/ 16172    45 chunks/Second
[WARNING] Value not matching:   barrel_side     (minecraft:barrel       2)
[=======--------------------------] 17% Processing chunk 2870/ 16172    45 chunks/Second
[WARNING] Failed to load TGA for        minecraft:wooden_door   3       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[=======--------------------------] 19% Processing chunk 3120/ 16172    44 chunks/Second
[WARNING] Failed to load TGA for        minecraft:furnace       5       furnace_top     Error: Error: ENOENT: no such file or directory, open 'textures/undefined.tga'
[=======--------------------------] 19% Processing chunk 3122/ 16172    44 chunks/Second
[WARNING] Failed to load TGA for        minecraft:dark_oak_door 0       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[=======--------------------------] 20% Processing chunk 3243/ 16172    44 chunks/Second
[WARNING] Failed to load TGA for        minecraft:dark_oak_door 3       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[========-------------------------] 20% Processing chunk 3366/ 16172    43 chunks/Second
[WARNING] Failed to load TGA for        minecraft:iron_door     0       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[=========------------------------] 23% Processing chunk 3875/ 16172    42 chunks/Secondbuffer.js:207
    throw new ERR_INVALID_ARG_TYPE(
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object
    at Function.from (buffer.js:207:11)
    at process.on (/snapshot/papyrusjs/app.js:0:0)
    at process.emit (events.js:194:15)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Im trying so hard to make this work as PapyrusCs (I containerized it at https://hub.docker.com/r/pogzie/papyruscs) sucks up massive amount of resources due to its dotnet nature. I was hoping that this JS version would be lighter.

Any advice would be great.

from papyrusjs.

clvrkdev avatar clvrkdev commented on June 11, 2024

Hey! Sorry for the late reply!

I will look into this today and try to reproduce this behaviour.
Would you mind attaching your archived world file (I see with 16172 chunks it shouldn't be too large) for me to check this out?

Also, is it possible that your world has gone through a few updates already (possibly Minecraft Bedrock 1.2+)?

from papyrusjs.

pogzie avatar pogzie commented on June 11, 2024

Hmm. Im still at 1.11.4 (I assume the server is still at the same version). Im running off an image from https://hub.docker.com/r/lomot/minecraft-bedrock

I've also tried this on Ubuntu 18.04 but looks like its still getting the same errors.

My assumption is it panics when it fails to load a TGA file from the texture pack. Im wondering if its possible to add an exception for not existent textures and put in a black box or an X or something just to handle this situation. Future proofing wise, this would at least be able to handle new textures introduced while not relying on code changes.

I havent tried using another texture pack though. Still figuring out its folder structure.

Let me zip the latest world file that I have and send it over. I've completely given up on PapyrusCs as I dont have 2gb worth of resources to allocate on my cluster just to generate a Minecraft map (heck even my Minecraft container only runs at 1gb memory).

Greatly appreciate the help.

root@ubuntu:~/papyrusjs# ./papyrus --world="/root/Bedrock" --output="/root/GeneratedMap" -v --force-download
papyrus.js v1.0.5a by clarkx86
Verbose mode is on! You will see debug console output.
Threads: 2
Texture directory is missing or --force-download has been specified. Downloading...
/root/papyrusjs/textures/textures.tmp.zip
[=================================] 100%DownloadDownloading...7245632250/ 45632250
Extracting...
Reading database. This can take a couple of seconds up to a couple of minutes.
Allocated 26 MB of memory when iterating through the database.
Creating Leaflet map...
Furthest X (negative):  0       Furthest X (positive):  341
Furthest Z (negative):  -83     Furthest Z (positive):  93
Processing and rendering 21198 Chunks, which 96612 of them are valid SubChunks...
[--------------------------------] 0%   Processing chunk 138/ 21198     38 chunks/Second
[WARNING] Failed to load TGA for        minecraft:jungle_door   1       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[--------------------------------] 0%   Processing chunk 208/ 21198     43 chunks/Second
[WARNING] Failed to load TGA for        minecraft:dark_oak_door 3       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[--------------------------------] 1%   Processing chunk 239/ 21198     45 chunks/Second
[WARNING] Failed to load TGA for        minecraft:wooden_door   2       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[==-------------------------------] 4%  Processing chunk 993/ 21198     57 chunks/Second
[WARNING] Failed to load TGA for        minecraft:dark_oak_door 0       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[====-----------------------------] 9%  Processing chunk 2040/ 21198    55 chunks/Secondbuffer.js:207
    throw new ERR_INVALID_ARG_TYPE(
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object
    at Function.from (buffer.js:207:11)
    at process.on (/snapshot/papyrusjs/app.js:0:0)
    at process.emit (events.js:194:15)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
[========-------------------------] 22% Processing chunk 4746/ 21198    41 chunks/Second
[WARNING] Failed to load TGA for        minecraft:wooden_door   4       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'

[WARNING] Failed to load TGA for        minecraft:wooden_door   0       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[========-------------------------] 23% Processing chunk 4881/ 21198    40 chunks/Second
[WARNING] Failed to load TGA for        minecraft:wooden_door   2       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[========-------------------------] 23% Processing chunk 4885/ 21198    40 chunks/Second
[WARNING] Failed to load TGA for        minecraft:wooden_door   1       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[========-------------------------] 23% Processing chunk 4904/ 21198    40 chunks/Second
[WARNING] Failed to load TGA for        minecraft:spruce_door   0       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[=========------------------------] 23% Processing chunk 5024/ 21198    40 chunks/Second
[WARNING] Value not matching:   smoker_top      (minecraft:smoker       2)
[=========------------------------] 25% Processing chunk 5436/ 21198    40 chunks/Second
[WARNING] Failed to load TGA for        minecraft:dark_oak_door 1       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[=========------------------------] 26% Processing chunk 5571/ 21198    39 chunks/Second
[WARNING] Failed to load TGA for        minecraft:iron_door     3       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[=========------------------------] 26% Processing chunk 5573/ 21198    39 chunks/Second
[WARNING] Failed to load TGA for        minecraft:wooden_door   3       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[==========-----------------------] 27% Processing chunk 5845/ 21198    39 chunks/Second
[WARNING] Failed to load TGA for        minecraft:dark_oak_door 0       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[==========-----------------------] 28% Processing chunk 5980/ 21198    39 chunks/Second
[WARNING] Failed to load TGA for        minecraft:dark_oak_door 3       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[==========-----------------------] 28% Processing chunk 6115/ 21198    39 chunks/Second
[WARNING] Failed to load TGA for        minecraft:iron_door     0       door_lower      Error: Error: ENOENT: no such file or directory, open 'textures/null.tga'
[===========----------------------] 31% Processing chunk 6646/ 21198    38 chunks/Secondbuffer.js:207
    throw new ERR_INVALID_ARG_TYPE(
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object
    at Function.from (buffer.js:207:11)
    at process.on (/snapshot/papyrusjs/app.js:0:0)
    at process.emit (events.js:194:15)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

from papyrusjs.

pogzie avatar pogzie commented on June 11, 2024

https://gofile.io/?c=7WpvVg

from papyrusjs.

pogzie avatar pogzie commented on June 11, 2024

I tried a texture 1.14 texture pack for 1.12.2, no luck there too. (https://www.planetminecraft.com/texture_pack/1-14-textures-for-1-12-2/)

root@ubuntu:~/papyrusjs# ./papyrus --world="/root/Bedrock" --output="/root/GeneratedMap" -v --textures="./114"
papyrus.js v1.0.5a by clarkx86
Verbose mode is on! You will see debug console output.
Threads: 2
Texture directory is missing or --force-download has been specified. Downloading...
/root/papyrusjs/114/textures.tmp.zip
[=================================] 100%DownloadDownloading...5645632250/ 45632250
Extracting...
Reading database. This can take a couple of seconds up to a couple of minutes.
Allocated 18 MB of memory when iterating through the database.
Creating Leaflet map...
Furthest X (negative):  0       Furthest X (positive):  341
Furthest Z (negative):  -83     Furthest Z (positive):  93
Processing and rendering 21198 Chunks, which 96612 of them are valid SubChunks...
[--------------------------------] 0%   Processing chunk 3/ 21198       6 chunks/Second(node:3559) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'water' of null
    at loadTexture (/snapshot/papyrusjs/src/render/loadTexture.js:0:0)
    at render (/snapshot/papyrusjs/src/render/renderChunk.js:0:0)
    at module.exports.Promise (/snapshot/papyrusjs/src/render/renderChunk.js:0:0)
    at new Promise (<anonymous>)
    at module.exports (/snapshot/papyrusjs/src/render/renderChunk.js:0:0)
    at process.on (/snapshot/papyrusjs/app.js:0:0)
    at process.emit (events.js:194:15)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:3559) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:3559) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:3565) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'grass' of null
    at loadTexture (/snapshot/papyrusjs/src/render/loadTexture.js:0:0)
    at render (/snapshot/papyrusjs/src/render/renderChunk.js:0:0)
    at module.exports.Promise (/snapshot/papyrusjs/src/render/renderChunk.js:0:0)
    at new Promise (<anonymous>)
    at module.exports (/snapshot/papyrusjs/src/render/renderChunk.js:0:0)
    at process.on (/snapshot/papyrusjs/app.js:0:0)
    at process.emit (events.js:194:15)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:3565) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:3565) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
^C
root@ubuntu:~/papyrusjs#

from papyrusjs.

pogzie avatar pogzie commented on June 11, 2024

Also tried a 1.14 texture pack from http://minecraftsix.com/vanillaxbr-resource-pack/

Yeah no luck there too

root@ubuntu:~/papyrusjs# ./papyrus --world="/root/Bedrock" --output="/root/GeneratedMap" -v --textures="./vanillaxbr"
papyrus.js v1.0.5a by clarkx86
Verbose mode is on! You will see debug console output.
Threads: 2
Texture directory is missing or --force-download has been specified. Downloading...
/root/papyrusjs/vanillaxbr/textures.tmp.zip
[=================================] 100%DownloadDownloading...0445632250/ 45632250
Extracting...
Reading database. This can take a couple of seconds up to a couple of minutes.
Allocated 17 MB of memory when iterating through the database.
Creating Leaflet map...
Furthest X (negative):  0       Furthest X (positive):  341
Furthest Z (negative):  -83     Furthest Z (positive):  93
Processing and rendering 21198 Chunks, which 96612 of them are valid SubChunks...
[--------------------------------] 0%   Processing chunk 2/ 21198       4 chunks/Second(node:3726) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'water' of null
    at loadTexture (/snapshot/papyrusjs/src/render/loadTexture.js:0:0)
    at render (/snapshot/papyrusjs/src/render/renderChunk.js:0:0)
    at module.exports.Promise (/snapshot/papyrusjs/src/render/renderChunk.js:0:0)
    at new Promise (<anonymous>)
    at module.exports (/snapshot/papyrusjs/src/render/renderChunk.js:0:0)
    at process.on (/snapshot/papyrusjs/app.js:0:0)
    at process.emit (events.js:194:15)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:3726) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:3726) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:3732) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'grass' of null
    at loadTexture (/snapshot/papyrusjs/src/render/loadTexture.js:0:0)
    at render (/snapshot/papyrusjs/src/render/renderChunk.js:0:0)
    at module.exports.Promise (/snapshot/papyrusjs/src/render/renderChunk.js:0:0)
    at new Promise (<anonymous>)
    at module.exports (/snapshot/papyrusjs/src/render/renderChunk.js:0:0)
    at process.on (/snapshot/papyrusjs/app.js:0:0)
    at process.emit (events.js:194:15)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:3732) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:3732) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

from papyrusjs.

pogzie avatar pogzie commented on June 11, 2024

Tried this guys https://rodrigo-al.jimdo.com/texture-packs/8x8-rodrigo-s-pack/ 114 and 112 packs, No go.

from papyrusjs.

pogzie avatar pogzie commented on June 11, 2024

Ok one issue i found is in your example you have specified --textures (with an S) and im puzzled why despite loading a custom texture its saying that its downloading a texture. So with this discovery all my testing seems to be useless.

from papyrusjs.

pogzie avatar pogzie commented on June 11, 2024

Re-tested the textures (with the corrected --texture flag for both 114 and 112, no dice.

from papyrusjs.

clvrkdev avatar clvrkdev commented on June 11, 2024

in your example you have specified --textures (with an S)

--textures is correct however as you can see in the argument initialization code here:
https://github.com/clarkx86/papyrusjs/blob/0f73adc9961504eb2b001fc2df4597802e648496/app.js#L21-L24
You can either use --textures="./<path>/" or -t="./<path>/" for short (take care when using double and/ or single hyphen).

Regarding the texture pack you've linked above, please note that only Minecraft Bedrock texture packs (16x16 only) will work, due to differences in certain texture names between Java Edition and Bedrock Edition, such as the dependency for papyrus.js for the files ./blocks.json and ./blocks/terrain_texture.json, which should be located in every MCBE texture pack, to find the correct texture mappings. They are only present in MCBE texture packs (as far as I know), not in Java Edition. So papyrus.js won't be able to load any textures and just crash. Also, the texture pack must be unzipped, so *.zip or *.mcpack archives won't work.

EDIT: If you haven't already, consider joining our Discord so we can assist you further and a bit faster :).

from papyrusjs.

pogzie avatar pogzie commented on June 11, 2024

@clarkx86 can you give me several of the conditions thats needed for textures? you've already mentioned 16x16.. what version should I try? 1.14?

Yes I did unzip all of them and pointed the url correctly.

from papyrusjs.

pogzie avatar pogzie commented on June 11, 2024

Discussion in Slack, I have clarified that I am on version 1.11.4 Bedrock (Win 10) typos above.

from papyrusjs.

pogzie avatar pogzie commented on June 11, 2024

tested and solved by @sajones latest fix. closing this

from papyrusjs.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.