davelens / fvtt-party-resources

A simple module for FoundryVTT to manage (and track) custom party-wide numeric values.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Console error v1.3.0a

XxSTOZZYxX opened this issue · comments

Foundry v10
Console error (see below)

Uncaught (in promise) Error: Setting Model Validation Errors
[Setting.value]: may not be undefined
[Detected 1 package: fvtt-party-resources]
    at SchemaField._validateType (commons.js:3630)
    at SchemaField.validate (commons.js:3357)
    at Setting.validate (commons.js:4994)
    at new DataModel (commons.js:4771)
    at new Document (commons.js:5310)
    at new BaseSetting (commons.js:9319)
    at new ClientDocumentMixin (foundry.js:12942)
    at new Setting (foundry.js:21144)
    at ClientSettings.get (foundry.js:2723)
    at ResourcesApi.get (modules/fvtt-party-resources/src/resources_api.mjs:37)
    at Function.all (modules/fvtt-party-resources/src/resources_list.mjs:3)
    at ResourcesApi.resources (modules/fvtt-party-resources/src/resources_api.mjs:82)
    at Function.getData (modules/fvtt-party-resources/src/resources_status_bar.mjs:6)
    at Function.render (modules/fvtt-party-resources/src/resources_status_bar.mjs:16)
    at Object.fn (modules/fvtt-party-resources/src/init.mjs:25)
    at Function.#call (foundry.js:688)
    at Function.callAll (foundry.js:645)
    at Game.setupGame (foundry.js:7769)
    at async Game._initializeGameView (foundry.js:8820)
    at async Game.initialize (foundry.js:7630)

@XxSTOZZYxX I can't seem to reproduce this, though I'm familiar with the error. Foundry triggers this when data is requested through their game.settings object (which Party Resources does) with a key it can't match against any data. Seems to suggest that you tried to create a resource, and something happened along the way, but I can't be sure.

Do you recall what you were trying to do when you noticed this happening?

@davelens i don't recall specifically, no, but after flip flopping to v9 back to v10 i'm no longer able to reproduce so i'd say it's safe to disregard. if it pops again i'll keep ya posted but seems it might have been with the install itself.

I am having a very similar looking issue. It occurs when pressing the Party Resources button (nothing else happens for me). I have tried uninstalling and reinstalling the module but it still occurs. I have upgraded from v9 to v10 but never used the module while on v9, and this error has prevented me from using the module entirely.

image

@zoranac Hrm. I'm thinking it depends what kind of values are stored in game.settings. whether you get validation errors or not. v10 came with DataModel changes that I think could cause this (the error seems to suggest it). 😕

I'll have to do some digging around. Problem is I'll only be able to look at it coming sunday at the earliest.

@davelens FWIW, I am getting exactly the same error as @zoranac when pressing the party resources button. Thanks for taking a look!

@zoranac @XxSTOZZYxX @iotech-fvtt My work schedule got rearranged last minute, so I was able to take a quick look at this. I think the issue got fixed in the 1.3.1 release I just made.

Foundry 10 now requires a proper default value for all settings, which the module lacked (because things were less strict before). If you could check and verify if all is well, that'd be great. Note that if your dashboard opens it might show RENAME ME as a resource's name and/or one or more resources might have had their min/max values set to -100 and 100 respectively. These were the values I believe to have been bugged, and you should be able to safely change them.

Should you find any more errors beyond this point, they'll really have to wait until coming sunday though. 😄

@davelens works! Thank you so much! Now my players have to manage water on their trek across Chult in ToA. Muahahaha

I apologize if I came off as demanding a fix NOW, that was not my intention. I'm a mod author too, so I get how it can be. Thanks again!

I apologize if I came off as demanding a fix NOW, that was not my intention

No worries, I appreciate people reporting this. Sounds like your players could use an alchemy jug!

I'll keep this issue open for a few days longer.

@davelens This has fixed it for me as well, thanks!

Alright, looks like no one's receiving this issue anymore. Thanks for the reports! Closing issue.