obtainDeclaredWindow error with native window and useDefaultSizeAndLocation to true

  • Bug Description:
    overwolf.windows.obtainDeclaredWindow fails with null pointer exception when called with useDefaultSizeAndLocation: true .

No error with useDefaultSizeAndLocation: false or without passing the parameter at all.

More details on this Slack thread: https://overwolfdevs.slack.com/archives/C2NP5F4BV/p1605887133442300

  • impact for my app: [low, mid, high, show-stopper]. High

@dowmeister I was not able to reproduce it.

When I’m calling this from the sample app for example:

let winx = overwolf.windows.obtainDeclaredWindow("in_game",{ useDefaultSizeAndLocation: true },console.log)

I get the ref as expected.

Can you please tell me how to reproduce your issue?

The way to reproduce is described on slack: a native window opened with useDefaultSizeAndLocation at true.

This is the manifest declaration:

"DesktopWindow": {

        "block_top_window_navigation": true,

        "popup_blocker": true,

        "mute": true,

        "resizable": true,

        "file": "build/DesktopWindow.html",

        "override_on_update": true,

        "transparent": true,

        "desktop_only": true,

        "native_window": true,

        "size": {

          "width": 1200,

          "height": 910

        }

To clarify: is it working for you with the same settings just native:false ?

Update: ok, I was able to reproduce the issue for one time, and then I was not… really strange.
I will investigate it more. But it looks like a bug.

Thanks.

Hi,

We added the bug to our backlog for further examination.
Currently, there is no ETA, but I will update you here once the fix is released.

Thanks.

This issue is blocking the new release.

Gilmat reported the Desktop Window opened like this today image because i’m passing “false”.

And i cannot reproduce it, also if uninstalling and reinstalling, the window is always opened correctly.

Should i remove something from Ow Client Cache?

@dowmeister, when I’m changing the DesktopWindow to native: false, everything is working as expected (please test and confirm that too).

So there is an issue with the combo of useDefaultSizeAndLocation: true on native windows.

I will have to forward it to our R&D for a more in-depth examination, as on our tests, it’s worked with native windows.

Thanks for your patience.

@HeeeySusu @Icywave25 FYI

yes, with false it works fine.

After talked also with Gal, i’ll make it not native and pass it true to avoid problems on sizing and positions but in future, when fixed, i would use native windows for desktop ones because it looks better and opens quickly.

Thanks for the support

1 Like