MrVauxs / pf2e-jb2a-macros

Discord: @vauxs
GNU General Public License v3.0
11 stars 27 forks source link

Issue on registering settings #20

Closed Glunty closed 2 years ago

Glunty commented 2 years ago

Hello, I think the hook used here is not the one to use : https://github.com/MrVauxs/pf2e-jb2a-macros/blob/fa6a52ef00d41138719354fe66fef969c73e3b82/module/module.js#L3

I get this message when I load the world image

Perhaps "pf2e.systemReady" instead of "init" ?

Configuration : Foundry V10.285 System : PF2E 4.0.0-beta3 pf2e-jb2e-macros : 1.11.1

MrVauxs commented 2 years ago

The error you copied refers to the on renderSettings hook, rather than the init.

https://github.com/MrVauxs/pf2e-jb2a-macros/blob/fa6a52ef00d41138719354fe66fef969c73e3b82/module/module.js#L78

Not sure why you are getting that error, certainly unable to reproduce it.

MrVauxs commented 2 years ago

Did this error happen when entering the world as a player?

Glunty commented 2 years ago

Yes my bad it is on renderSettings. Happens when I'm entering world as GM.

I put a debug point to be sure what setting was causing the error stack, it is the set of smallTokenScale done line 79.

It's weird, seems like on my installation the hook for renderSettings is called before the game is ready.

MrVauxs commented 2 years ago

Yeah that is certainly strange. Does it happen without any other modules on? If not, check what other modules may be interacting with PF2e x JB2A Macros.

Glunty commented 2 years ago

It doesnt matter if I have only this module or others, happens all the time.

I'll do complementary tests when I get some time to restore my dev environment (It is broken since the PF2E github migration :) ). Meanwhile, it doesn't have any impact and I can live with a stack trace in the logs.

MrVauxs commented 2 years ago

This should hopefully be fixed by moving from renderSettings to ready.

Glunty commented 2 years ago

No stack anymore with the new version