Issue Description:
Running into some huge issue here. The new HearthArena client has ton of windows, however every now and then a single window (rarely more) don’t show up (I am not sure if this is an issue bound to Hearthstone). By now I’ve had this happen which pretty much any in-game window. I see the not-shown windows in localhost:54284 , i can even go into that window’s devtools and call getCurrentWindow and retrieve the ‘expected’ result as if it is being shown (size/position/state are all correct).
I tried hiding, minimizing, restoring, obtaining, resizing, repositioning, bringToFront etc but nothing seems to be bring the window in-game expect for completely closing the window (using overwolf.windows.close() and obtaining/restoring). Note: I also tried thinks like giving the windows a red background etc. to see if it is CSS that prevents the windows from showing.
The issue seems to happen in about 1/20th of the cases for me where at least one window doesn’t end up showing.
Although I am not 100% on this, I think I even experienced a window “A” showing up in window’s “B” position, while window “B” was no where to be seen.
Steps to reproduce:
Until I have a client to test which is not bound to my local dev this will be hard to reproduce on another system.
Do you currently have a workaround?
Until I find out what is going wrong, no.
The issue might be that internally in OW window API there are some issues when you are obtaining or restoring multiple windows simultaneously. For example, when one uses obtainDeclaredWindow() a second time before the first obtainDeclaredWindow callback is triggered.
Maybe some internal variables are overwritten or shared while they shouldn’t be?
Impact of this issue on the app
Huge
Workaround:
Currently trying to figure out what exactly makes this happen. When I overwolf.windows.close() and obtain/restore windows this seems to happen in 1/20th of the time but in all my use-cases I am triggering multiple obtain/restore API calls in parallel. So instead of
overwolf.obtainDeclaredWindow(A)
overwolf.obtainDeclaredWindow of A is returned
overwolf.obtainDeclaredWindow(B)
overwolf.obtainDeclaredWindow of B is returned
things might go
overwolf.obtainDeclaredWindow(A)
overwolf.obtainDeclaredWindow(B)
overwolf.obtainDeclaredWindow of A is returned
overwolf.obtainDeclaredWindow of B is returned