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

Unknown Error

Hello, I have only recently started encountering this error (today). Any ideas what it might be? Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your script's code and click the "Save Script" button. We will then attempt to start running the scripts again. More info... If this script was installed from the Script Library, you might find help in the Community API Forum. For reference, the error message generated was: ReferenceError: createObj is not defined ReferenceError: createObj is not defined     at setAttrs (/home/node/d20-api-server/sheetworker_listeners.js:171:29)     at Worker.onmessage (/home/node/d20-api-server/sheetworker_listeners.js:274:17)     at ChildProcess.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/index.js:90:21)     at ChildProcess.emit (events.js:310:20)     at emit (internal/child_process.js:876:12)     at processTicksAndRejections (internal/process/task_queues.js:85:21)
1624390613
The Aaron
Roll20 Production Team
API Scripter
What character sheet are you using?
1624392146

Edited 1624392172
Pathfinder Community by Necros Version 1.79
1624392863
The Aaron
Roll20 Production Team
API Scripter
Is that in the Roll20 Character Sheet Repo (like, you chose it from a drop box), or did you enter it as a custom sheet?
Repo
1624393609
The Aaron
Roll20 Production Team
API Scripter
What API scripts do you have installed?
I've been getting this error too.   ReferenceError: createObj is not defined ReferenceError: createObj is not defined at setAttrs (/home/node/d20-api-server/sheetworker_listeners.js:171:29) at Worker.onmessage (/home/node/d20-api-server/sheetworker_listeners.js:274:17) at ChildProcess.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/index.js:90:21) at ChildProcess.emit (events.js:310:20) at emit (internal/child_process.js:876:12) at processTicksAndRejections (internal/process/task_queues.js:85:21)
1624394362
The Aaron
Roll20 Production Team
API Scripter
Kirk, are you running the same character sheet?
1624394472

Edited 1624394613
These character sheets also started showing at the same time.
1624396636
The Aaron
Roll20 Production Team
API Scripter
If you disable Pathfinder Companion Script, do you still get the crash?  it's definitely what is creating that Character.  With it disabled, remove all the Version Check characters, then reenable it and see if you get the crash again.
I'm getting the same error with the Earthdawn 4th Edition character sheet.  Whenever I try to create a character.
1624401678
vÍnce
Pro
Sheet Author
The Aaron said: If you disable Pathfinder Companion Script, do you still get the crash?  it's definitely what is creating that Character.  With it disabled, remove all the Version Check characters, then reenable it and see if you get the crash again. Can confirm that there is something up with the PFC script enabled.  No errors when it is disabled.  But I am also seeing the API error For reference, the error message generated was: ReferenceError: createObj is not defined ReferenceError: createObj is not defined at setAttrs (/home/node/d20-api-server/sheetworker_listeners.js:171:29) at Worker.onmessage (/home/node/d20-api-server/sheetworker_listeners.js:274:17) at ChildProcess.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/index.js:90:21) at ChildProcess.emit (events.js:310:20) at emit (internal/child_process.js:876:12) at processTicksAndRejections (internal/process/task_queues.js:85:21) When PFC is enabled.
1624401805

Edited 1624401881
Disabling pfc stops it and enabling it throws the issue again. I have not updated or touched anything so I'm still quite confused why its just now throwing the error. I'll try rolling back the sheet on a copy to see if there was a shadow update that I didn't notice and see if that still throws the error
1624402004
vÍnce
Pro
Sheet Author
Current live sheet is v1.793 btw.
1624402333
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, ok, this is going to take some more digging. The error is saying that the Roll20 function createObj  is not defined when it is called from the sheetworker function setAttrs . Neither of these are things that I change in PFC, although I do use createObj in PFC.
Disabling the Earthdawn sheet companion also removes the error.  So not only is the error only happening today, but it's happening to two different sheet companion scripts.
1624402409

Edited 1624402454
I pulled the code for the 1.731 version and it is still throwing the same error. I have a feeling something changed on roll20's end that is causing this?
1624402726

Edited 1624402788
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks for the info Ashwath. Yeah, this is looking like some sort of disjunct between the sheetworker and API environments to me. Doing some "simplest replication" digging now
1624404369

Edited 1624404496
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ok, yes, this is a problem somewhere on the backend of Roll20. I made this simple reproduction sheet and script combo: Sheet <input type='text' name='attr_api_receiver'> <script type="text/worker"> on('change:api_receiver',(event)=>{ const setObj = {}; setObj[event.newValue.replace(/\s/g,'_')] = `${event.newValue} was set by sheetworker`; log({setObj}); setAttrs(setObj); }) </script> API Script on('chat:message',(msg_orig)=>{ let msg = _.clone(msg_orig); log({content:msg.content}); msg.content.replace(/!setter\s*(.+?)\s*$/,(match,current)=>{ let c = findObjs({type:'character',name:'Udruc Slagri'})[0]; log({c}); if(c){ let toSet = findObjs({type:'attribute',characterid:c.id,name:'api_receiver'}); toSet = toSet ? toSet[0] : undefined; log({toSet}); if(toSet){ //setAttrs(c.id,{api_receiver:current});//Either of these two methods of triggering a sheetworker with an API change will cause the error toSet.setWithWorker({current}); } } }); The problem arises when the api triggered sheetworker change needs to create a new attribute (like say creating a new repeating item). To replicate the issue, simply install the sheet code and the api script and then do a manual user initiated change where you type a new variable name into the input on the sheet first. It will create the attribute appropriately (you can see it on the A&A tab). Then compare that to typing  !setter new_variable  in chat, where new_variable  is the name of an attribute that does not currently exist on the sheet. The error will be triggered on the API console.
1624406314
vÍnce
Pro
Sheet Author
I also get the error if I use chatsetattr to create an attribute. !setattr {{ --sel --replace --repeating_weapon_-CREATE_enhancement|1 --repeating_weapon_-CREATE_masterwork|1 --repeating_weapon_-CREATE_name|+1 Short Sword }}
I disabled the Pathfinder Companion Script and I don't get the error anymore.  Also, my cm-status macro works. If I enable the PCS, the error comes back.  I haven't made any changes on my end with macros.
Hey Folks, Thanks for the report, we've made a ticket and a full investigation into this will happen as soon as possible. I'll come back to this thread once we have more information. Apologies for the inconvenience!
Also happening on the 5e Shaped Sheet, if that helps.
I did some digging into this, it looks like it comes from the backend when using setattr
Nic B. said: Hey Folks, Thanks for the report, we've made a ticket and a full investigation into this will happen as soon as possible. I'll come back to this thread once we have more information. Apologies for the inconvenience! Thank you for keeping us in the loop!
Thank you all for your patience, this issue should now be resolved, you may have to restart your api sandbox for the fix to take effect.
1624469783
The Aaron
Roll20 Production Team
API Scripter
Sweet!  Thanks for the prompt response!
Dang. Getting a new error now. TypeError: Cannot read property 'body' of undefined TypeError: Cannot read property 'body' of undefined at Request._callback (/home/node/d20-api-server/api.js:500:28) at self.callback (/home/node/d20-api-server/node_modules/request/request.js:185:22) at Request.emit (events.js:314:20) at Request.onRequestError (/home/node/d20-api-server/node_modules/request/request.js:877:8) at ClientRequest.emit (events.js:314:20) at TLSSocket.socketErrorListener (_http_client.js:427:9) at TLSSocket.emit (events.js:314:20) at errorOrDestroy (internal/streams/destroy.js:108:12) at onwriteError (_stream_writable.js:424:5) at onwrite (_stream_writable.js:445:5)
It looks like it's throwing an infinite loop in the ShapedSheet Companion Script. I disabled it, and the API was stable, but when I re-enabled it, it killed the whole API. "Loading character sheet data..." "Starting webworker script..." "Loading 1022 translation strings to worker..." "5eShapedCompanion 1624484361843 INFO : Summary of adding SRD entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":0,\"added\":8},\"monsters\":{\"withErrors\":0,\"deleted\":0,\"patched\":0,\"added\":325},\"spells\":{\"withErrors\":0,\"deleted\":0,\"patched\":0,\"added\":319}}" "5eShapedCompanion 1624484361846 INFO : Summary of adding UAArtificer entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":0,\"added\":1}}" "5eShapedCompanion 1624484361848 INFO : Summary of adding UACleric entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":1,\"added\":0}}" "5eShapedCompanion 1624484361849 INFO : Summary of adding UALightDarkUnderdark entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":1,\"added\":0}}" "5eShapedCompanion 1624484361853 INFO : Summary of adding UAModernMagic entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":4,\"added\":0},\"spells\":{\"withErrors\":0,\"deleted\":0,\"patched\":0,\"added\":0}}" "5eShapedCompanion 1624484361855 INFO : Summary of adding UAOldBlackMagic entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":2,\"added\":0},\"spells\":{\"withErrors\":0,\"deleted\":0,\"patched\":0,\"added\":5}}" "5eShapedCompanion 1624484361857 INFO : Summary of adding UAPaladin entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":1,\"added\":0}}" "5eShapedCompanion 1624484361862 INFO : Summary of adding UARanger entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":1,\"added\":0}}" "5eShapedCompanion 1624484361863 INFO : Summary of adding UARangerRevised entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":1,\"added\":0}}" "5eShapedCompanion 1624484361864 INFO : Summary of adding UASorcerer entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":1,\"added\":0}}" "5eShapedCompanion 1624484361870 INFO : Summary of adding UAStarterSpells entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":8,\"added\":0},\"spells\":{\"withErrors\":0,\"deleted\":0,\"patched\":0,\"added\":17}}" "5eShapedCompanion 1624484361871 INFO : Summary of adding UATheFaithful entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":1,\"added\":0}}" "5eShapedCompanion 1624484361872 INFO : Summary of adding UATrioOfSubclasses entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":2,\"added\":0}}" "5eShapedCompanion 1624484361873 INFO : Summary of adding UAWarlock entity group to the lookup: {\"errors\":0,\"entityGroupName\":{},\"classes\":{\"withErrors\":0,\"deleted\":0,\"patched\":1,\"added\":0}}" "5eShapedCompanion 1624484361873 INFO : -=> ShapedScripts v10.0.1 <=-" "-=> Roll20AM v2.15 <=- [Wed Apr 05 2017 00:26:44 GMT+0000 (Coordinated Universal Time)]" " > Updating Schema to v2.02 <" " >Help handout updated<" "-=> GroupInitiative v0.9.28 <=- [Thu Jan 11 2018 14:49:14 GMT+0000 (Coordinated Universal Time)]" "-=> TokenNameNumber v0.5.14 <=- [Wed Jun 16 2021 00:39:50 GMT+0000 (Coordinated Universal Time)]" "-- True Page Copy v1.0 -- [Mon Apr 03 2017 18:32:50 GMT+0000 (Coordinated Universal Time)]" "-=> TurnMarker v1.3.9 <=- [Tue Jul 18 2017 20:10:57 GMT+0000 (Coordinated Universal Time)]" "Radar v0.9 initialized." "RadarWIP Offset: 15923" "-=> libTokenMarkers v0.1.1 <=- [Wed Dec 30 2020 02:10:29 GMT+0000 (Coordinated Universal Time)]" " > Loaded 58 Token Markers." Possible infinite loop detected, shutting down. "Loading character sheet data..." "Starting webworker script..." "Loading 1022 translation strings to worker..."
1624491190

Edited 1624491211
vÍnce
Pro
Sheet Author
FYI: PFC and ChatsetAttr (PF Community Sheet game) appear to be working without throwing errors for me.
1624551363

Edited 1624555162
vÍnce said: FYI: PFC and ChatsetAttr (PF Community Sheet game) appear to be working without throwing errors for me. This is being thrown in the api console the the repo necros pf community sheet 1.793 with pfc although I'm not to certain whether it was there alreadyor if its even related to these issues. Notice: %c Attributes at version: 0 " "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for weapon " "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for item " "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for spells " "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for ability " otherwise there are no issues that I have seen with PFC and PF community sheet
1624555270
vÍnce
Pro
Sheet Author
I believe I've seen those errors/warnings logged in the past.  I don't think its related to this issue.  Maybe Scott has some insight?
I am now having a new issue where I'm getting this message: "5eShapedScript 1624557542239 ERROR : Couldn't find Shaped Character Sheet. This Shaped Script requires the Shaped Character Sheet to be installed in the campaign." I've tried making a new campaign and doing the sheet there, restarted the API multiple times etc. Unsure if the issue is related as I didn't have this issue prior to the ReferenceError which started this thread, so think they might be related.
1624558384
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Brundir E. said: vÍnce said: FYI: PFC and ChatsetAttr (PF Community Sheet game) appear to be working without throwing errors for me. This is being thrown in the api console the the repo necros pf community sheet 1.793 with pfc although I'm not to certain whether it was there alreadyor if its even related to these issues. Notice: %c Attributes at version: 0 " "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for weapon " "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for item " "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for spells " "%c Warning: %c migrate repeating attacktype Dropdowns, there are no rows for ability " otherwise there are no issues that I have seen with PFC and PF community sheet Well, I don't know about insight, but I believe these are warnings from the PF sheet saying that it's trying to update a thing, but there was nothing to update. I believe you can just ignore these. Alex C. said: I am now having a new issue where I'm getting this message: "5eShapedScript 1624557542239 ERROR : Couldn't find Shaped Character Sheet. This Shaped Script requires the Shaped Character Sheet to be installed in the campaign." I've tried making a new campaign and doing the sheet there, restarted the API multiple times etc. Unsure if the issue is related as I didn't have this issue prior to the ReferenceError which started this thread, so think they might be related. Alex, from that I'd guess that you have the wrong character sheet installed. Unfortunately the shaped sheet and shaped script are no longer actively developed.
Alex, from that I'd guess that you have the wrong character sheet installed. Unfortunately the shaped sheet and shaped script are no longer actively developed. Yeah I thought that, but I check it was installed so I am very confused. I tried taking it away and then re adding but still ran into the issue. I appreciate its not actively developed but unsure where this issue has appeared from.
Boy do I wish someone would take up the torch again. Even after 2ish years of not being developed, it's still lightyears ahead of the official 5e sheet. It's crazy. I feel like a betamax holdout. Again. J Alex C. said: Alex, from that I'd guess that you have the wrong character sheet installed. Unfortunately the shaped sheet and shaped script are no longer actively developed. Yeah I thought that, but I check it was installed so I am very confused. I tried taking it away and then re adding but still ran into the issue. I appreciate its not actively developed but unsure where this issue has appeared from.
Whatever changes were made to the backend broke the 5e companion script, possibly permanently.&nbsp; Kryx was able to get the script to find the character sheet again, but the monster import at least is still broken.&nbsp; It is not related to a mismatch of script and sheet. Very disappointing. <a href="https://app.roll20.net/forum/post/10191536/does-anyone-still-use-the-5e-shaped-sheet" rel="nofollow">https://app.roll20.net/forum/post/10191536/does-anyone-still-use-the-5e-shaped-sheet</a>
JP said: Whatever changes were made to the backend broke the 5e companion script, possibly permanently.&nbsp; Kryx was able to get the script to find the character sheet again, but the monster import at least is still broken.&nbsp; It is not related to a mismatch of script and sheet. Very disappointing. <a href="https://app.roll20.net/forum/post/10191536/does-anyone-still-use-the-5e-shaped-sheet" rel="nofollow">https://app.roll20.net/forum/post/10191536/does-anyone-still-use-the-5e-shaped-sheet</a> I got the Shaped Sheet to work with Oosh's fix... for a few minutes. Long enough to import a monster by dragging a compendium monster to the table, where it created a character and correction pulled the stats into a new character sheet. But a few minutes later the API detected an infinite loop and self-terminated. Disabling Oosh's 5eCompanionScriptModded (along with all the other Companion Script versions) ended the error... but left me sad, and without all that sweet companion script functionality. (The groans on my players last night when I told them they had to track and apply their rolled hit dice and ability usage and reset them manually on a short rest! Kid - lemme tell ya... BACK IN MY DAY...)
John P said: JP said: Whatever changes were made to the backend broke the 5e companion script, possibly permanently.&nbsp; Kryx was able to get the script to find the character sheet again, but the monster import at least is still broken.&nbsp; It is not related to a mismatch of script and sheet. Very disappointing. <a href="https://app.roll20.net/forum/post/10191536/does-anyone-still-use-the-5e-shaped-sheet" rel="nofollow">https://app.roll20.net/forum/post/10191536/does-anyone-still-use-the-5e-shaped-sheet</a> I got the Shaped Sheet to work with Oosh's fix... for a few minutes. Long enough to import a monster by dragging a compendium monster to the table, where it created a character and correction pulled the stats into a new character sheet. But a few minutes later the API detected an infinite loop and self-terminated. Use Kryx's updated version from <a href="https://app.roll20.net/forum/post/10191536/does-anyone-still-use-the-5e-shaped-sheet/?pageforid=10197792#post-10197792" rel="nofollow">https://app.roll20.net/forum/post/10191536/does-anyone-still-use-the-5e-shaped-sheet/?pageforid=10197792#post-10197792</a> I'm no longer experiencing infinite loops, but it won't roll HP, and you can't add new monsters, though it does work with most other functionalities. The workaround for adding new creatures is a little bit convoluted, but make a new game and have Roll20 5e OGL sheet chosen. Then you add whatever creatures you want and use the Transmogrifier to copy them to your main game. You will have to add in the text for features (easy copy/paste work) and potentially some spells, but it's still far less work than "from the ground up" approach.
1625028629
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
John P said: (The groans on my players last night when I told them they had to track and apply their rolled hit dice and ability usage and reset them manually on a short rest! Kid - lemme tell ya... BACK IN MY DAY...) If you do wind up making the switch, there are three long/short Rest management scripts for the&nbsp;D&amp;D 5th Edition by Roll20 Sheet in the One Click. Each is a little different, but they will probably fill the hole to some degree.
Is there an importer/converter for the Roll20 sheet from the shaped sheet? It doesn't look like there is a monster/spell importer for this sheet like there is for the shaped sheet, so if there isn't a converter then I assume all my custom monsters and spells will be lost unless I re-create them from scratch?
1625069279
GiGs
Pro
Sheet Author
API Scripter
I dont believe there is. Also, bear in mind when switching character sheet for a campaign, it's better to start a new campaign, and manually recreate everything - because otherwise every sheet will be bogged down with unused attributes from the old character sheet. This is a lot of work so I wouldn't be surprised if you didn't do it. But for npcs and monsters, if it's not too much trouble, it's better to delete their old sheets and create new ones after the sheet has been changed, to guarantee they don't have a bunch of unused attributes in them.
Thanks for the response gigs. So type everything again from scratch to convert, and no handy monster and spell importer like the shaped sheet. Uggh. I’m assuming custom monsters and spells aren’t supported either. I’m remembering why I never wanted to switch… @john p the monster import I was referring to was not the compendium add but rather using the !shaped-monsters or !shaped-statblock to add. @kasper n. Thanks for the workaround.&nbsp;