Whenever this code snippet runs, I get an error: "Character Sheet Error: Trying to do setAttrs when no character is active in sandbox." I simplified the example and just wrapped getAttrs and setAttrs in promises, but the problem persists any time I use multiple promises. <input type="text" name="attr_testItem"/> <input type="text" name="attr_testResult"/> <script type="text/worker"> 'use strict'; function _get(valuesArray){ return new Promise((resolve,reject) => { getAttrs(valuesArray,function(values){ console.log(values); resolve(values) }); }); } function _set(values){ console.log('trying set'); console.log(values); return new Promise((resolve,reject) => { setAttrs(values,null,function(){ resolve(); }); }); } on('change:testitem',function(eventInfo){ console.log('change detected.'); _get(['testItem']).then(values => { console.log('.then values - '); console.log(values); _set({ testResult: values.testItem }).then(() => { console.log('set success'); }).catch(err => console.log('set fail. ' + err)); }); }); </script>