InfraredAces / FVTT-5e-custom-currency

MIT License
1 stars 3 forks source link

Module has stopped working entirely with update #4

Closed Almaity closed 3 years ago

Almaity commented 3 years ago

Character sheets display the default names of currencies, no idea if the conversions work as they should. I cannot modify anything regarding the module as it no longer shows up the module settings. I've had the module running normally for several months now, so it didn't even keep the old settings after it vanished from the settings menu with the latest update.

Disabling all other modules doesn't change anything.

image

InfraredAces commented 3 years ago

Can you provide a copy of the console log on loading the page?

Almaity commented 3 years ago

Here's the line that stands out to me:

"22:07:47.550 Uncaught SyntaxError: redeclaration of function patch_currencyConversion 5e-custom-currency.js:68:16note: Previously declared at line 39, column 165e-custom-currency.js:39:16"

Full log:

22:07:47.337 Welcome to the Forge! forgevtt-module.js:60:21
22:07:47.549 Foundry VTT | Registered callback for init hook foundry.js:91:13
22:07:47.549 Foundry VTT | Registered callback for setup hook foundry.js:91:13
22:07:47.549 Foundry VTT | Registered callback for ready hook foundry.js:91:13
22:07:47.549 Foundry VTT | Registered callback for canvasInit hook foundry.js:91:13
22:07:47.549 Foundry VTT | Registered callback for renderChatMessage hook foundry.js:91:13
22:07:47.550 Foundry VTT | Registered callback for getChatLogEntryContext hook foundry.js:91:13
22:07:47.550 Foundry VTT | Registered callback for renderChatLog hook foundry.js:91:13
22:07:47.550 Foundry VTT | Registered callback for renderChatPopout hook foundry.js:91:13
22:07:47.550 Foundry VTT | Registered callback for getActorDirectoryEntryContext hook foundry.js:91:13
22:07:47.550 Uncaught SyntaxError: redeclaration of function patch_currencyConversion
5e-custom-currency.js:68:16note: Previously declared at line 39, column 165e-custom-currency.js:39:16
22:07:47.551 Foundry VTT | Registered callback for renderSettingsConfig hook foundry.js:91:13
22:07:47.551 Foundry VTT | Registered callback for renderModuleManagement hook foundry.js:91:13
22:07:47.551 Foundry VTT | Registered callback for init hook foundry.js:91:13
22:07:47.553 _______________________________________________________________
 _____ ___  _   _ _   _ ____  ______   __ __     _______ _____ 
|  ___/ _ \| | | | \ | |  _ \|  _ \ \ / / \ \   / |_   _|_   _|
| |_ | | | | | | |  \| | | | | |_) \ V /   \ \ / /  | |   | |  
|  _|| |_| | |_| | |\  | |_| |  _ < | |     \ V /   | |   | |  
|_|   \___/ \___/|_| \_|____/|_| \_\|_|      \_/    |_|   |_|  
=============================================================== foundry.js:53165:11
22:07:47.553 Foundry VTT | Reestablishing existing session d43876ec6a8765dfdb7d0f28 foundry.js:53175:11
22:07:47.849 Foundry VTT | Connected to server socket using session d43876ec6a8765dfdb7d0f28 foundry.js:4085:17
22:07:51.292 Foundry VTT | Initializing Foundry Virtual Tabletop Game foundry.js:4188:13
22:07:51.292 Foundry VTT | Registered callback for renderSetupConfigurationForm hook foundry.js:91:13
22:07:51.293 Foundry VTT | Registered callback for renderSettings hook foundry.js:91:13
22:07:51.293 Foundry VTT | Registered callback for renderMainMenu hook foundry.js:91:13
22:07:51.293 Foundry VTT | Registered callback for renderPlayerList hook foundry.js:91:13
22:07:51.293 Foundry VTT | Registered callback for renderInvitationLinks hook foundry.js:91:13
22:07:51.293 Foundry VTT | Registered callback for createToken hook foundry.js:91:13
22:07:51.293 Foundry VTT | Registered callback for updateToken hook foundry.js:91:13
22:07:51.293 Foundry VTT | Registered callback for createActor hook foundry.js:91:13
22:07:51.293 Foundry VTT | Registered callback for updateActor hook foundry.js:91:13
22:07:51.293 Foundry VTT | Registered callback for createJournalEntry hook foundry.js:91:13
22:07:51.293 Foundry VTT | Registered callback for updateJournalEntry hook foundry.js:91:13
22:07:51.294 Foundry VTT | Registered callback for createChatMessage hook foundry.js:91:13
22:07:51.294 Foundry VTT | Registered callback for canvasInit hook foundry.js:91:13
22:07:51.294 Foundry VTT | Unregistered callback for init hook foundry.js:132:13
22:07:51.295 DnD5e | Initializing the DnD5e Game System
_______________________________
______      ______ _____ _____
|  _  \___  |  _  \  ___|  ___|
| | | ( _ ) | | | |___ \| |__
| | | / _ \/\ | | |   \ \  __|
| |/ / (_>  < |/ //\__/ / |___
|___/ \___/\/___/ \____/\____/
_______________________________ dnd5e.js:48:11
22:07:51.295 Foundry VTT | Unregistered callback for init hook foundry.js:132:13
22:07:51.414 Foundry VTT | Loaded localization file https://assets.forge-vtt.com/bazaar/modules/tidy-ui_game-settings/0.1.23/langs/en.json foundry.js:3494:15
22:07:51.415 Foundry VTT | Synchronized official game time in 62ms foundry.js:1457:13
22:07:51.415 Foundry VTT | Retrieved and compiled template systems/dnd5e/templates/actors/parts/active-effects.html foundry.js:3591:16
22:07:51.415 Foundry VTT | Retrieved and compiled template systems/dnd5e/templates/actors/parts/actor-traits.html foundry.js:3591:16
22:07:51.424 Foundry VTT | Retrieved and compiled template systems/dnd5e/templates/actors/parts/actor-inventory.html foundry.js:3591:16
22:07:51.424 Foundry VTT | Retrieved and compiled template systems/dnd5e/templates/actors/parts/actor-features.html foundry.js:3591:16
22:07:51.425 Foundry VTT | Retrieved and compiled template systems/dnd5e/templates/actors/parts/actor-spellbook.html foundry.js:3591:16
22:07:51.425 Foundry VTT | Retrieved and compiled template systems/dnd5e/templates/actors/parts/actor-warnings.html foundry.js:3591:16
22:07:51.426 Foundry VTT | Retrieved and compiled template systems/dnd5e/templates/items/parts/item-action.html foundry.js:3591:16
22:07:51.426 Foundry VTT | Retrieved and compiled template systems/dnd5e/templates/items/parts/item-activation.html foundry.js:3591:16
22:07:51.426 Foundry VTT | Retrieved and compiled template systems/dnd5e/templates/items/parts/item-description.html foundry.js:3591:16
22:07:51.426 Foundry VTT | Retrieved and compiled template systems/dnd5e/templates/items/parts/item-mountable.html foundry.js:3591:16
22:07:51.544 Foundry VTT | Loaded localization file lang/en.json foundry.js:3494:15
22:07:51.730 Foundry VTT | Loaded localization file systems/dnd5e/lang/en.json foundry.js:3494:15
22:07:51.736 Foundry VTT | Unregistered callback for setup hook foundry.js:132:13
22:07:55.133 Foundry VTT | Prepared World Documents in 3392ms foundry.js:4336:13
22:07:55.139 Foundry VTT | Rendering SceneNavigation foundry.js:2033:15
22:07:55.152 Foundry VTT | Rendering Notifications foundry.js:2033:15
22:07:55.152 Foundry VTT | Rendering Sidebar foundry.js:2033:15
22:07:55.152 Foundry VTT | Rendering PlayerList foundry.js:2033:15
22:07:55.153 Foundry VTT | Rendering Hotbar foundry.js:2033:15
22:07:55.153 Foundry VTT | Rendering Pause foundry.js:2033:15
22:07:55.153 Foundry VTT | Rendering SceneControls foundry.js:2033:15
22:07:55.175 Foundry VTT | Document fonts loaded and ready foundry.js:4442:15
22:07:55.178 WebGL context was lost. utils.min.js:8:1488
22:07:55.218 PixiJS 6.0.4 - WebGL 2 - http://www.pixijs.com/ utils.min.js:8:1056
22:07:55.221 Foundry VTT | Viewing Scene Underwater foundry.js:15480:15
22:07:55.221 Foundry VTT | Drawing game canvas for scene Underwater foundry.js:17480:13
22:07:56.192 Foundry VTT | Retrieved and compiled template templates/hud/navigation.html foundry.js:3591:16
22:07:56.211 Foundry VTT | Retrieved and compiled template templates/sidebar/sidebar.html foundry.js:3591:16
22:07:56.219 Foundry VTT | Rendering ActorDirectory foundry.js:2033:15
22:07:56.220 Foundry VTT | Rendering ChatLog foundry.js:2033:15
22:07:56.220 Foundry VTT | Rendering CombatTracker foundry.js:2033:15
22:07:56.220 Foundry VTT | Rendering CompendiumDirectory foundry.js:2033:15
22:07:56.220 Foundry VTT | Rendering ItemDirectory foundry.js:2033:15
22:07:56.221 Foundry VTT | Rendering JournalDirectory foundry.js:2033:15
22:07:56.221 Foundry VTT | Rendering PlaylistDirectory foundry.js:2033:15
22:07:56.223 Foundry VTT | Rendering SceneDirectory foundry.js:2033:15
22:07:56.224 Foundry VTT | Rendering Settings foundry.js:2033:15
22:07:56.224 Foundry VTT | Rendering RollTableDirectory foundry.js:2033:15
22:07:56.227 Foundry VTT | Retrieved and compiled template templates/user/players.html foundry.js:3591:16
22:07:56.239 Foundry VTT | Retrieved and compiled template templates/hud/hotbar.html foundry.js:3591:16
22:07:56.252 Foundry VTT | Retrieved and compiled template templates/hud/pause.html foundry.js:3591:16
22:07:56.258 Foundry VTT | Retrieved and compiled template templates/hud/controls.html foundry.js:3591:16
22:07:56.584 Foundry VTT | Retrieved and compiled template templates/sidebar/actors-directory.html foundry.js:3591:16
22:07:56.620 Foundry VTT | Retrieved and compiled template templates/sidebar/chat-log.html foundry.js:3591:16
22:07:56.629 Foundry VTT | Retrieved and compiled template templates/sidebar/combat-tracker.html foundry.js:3591:16
22:07:56.650 Foundry VTT | Retrieved and compiled template templates/sidebar/compendium-directory.html foundry.js:3591:16
22:07:56.660 Foundry VTT | Retrieved and compiled template templates/sidebar/items-directory.html foundry.js:3591:16
22:07:56.683 Foundry VTT | Retrieved and compiled template templates/sidebar/journal-directory.html foundry.js:3591:16
22:07:56.697 Foundry VTT | Retrieved and compiled template templates/sidebar/playlists-directory.html foundry.js:3591:16
22:07:56.731 Foundry VTT | Retrieved and compiled template templates/sidebar/scenes-directory.html foundry.js:3591:16
22:07:56.766 Foundry VTT | Retrieved and compiled template templates/sidebar/settings.html foundry.js:3591:16
22:07:56.773 Foundry VTT | Retrieved and compiled template templates/sidebar/tables-directory.html foundry.js:3591:16
22:07:58.552 Foundry VTT | Retrieved and compiled template templates/sidebar/chat-message.html foundry.js:3591:16
22:08:01.336 Foundry VTT | Retrieved and compiled template templates/dice/tooltip.html foundry.js:3591:16
22:08:04.577 Foundry VTT | Retrieved and compiled template templates/dice/roll.html foundry.js:3591:16
22:08:07.526 Foundry VTT | Loaded icons/svg/cowled.svg (2%) foundry.js:35153:13
22:08:07.540 Foundry VTT | Loaded icons/svg/light-off.svg (4%) foundry.js:35153:13
22:08:07.542 Foundry VTT | Loaded icons/svg/sound-off.svg (6%) foundry.js:35153:13
22:08:07.545 Foundry VTT | Loaded icons/svg/combat.svg (8%) foundry.js:35153:13
22:08:07.550 Foundry VTT | Loaded icons/svg/aura.svg (10%) foundry.js:35153:13
22:08:07.552 Foundry VTT | Loaded icons/svg/falling.svg (12%) foundry.js:35153:13
22:08:07.560 Foundry VTT | Loaded icons/svg/door-open-outline.svg (14%) foundry.js:35153:13
22:08:07.561 Foundry VTT | Loaded icons/svg/blood.svg (16%) foundry.js:35153:13
22:08:07.568 Foundry VTT | Loaded icons/svg/wing.svg (18%) foundry.js:35153:13
22:08:07.572 Foundry VTT | Loaded icons/svg/upgrade.svg (20%) foundry.js:35153:13
22:08:07.581 Foundry VTT | Loaded icons/svg/downgrade.svg (22%) foundry.js:35153:13
22:08:07.585 Foundry VTT | Loaded icons/svg/padlock.svg (24%) foundry.js:35153:13
22:08:07.588 Foundry VTT | Loaded icons/svg/silenced.svg (27%) foundry.js:35153:13
22:08:07.600 Foundry VTT | Loaded icons/svg/paralysis.svg (29%) foundry.js:35153:13
22:08:07.602 Foundry VTT | Loaded icons/svg/sleep.svg (31%) foundry.js:35153:13
22:08:07.618 Foundry VTT | Loaded icons/svg/net.svg (33%) foundry.js:35153:13
22:08:07.619 Foundry VTT | Loaded icons/svg/biohazard.svg (35%) foundry.js:35153:13
22:08:07.623 Foundry VTT | Loaded icons/svg/door-secret-outline.svg (37%) foundry.js:35153:13
22:08:07.629 Foundry VTT | Loaded icons/svg/poison.svg (39%) foundry.js:35153:13
22:08:07.637 Foundry VTT | Loaded icons/svg/explosion.svg (41%) foundry.js:35153:13
22:08:07.643 Foundry VTT | Loaded icons/svg/regen.svg (43%) foundry.js:35153:13
22:08:07.644 Foundry VTT | Loaded icons/svg/fire.svg (45%) foundry.js:35153:13
22:08:07.649 Foundry VTT | Loaded icons/svg/degen.svg (47%) foundry.js:35153:13
22:08:07.650 Foundry VTT | Loaded icons/svg/door-closed-outline.svg (49%) foundry.js:35153:13
22:08:07.650 Foundry VTT | Loaded icons/svg/daze.svg (51%) foundry.js:35153:13
22:08:07.651 Foundry VTT | Loaded icons/svg/light.svg (53%) foundry.js:35153:13
22:08:07.657 Foundry VTT | Loaded icons/svg/unconscious.svg (55%) foundry.js:35153:13
22:08:07.657 Foundry VTT | Loaded icons/svg/radiation.svg (57%) foundry.js:35153:13
22:08:07.658 Foundry VTT | Loaded icons/svg/sun.svg (59%) foundry.js:35153:13
22:08:07.663 Foundry VTT | Loaded icons/svg/deaf.svg (61%) foundry.js:35153:13
22:08:07.674 Foundry VTT | Loaded icons/svg/lightning.svg (63%) foundry.js:35153:13
22:08:07.675 Foundry VTT | Loaded icons/svg/frozen.svg (65%) foundry.js:35153:13
22:08:07.676 Foundry VTT | Loaded icons/svg/acid.svg (67%) foundry.js:35153:13
22:08:07.676 Foundry VTT | Loaded icons/svg/door-locked-outline.svg (69%) foundry.js:35153:13
22:08:07.676 Foundry VTT | Loaded icons/svg/eye.svg (71%) foundry.js:35153:13
22:08:07.677 Foundry VTT | Loaded icons/svg/up.svg (73%) foundry.js:35153:13
22:08:07.677 Foundry VTT | Loaded icons/svg/down.svg (76%) foundry.js:35153:13
22:08:07.677 Foundry VTT | Loaded icons/svg/sound.svg (78%) foundry.js:35153:13
22:08:07.678 Foundry VTT | Loaded icons/svg/blind.svg (80%) foundry.js:35153:13
22:08:07.685 Foundry VTT | Loaded icons/svg/terror.svg (82%) foundry.js:35153:13
22:08:07.685 Foundry VTT | Loaded icons/svg/target.svg (84%) foundry.js:35153:13
22:08:07.691 Foundry VTT | Loaded icons/svg/angel.svg (86%) foundry.js:35153:13
22:08:07.692 Foundry VTT | Loaded icons/svg/fire-shield.svg (88%) foundry.js:35153:13
22:08:07.693 Foundry VTT | Loaded icons/svg/ice-shield.svg (90%) foundry.js:35153:13
22:08:07.697 Foundry VTT | Loaded icons/svg/mage-shield.svg (92%) foundry.js:35153:13
22:08:07.698 Foundry VTT | Loaded icons/svg/holy-shield.svg (94%) foundry.js:35153:13
22:08:08.177 Foundry VTT | Loaded icons/svg/skull.svg (96%) foundry.js:35153:13
22:08:08.178 Foundry VTT | Loaded icons/svg/skull.svg (98%) foundry.js:35153:13
22:08:08.227 Foundry VTT | Loaded https://assets.forge-vtt.com/5ff0e7cc99f31aed882a1209/Props/Scenes/underwater%20vents.jpg (100%) foundry.js:35153:13
22:08:08.315 Foundry VTT | Rendering HeadsUpDisplay foundry.js:2033:15
22:08:08.369 Foundry VTT | Unregistered callback for ready hook foundry.js:132:13
22:08:08.369 Foundry VTT | Registered callback for hotbarDrop hook foundry.js:91:13
22:08:08.532 Foundry VTT | Retrieved and compiled template templates/hud/hud.html foundry.js:3591:16
22:08:08.719
Some cookies are misusing the recommended “SameSite“ attribute 3
22:08:08.719 Cookie “XSRF-TOKEN” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite forgevtt
22:08:08.769 Cookie “XSRF-TOKEN” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite forgevtt
22:08:08.862 Cookie “XSRF-TOKEN” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite 2 forgevtt
22:08:49.288 Foundry VTT | Rendering ActorSheet5eCharacter foundry.js:2033:15
22:08:49.378 Foundry VTT | Retrieved and compiled template systems/dnd5e/templates/actors/character-sheet.html foundry.js:3591:16
22:08:49.545 Foundry VTT | Retrieved and compiled template templates/app-window.html foundry.js:3591:16
Elmaro commented 3 years ago

I have had this exact problem too. I disabled all modules except for this and I was still unable to see Currency Converter in the module settings.

InfraredAces commented 3 years ago

Are either of you able to access the module folder in the Data folder of Foundry and provide the contents of the scripts\5e-custom-currency.js file? Either that or uninstalling and reinstalling the module.

InfraredAces commented 3 years ago

So the issue seems to be that I declared the same function twice, but looking through what I've got, I only ever declared patch_CurrencyConversion (line 64) in 5e-custom-currency.js .

Almaity commented 3 years ago

I run my games over Forge, not sure how to access the module files directly there.

Anyway, i see you updated the module and it works again in my games :) Thanks man