Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Aura/Tint HealthColors crashing

non-jumpgate I am having an issue were Aura/Tint HealthColors crashes the API after one of two damage/healing changes to tokens. I when it crashes it seems to re-post what I interpret as the hello world message to the chat: (From HealthColors):  API READY (From HealthColors):  Creating Default Hurt FX (From HealthColors):  Creating Default Heal FX and then I know it has crashed the sandbox this is what I see in the mod output console when I exit the game: For reference, the error message generated was: TypeError: Cannot set properties of undefined (setting 'startColour') TypeError: Cannot set properties of undefined (setting 'startColour')     at handleToken (apiscript.js:133:48)     at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:181:1), <anonymous>:65:16)     at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:181:1), <anonymous>:70:8)     at TrackedObj.set (/home/node/d20-api-server/api.js:1168:16)     at updateLocalCache (/home/node/d20-api-server/api.js:1509:18)     at /home/node/d20-api-server/api.js:1710:11     at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560     at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)     at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)     at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) I can restart the sandbox and see: Restarting sandbox by user request... No existing sandbox found.  Preparing sandbox to start on game activity. Spinning up new sandbox... "Loading character sheet data..." "Starting webworker script..." "Loading 1098 translation strings to worker..." "Starting webworker script..." "Loading 1098 translation strings to worker..." "Starting webworker script..." "Loading 1098 translation strings to worker..." "-=>HealthColors v1.6.1 [Updated: Aug 20 2020]<=-" "%cRoll20 Kingmaker Module log| kScaffold Loaded" "Roll20 Environment: Web" but that same keeps happening. SOMETIMES this is the message I see in the output For reference, the error message generated was: TypeError: Cannot read properties of undefined (reading 'get') TypeError: Cannot read properties of undefined (reading 'get')     at handleToken (apiscript.js:121:38)     at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:181:1), <anonymous>:65:16)     at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:181:1), <anonymous>:70:8)     at TrackedObj.set (/home/node/d20-api-server/api.js:1168:16)     at updateLocalCache (/home/node/d20-api-server/api.js:1509:18)     at /home/node/d20-api-server/api.js:1710:11     at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560     at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)     at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)     at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489)
I came here to post exactly the same thing, so it's not a you thing.  the only thing that I've changed since my last session is that I added the "TokenCondition" script, but that appears unrelated.
It's happening on 2 games as well (I just tried a different one), quite annoying as it happens I think each time health is changed.
Thanks for confirming Jonathan! I even made a blank game with the only script running was Aura/Tint HealthColors and same issue.
I thought I'd screwed things over by adding the new script, and while I'm hoping it can get sorted, I'm relieved I didn't..
That's the screen I had on the console.  I wonder what's changed.  did you try on Jumpgate or not, as both the games I've tried are on Jumpgate.  The script seems fine until you change an hp value at which point it goes.
Same here. Game is not using Jumpgate.
I'm using the default sandbox rather than the experimental one.  Not sure what other info might be needed.  Hopefully we have an expert appear with guidance :)
hmm, I think I will try to submit a bug report. I think this might be a backend issue.
Same here, it is not changing the colors and its crashing in the API.  
1733452266
The Aaron
Roll20 Production Team
API Scripter
Hmm. I'll take a look. 
1733458188
The Aaron
Roll20 Production Team
API Scripter
OK, I've located the bug and pushed a fix for it.  If you restart your sandbox, it will correct it.
Can confirm this is fixed and working correctly now after a restart. Thanks The Aaron! :D Quick side question though, and sorry if this has been covered elsewhere (please feel free to point me there if it has), but the fx for getting hurt/healed aren't working correctly. I'm presuming this is due to the fx change in Jumpgate games, and was wondering if there was a way to fix it myself or if a potential update might be coming for the script itself?
1733464815
The Aaron
Roll20 Production Team
API Scripter
Oh?  I wasn't aware of a breaking change with Jumpgate FX. Is it not working at all, or does it just not look right?
It's mostly working, but just not quite right. There are 2 issues with it currently. 1) For both effects it's pretty intermittent that the effect will play out normally. It will either stall out and have a quick flash of the effect or quick flash of the effect that immediately disappears. 2) Regardless of what colors you change hurt/heal to in the config menu, the effect is always white.
1733467908
The Aaron
Roll20 Production Team
API Scripter
Hmm. Peculiar. I'll take a look at it this weekend. 
The weird behaviour I keep seeing is that depending on where the token is on the map (as you move it around) the aura just disappears.  You move the it or the map again and sometimes it comes back, sometimes it doesn't..
Jonathan K. said: The weird behaviour I keep seeing is that depending on where the token is on the map (as you move it around) the aura just disappears.  You move the it or the map again and sometimes it comes back, sometimes it doesn't.. I have seen this (aura disappear and reappear) and it happens when zooming, or scrolling, or moving. Also tokens move from front to back quite a bit on their own, I just assumed all this is a jumpgate bug in general.
The Aaron said: OK, I've located the bug and pushed a fix for it.  If you restart your sandbox, it will correct it. Thanks so much! Is there any hope of getting an updated "only aura1" version so we can use aura2, or will your fix also work with the V1.6.0 Feb 12 2019 custom code? OR  is the code for V1.6.1 available anywhere so we can try to duplicate you fixes from 2019?
1733505415
David M.
Pro
API Scripter
You can try this version  I modified to only use aura2. It also registers SmartAoE and Scriptcards events so ATHC will be responsive to token bar changes made by those scripts.
David M. said: You can try this version  I modified to only use aura2. It also registers SmartAoE and Scriptcards events so ATHC will be responsive to token bar changes made by those scripts. I saw that yesterday and assumed it was broken too, but should be fixed now thanks to The Aaron's changes? Anyway, your code is EXACTLY what I am looking for... something that does not use both auras to do the job of one. I was kinda hoping that v1.6.1 would have done that, but sadly it's still claiming them both. I am guessing yours is built on the original 1.6.0 code, (because I can not see where the official v1.6.1 code is shared... could not find it on gethub from DXWarlock) and I was curious what the official build fixed. SO I was worried what ever bugs were addressed may still be in your code.
1733576287
David M.
Pro
API Scripter
Mine is based on 1.6.1. I grabbed it from the official Roll20 scripts repo here before making modifications.
Oh nice, I did not know about that official repo, thanks.