kakaroto / Beyond20

D&D Beyond Character Sheet Integration in Roll20
GNU General Public License v3.0
497 stars 145 forks source link

Native rolls not working with V11 Foundry and DND 2.3.0 #1082

Open DesertEagle50 opened 1 year ago

DesertEagle50 commented 1 year ago

Describe the bug Beyond20 native rolls do not show up on the VTT.

To Reproduce Steps to reproduce the behavior: Enable native rolls roll anything in beyond20

console error message: beyond20.js:71 Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'override') at Beyond20.createActorData (beyond20.js:71:52) at Beyond20.getUpdatedActor (beyond20.js:8:38) at Beyond20.rollItems (beyond20.js:624:34) at Beyond20.handleBeyond20Request (beyond20.js:657:30) at Object.fn (beyond20.js:768:59) at #call (foundry.js:730:20) at Hooks.call (foundry.js:712:38) at handleRoll (fvtt_script.js:4073:35) at HTMLDocument.event (fvtt_script.js:102:9)

Foundry Virtual Tabletop: Version 11 Stable, 11.307 Game System: dnd5e, 2.3.0

cahudson94 commented 1 year ago

Can confirm this happens with both Firefox and Chrome and for my case is a change from Foundry Version 10 - 11.

Aeristoka commented 1 year ago

Can confirm this happens with both Firefox and Chrome and for my case is a change from Foundry Version 10 - 11.

Did you change dnd5e version at the same time?

cahudson94 commented 1 year ago

Can confirm this happens with both Firefox and Chrome and for my case is a change from Foundry Version 10 - 11.

Did you change dnd5e version at the same time?

Not initially, I can try to downgrade and see if that helps.

Aeristoka commented 1 year ago

Can confirm this happens with both Firefox and Chrome and for my case is a change from Foundry Version 10 - 11.

Did you change dnd5e version at the same time?

Not initially, I can try to downgrade and see if that helps.

Might be worth a try, there was some question as to if it was actually the dnd5e system changing something that broke things.

cahudson94 commented 1 year ago

Can confirm this happens with both Firefox and Chrome and for my case is a change from Foundry Version 10 - 11.

Did you change dnd5e version at the same time?

Not initially, I can try to downgrade and see if that helps.

anakreon commented 1 year ago

I'm getting a similar error after upgrading Foundry from 10 to 11 and dnd5e 2.3.1. When trying to roll in DnDBeyond, I get Cannot read properties of undefined (reading '0') in Foundry. Did downgrading anything help?

runegri commented 1 year ago

Hi. I've been seeing the same error after upgrading to Foundry v11-latest and the latest dnd5e system. I tried to downgrade dnd5e to v2.2.2 but I am still seeing the same error.

My chrome log says the following: foundry.js:68202 Cannot read properties of undefined (reading '0') and then it follows up with

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '0')
    at Tokenizer.stateBeforeEntity (home/rune/Foundry/resources/app/node_modules/htmlparser2/lib/Tokenizer.js:584:47)
    at Tokenizer.parse (home/rune/Foundry/resources/app/node_modules/htmlparser2/lib/Tokenizer.js:848:26)
    at Tokenizer.write (home/rune/Foundry/resources/app/node_modules/htmlparser2/lib/Tokenizer.js:159:14)
    at Parser.write (home/rune/Foundry/resources/app/node_modules/htmlparser2/lib/Parser.js:459:28)
    at sanitizeHtml (home/rune/Foundry/resources/app/node_modules/sanitize-html/index.js:588:10)
    at cleanHTML (/home/rune/Foundry/resources/app/dist/database/validators.mjs:1:233)
    at HTMLField.sanitizeHTMLField [as sanitize] (/home/rune/Foundry/resources/app/dist/database/sanitization.mjs:1:1235)
    at ChatMessage._sanitizeFields (/home/rune/Foundry/resources/app/dist/database/backend/server-document.mjs:1:7729)
    at ChatMessage.sanitizeUserInput (/home/rune/Foundry/resources/app/dist/database/backend/server-document.mjs:1:7436)
    at ServerDatabaseBackend._createDocuments (/home/rune/Foundry/resources/app/dist/database/backend/server-backend.mjs:1:2611)