Cannot read property stonehearth:jobs:worker of undefined

release-703 (x64)
Uncaught TypeError: Cannot read property ‘stonehearth:jobs:worker’ of undefined
TypeError: Cannot read property ‘stonehearth:jobs:worker’ of undefined
at SVGTextElement. (http://radiant/stonehearth/ui/game/promotion_tree/promotion_tree.js:234:50)
at SVGTextElement.arguments.length.each.function.n.textContent (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:9640)
at http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:12037
at P (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:1:4065)
at Array.pa.each (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:12012)
at Array.pa.text (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:9595)
at n._buildTree (http://radiant/stonehearth/ui/game/promotion_tree/promotion_tree.js:233:11)
at n._updateTalismanData (http://radiant/stonehearth/ui/game/promotion_tree/promotion_tree.js:360:15)
at w (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:23160)
at m (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:4:21008)
at b (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:13753)

Hey @Theolas, when are you getting this error?
Right when you open the promotion screen? Maybe when you promote or demote someone?
Any hints to reproduce it are highly appreciated :slight_smile:

when i try to promote to a new class form one to another like mason to potter

by the way this appears:

release-707 (x32)[M]
Uncaught TypeError: Cannot read property 'stonehearth:jobs:worker' of undefined
TypeError: Cannot read property 'stonehearth:jobs:worker' of undefined
    at SVGTextElement.<anonymous> (http://radiant/stonehearth/ui/game/promotion_tree/promotion_tree.js:234:50)
    at SVGTextElement.arguments.length.each.function.n.textContent (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:9640)
    at http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:12037
    at P (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:1:4065)
    at Array.pa.each (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:12012)
    at Array.pa.text (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:9595)
    at n._buildTree (http://radiant/stonehearth/ui/game/promotion_tree/promotion_tree.js:233:11)
    at n._updateTalismanData (http://radiant/stonehearth/ui/game/promotion_tree/promotion_tree.js:360:15)
    at w (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:23160)
    at m (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:4:21008)
    at b (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:13753)
2 Likes

Do you remember what you were doing when this appeared?

change jobs, cleric to be more exact,

1 Like

Perfect, thanks! @Relyss, does this help narrow it down at all?

I’ve also experienced this bug while changing cleric.
For some reason, my cleric continually goes around and heals my other hearthlings, neglecting both their own health and their hunger and sleep levels, effectively working themselves to death, even after I turn off their job button under managements. I have to put them back to being a worker in order to keep them from dying, which is when I experience this error.

My exact steps leading up to this error are as followed:

Playing hard mode,
Multiple injured hearthlings
Promoted best herbalist to cleric
Cleric worked self to near death before I noticed they werent eating
Tried turning off their job option to force them to take a break
Kept healing others constantly, regardless.
Demoted to worker, got this error.

Later I tried to demote them to herbalist and got the same error.

Somebody could help me? This appears to me when I am going to change the work to one of my villagers. :forlorn:

release-707 (x32)[M]
Uncaught TypeError: Cannot read property ‘stonehearth:jobs:worker’ of undefined
TypeError: Cannot read property ‘stonehearth:jobs:worker’ of undefined
at SVGTextElement. (http://radiant/stonehearth/ui/game/promotion_tree/promotion_tree.js:234:50)
at SVGTextElement.arguments.length.each.function.n.textContent (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:9640)
at http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:12037
at P (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:1:4065)
at Array.pa.each (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:12012)
at Array.pa.text (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:9595)
at n._buildTree (http://radiant/stonehearth/ui/game/promotion_tree/promotion_tree.js:233:11)
at n._updateTalismanData (http://radiant/stonehearth/ui/game/promotion_tree/promotion_tree.js:360:15)
at w (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:23160)
at m (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:4:21008)
at b (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:13753)

@berta_moreTreinta, just press F5 to reload the UI. If the UI is still broken after that, save and reload the game.

There’s a message at the bottom of those error windows (the UI errors) that tells you to use F5. But maybe the font is too small and the placement is wrong :thinking:

Were you having lag when that error appeared?

This has something to do with the job promotion thingy. It glitched up pretty bad, and I had to restart the UI 4 times for it to start working again
release-753 (x64)[M]
Uncaught TypeError: Cannot read property ‘stonehearth:jobs:worker’ of undefined
TypeError: Cannot read property ‘stonehearth:jobs:worker’ of undefined
at SVGTextElement. (http://radiant/stonehearth/ui/game/promotion_tree/promotion_tree.js:234:50)
at SVGTextElement.arguments.length.each.function.n.textContent (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:9640)
at http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:12037
at P (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:1:4065)
at Array.pa.each (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:12012)
at Array.pa.text (http://radiant/stonehearth/ui/root/js/libs/d3.min.js:3:9595)
at n._buildTree (http://radiant/stonehearth/ui/game/promotion_tree/promotion_tree.js:233:11)
at n._updateTalismanData (http://radiant/stonehearth/ui/game/promotion_tree/promotion_tree.js:360:15)
at w (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:23160)
at m (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:4:21008)
at b (http://radiant/stonehearth/ui/root/js/libs/ember-1.8.1.min.js:5:13753)

I have no clue about this one
release-753 (x64)[M]
…earth/ai/observers/find_healable_target_observer.lua:296: attempt to index local ‘ic’ (a nil value)
stack traceback:
radiant/modules/common.lua:245: in function 'report_traceback’
radiant/modules/common.lua:256: in function <radiant/modules/common.lua:250>
…earth/ai/observers/find_healable_target_observer.lua:296: in function ‘_get_target_score’
…earth/ai/observers/find_healable_target_observer.lua:280: in function ‘_update_heal_score’
…earth/ai/observers/find_healable_target_observer.lua:265: in function 'fn’
radiant/modules/events.lua:288: in function <radiant/modules/events.lua:285>
[C]: in function 'xpcall’
radiant/modules/common.lua:265: in function 'xpcall’
radiant/modules/events.lua:285: in function 'trigger’
radiant/modules/events.lua:370: in function '_fire_async_triggers’
radiant/modules/events.lua:445: in function '_update’
radiant/server.lua:61: in function <radiant/server.lua:58>

Enjoy :laughing:

I believe the 2nd one is a known issue and is being worked on as we speak.
Regarding the first one, do you have any mods running or is it “vanilla Stonehearth”?

Actually, this was fixed right after the release (probably even before it started being reported here), it was an oversight.
The fix will be included in the next build with a bunch of other fixes/improvements.

Aw, sorry about that :disappointed_relieved: refreshing the UI only once should have helped.

Btw, any clues on how to reproduce this more consistently? It’s very weird, there’s a variable that gets unassigned in between clicking on “change job” and showing the promotion tree, so when the promotion tree is loaded, it’s as if it doesn’t have a hearthling selected and can’t show the job info related to that hearthling. No idea how the UI gets into that state, but we’ve seen it reported several times already.

Yeah I got some mods on such as terrain colors, settlement decor, patrolmod and MRcontainers

I have no idea. I was just about to promote a hearthling and it just didn’t work properly.

1 Like

I see - I was not sure if it was fixed or currently being worked upon, so I tried to pull the safe-card :slight_smile:

I don’t think any of those mods should affect it. Sorry to hear you had struggles :frowning:

It’s totally fine. When playing on the lastest and unstable version this is something that likely will happen. A bug now and then definetely don’t make me not want to play. In fact almost the opposite