🌐
RPG Maker Forums
forums.rpgmakerweb.com › home › game development engines › rpg maker mz support
"TypeError: Cannot read property 'length' of undefined" How do i fix this? | RPG Maker Forums
July 27, 2022 - The error simply states that the property 'length' is trying to be read on some unknown object. It could be a number of issues causing this. You should double check that your plugin notes are set up correctly to be used for CGMZ vehicle encounters. ... "OF UNDEFINED" always means that the engine ...
🌐
TikTok
tiktok.com › discover › cara-mengatasi-type-error-joiplay
Cara Mengatasi Type Error Joiplay
Discover your favorite brands, all in one place. Shop authentic products from verified official shops on TikTok Shop · Discover unique finds inspired by nature. 🌿✨ Shop crystals, minerals, fossils, plants, and more during #NatureFindsWeek, and uncover one-of-a-kind treasures from the ...
🌐
TrackJS
trackjs.com › javascript answers › how to fix `cannot read properties of undefined (reading 'length')`
How to fix `Cannot read properties of undefined (reading 'length')` • TrackJS
April 8, 2026 - Common JavaScript error when accessing length property on undefined values. Usually occurs with arrays, strings, or API responses that haven't loaded yet. Quick fixes: add null checks, use optional chaining, handle loading states.
🌐
Reddit
reddit.com › r › RPGMaker › comments › 1rl1cm8 › help_with_typeerror_cannot_read_properties_of
r/RPGMaker - Ayuda con: "TypeError: No se pueden leer ...
This is a subreddit focused on discussing RPG Maker. This includes any version from 95 to MZ to any of the console titles.
🌐
Rollbar
rollbar.com › home › how to fix typeerror: cannot read property of undefined in javascript
Cannot Read Properties of Undefined in JavaScript [Fixed]
Cannot read properties of undefined (reading 'length', 'data', any key) means the object is undefined. Fix it with checks, optional chaining, defaults.
Published: 2 weeks ago
🌐
GitHub
github.com › hapijs › joi › issues › 1138
"Error: Cannot read property 'length' of undefined" when attempting extend · Issue #1138 · hapijs/joi
March 27, 2017 - Error: Cannot read property 'length' of undefined Object.toString (node_modules/joi/lib/errors.js:75:31) processErrors (node_modules/joi/lib/errors.js:130:36) Object.exports.process (node_modules/joi/lib/errors.js:153:22) type._validateWithOptions (node_modules/joi/lib/any.js:630:31) Object.root.validate (node_modules/joi/lib/index.js:121:23) Test.t [as fn] (test/ava/framework/data/joi-test.js:127:21)
Author: hapijs
🌐
Reddit
reddit.com › r/rpgmaker › please help: "typeerror: cannot read property 'x' of undefined"
r/RPGMaker on Reddit: Please Help: "TypeError: Cannot read property 'x' of undefined"
August 15, 2024 -

I already posted this on RPG maker forums but might as well post it here, while its waiting for approval.

I have this part in my game, where the positioning of characters switches around after a cutscene. I do this using the "Save Event Position" plugin by Shaz. Since today after the cutscene, this error message started popping up.

Disabeling the plugin fixes it, it's essential to the gameplay though. I've compared it with a backed up version from 4 days ago (my backed up version from yestarday has the same issue) where the problem doesn't occur. I compared the event, that triggers the plugin with the old version and haven't found any differences. As I have no knowledge of JS I'm pretty stumped.

Does anyone have any ideas? Many thanks in advance! 

Find elsewhere
🌐
Bobby Hadz
bobbyhadz.com › blog › javascript-cannot-read-property-length-of-undefined
Cannot read properties of undefined (reading 'length') in JS | bobbyhadz
The "TypeError: Cannot read properties of undefined (reading 'length')" error occurs when accessing the length property on an undefined value.
🌐
GitHub
github.com › hapijs › joi › issues › 2356
Cannot read property 'presence' of undefined`, · Issue #2356 · hapijs/joi
April 18, 2020 - [Error [ValidationError]: "name" failed custom validation because Cannot read property 'presence' of undefined] { _original: { name: 'John Doe', email: '12ddh3@example.com', password: '12324sgs4sfsf674yhlh' }, details: [ { message: `"name" failed custom validation because Cannot read property 'presence' of undefined`, path: [Array], type: 'any.custom', context: [Object] } ] }
Author: hapijs
🌐
Reddit
reddit.com › r/learnjavascript › [deleted by user]
[deleted by user] : r/learnjavascript
July 15, 2022 - You’re getting this error when calling the length property on something. That means that something you have use .length on is undefined at some point.
🌐
Stack Overflow
stackoverflow.com › questions › 78264410 › javascript-cannot-read-properties-of-undefined-reading-length-code-does
typeerror - JavaScript - Cannot read properties of undefined (reading 'length') - (Code does work and provided) - Stack Overflow
Typing in 100.1 will show 1 However, when you first click on the field, you will get the Uncaught TypeError. Cannot read properties of undefined (reading 'length') The code is originally written with a hardcoded value.
🌐
GitHub
github.com › elliottdehn › open-jobs › issues › 10
Error: Stopped: Cannot read properties of undefined (reading 'length') · Issue #10 · elliottdehn/open-jobs
1 week ago - Search not completing, terminating with error: Stopped: Cannot read properties of undefined (reading 'length')
Author: elliottdehn
🌐
Rollbar
rollbar.com › home › how to fix typeerror: cannot read property length of undefined in javascript
How to Fix TypeError: Cannot Read Property Length of Undefined in JavaScript
Calling .length on a variable that is undefined or null throws this error, often from an unresolved async response. Fix it with a null check or ?.length.
Published: July 13, 2025
🌐
Reddit
reddit.com › r/nobaraproject › cannot read properties of undefined (reading 'medium')
r/NobaraProject on Reddit: Cannot read properties of undefined (reading 'Medium')
April 15, 2024 -

I am getting this error everytime I install decky loader. I thought it was because I installed HDD decky because my ally is showing ps glyphs instead of Xbox.

I have reset multiple times and once I select refresh it works.

Also side note, returning to game mode doesn't always work, I have to hard reset it each time it hangs

Just wondering if anyone is having the same issue?

🌐
Reddit
reddit.com › r/aynthor › guide: how to play fear & hunger 1 and 2 on your device.
r/AynThor on Reddit: Guide: How to play Fear & Hunger 1 and 2 on your device.
January 4, 2026 -

EDIT: It looks like joiplay updated and broke F&H so please make sure you have version

Hello all, I'm here to guide you to misery in the name of our lord Gro-goroth.

You may have tried to run this already through Gamehub lite or Gamenative already and noticed that the games are laggy and no matter what settings you change, it doesn't seem to help.

Well I did find a decent workaround and I'm here to assist. If you've got the time, I've got the solution.

Since both Fear & Hunger games are made in RPGMaker, we can actually use Joiplay, an RPGMaker/Web based games engine for Android.

JoiPlay | Website - Older versions

JoiPlay | Patreon (free) - Current versions

I would highly suggest trying to get the newest version from the Patreon as the older versions are a little buggy and missing the "Remap controller buttons" options menu.

It appears newer versions may break some functionality of the game. Make sure you have version 1.20.611 (this is what I was using when I made the guide)

JoiPlay | 1.20.611 direct link

Alright, here we go.

  1. Download and install the main JoiPlay apk and then the RPGMaker plugin and install them like normal.

  2. Install Fear & Hunger/2 through Gamehub or GameNative. (Important disclaimer: Unless you are rooted or have GameNative set to save files on the SD card, you won't be able to access the game data, so ensure you meet one of these criteria first before proceeding with GameNative)

  3. Boot up JoiPlay and go through the quick setup process, ensure you add permissions it asks for and agreeing to the terms. Once this is complete, click the Plus sign aka Add Game. At this stage, it will ask you to locate the game's .exe file. This is where things differ depending on GameNative or Gamehub.

  4. If using Gamehub, you will need to go back to your home screen, open the Thor's preinstalled "Files" app, and on the hamburger menu/left side and scroll down until you see "GameHub Lite" (may be named differently for the normal GameHub). From here you will just tap on it, and follow this path: data -> files -> Steam -> steamapps -> common. From here you will want to copy or move your Fear & Hunger/2 folder out of this directory and place it somewhere on your SD Card or Internal storage that can be accessed by other applications. For simplicity's sake, the example I will use is placing it the root of the internal storage. Then, once back in JoiPlay, you can tap the Plus/Add Game icon once again, and navigate to your Fear & Hunger/2 directory, wherever you placed it, and scroll down (if needed) and select "Game.exe"

  5. If using GameNative, you will not need to move anything around if you installed the game on SD Card as mentioned above. In JoiPlay when you tap the Plus to add a game, you will just need to back out to the top level in its file picker, select "External Storage" and navigate to this path: Android -> Data -> app.gamenative -> files -> Steam -> steamapps -> common -> Fear & Hunger/2 -> scroll down until you find Game.exe and tap on it.

  6. Once Game.exe is selected, it should automatically pick up the game's name, so you want to tap "Next" and it will ask for the game version. You can leave this blank, I don't believe it matters. Tap "Next" once again and it'll pick an icon for the game. You can tap next/finish and it should now be in your JoiPlay game list.

We're in the endgame now, if you've made it this far, you're almost done. Next up comes control mapping.

  1. Tap and hold Fear & Hunger/2 in the JoiPlay game list, and a submenu will pop out. Scroll down until you find "Remap Controller Buttons" If you don't see this, you need to get a newer version of JoiPlay!

  2. A menu should pop up allowing you to modify the button mappings now. Fear & Hunger/2 both don't use many keys, so mapping isn't super complicated, and feel free to change them as you see fit. This is what I use:

Button_A : ENTER

Button_B : ESCAPE

Button_Y : SHIFT_LEFT (This is for Fear & Hunger 2, and will serve as your Run/Dash button)

Button_L1 : SHIFT_LEFT (This is for both Fear & Hunger 1 and 2, for using a Lucky coin doing a coin flip. L1 is a bit more ergonomic to hold during selection than Y is)

Since Fear & Hunger 1 has a dedicated Torch button, you can set

Button_X : T

I left the rest at default, as the joystick and dpad already had directional movement set correctly.

That's it, you're done! After you get the controls set, don't forget to hit "Save" at the bottom of the button map page, and boot up the game.

It will take a little while (a few minutes) to start the game, but after which it should be working at full framerate, no tinkering or extra setup required.

Afternote: I did try to install the Fear & Hunger 2 Widescreen mod and it ends up breaking the game, while also making text a bit too tiny, so your mileage may vary with mods, just know there is a risk they will introduce extra problems playing the games this way.

Also for those wondering: You can disable the arrows/overlay in JoiPlay's settings on the main page. Tap the 3-dot menu in the top right, and find settings. Under "Gamepad settings" there is a toggle to hide the virtual gamepad, which should also make the overlay arrows disappear. Note: If you do this you will have no way to exit the game naturally so you will have to close the app and reopen it to change games.

Also, theoretically this same guide should work for any RPGMaker game, but it really depends on the game and if you get stuck, I would look for game specific guides for those.

Thanks for reading and I hope this helps!