Skip to content

jaylydb: TypeError: cannot read property 'type' of undefined #334

Open
@Corosauce

Description

@Corosauce

Describe the bug

Went afk to let the game run, came back to this error.

19:16:38[Scripting][error]-TypeError: cannot read property 'type' of undefined at updateParticipants (jaylydb/index.js:108) at <anonymous> (jaylydb/index.js:223)

My code isn't doing anything too complicated, every 2 seconds its writing out a list of objects and their values to the database, without revealing too much it looks roughly like this.

Scoreboard with its data bits looking like:

image

Code:

db init:
this.db = new JaylyDB(dbName);

code that iterates over some objects:

var index: number = 0; for (const object of this.objects) { object.save(index, this.db); index++; }

the object:

save(index: number, db: JaylyDB) { db.set(index + "_posX", this.pos.x); db.set(index + "_posY", this.pos.y); db.set(index + "_posZ", this.pos.z); }

Using version 1.1.3

Updates

Seems very intermittent, cannot reproduce reliably.

I went to run /script profiler start and was met with massive spam of the same error, but not the second time after a /reload

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions