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

Scripts suddenly broke. removing and reinstalling didnt help

1730901512

Edited 1730901559
Grim
Pro
Hello! Last night was my session 0 and before session all scripts were working. During session they broke and disabling didnt narrow it down. I uninstalled and reinstalled with no luck. Here is the error I was given. Thoughts? Error: Sheet worker error: Cannot destructure property 'pathname' of 'location2' as it is undefined. TypeError: Cannot destructure property 'pathname' of 'location2' as it is undefined. at createCurrentLocation (eval at self.onmessage (eval at toFunction (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:11:2)), <anonymous>:49022:13) at useHistoryStateNavigation (eval at self.onmessage (eval at toFunction (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:11:2)), <anonymous>:49111:14) at createWebHistory (eval at self.onmessage (eval at toFunction (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:11:2)), <anonymous>:49178:31) at eval (eval at self.onmessage (eval at toFunction (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:11:2)), <anonymous>:50622:14) at eval (eval at self.onmessage (eval at toFunction (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:11:2)), <anonymous>:6:66) at eval (eval at self.onmessage (eval at toFunction (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:11:2)), <anonymous>:7:3) at self.onmessage (eval at toFunction (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:11:2), <anonymous>:9:25) at process.<anonymous> (/home/node/d20-api-server/node_modules/tiny-worker/lib/worker.js:65:55) at process.emit (node:events:517:28) at emit (node:internal/child_process:944:14)
1730905593
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Grimoire! "pathname" is a variable in the script "Token Controller". That might be a good place to start, if you use that. It is also a variable in COGCrew, but that seems less likely. That being said, neither one was updated recently. I'll see what I can find out.
This happened to me when I created a new game using Curse of Strahd module with 2024 character sheet, enabled 2014 sheet in-game, and installed mods. Then I removed the 2014 sheet in-game so that I was left only with the 2024 sheet and went back to game settings to turn 2014 sheet back on since all the NPC sheet use that. Now none of the API scripts I add to the game work, even if I remove all of them and readd. Deleting all scripts and switching back from Experimental API version to Default seemed to finally fix it.
1730935028
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you want better API support, it's best to create the game with the 2014 sheet and add the 2024 sheet rather than the other way around. Also, don't remove the base sheet from a game to replace it with the other. That's almost certainly going to cause problems, time of writing.
I figured out that api scripts were on experimental was the problem but on default they were fine. I tried other games previously created and they had that same problem. Once switched to default I could re add the scripts and they worked as intended. 
oh further adding I dont use token controller. But I deleted all my scripts and was getting the same error regardless of them being there or not. But for the purpose of this conversation, is experimental in the api scripts having to do with jumpgate or 2024 sheets? I never remember having my scripts on experimental previously.
1730951894
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I don't think it's the default, but things are changing very rapidly these days.