TheLexoPlexx

Permissions not registering properly?

Recommended Posts

Hey there,

My manifest.json contains the permission array with "Profile", "GameInfo", "FileSystem", and some other stuff.. However, when I try to execute something requiring those permissions. I get notified, that I did not set those permissions.
This only happens in my "Options"-Window, not my main window.

Share this post


Link to post
Share on other sites

Seems to happen to any secondary window, yet it doesn't interfere with the correct operation of the app in any way, as far I can tell, still a bug tho.

Edited by goodbyte

Share this post


Link to post
Share on other sites
2 hours ago, goodbyte said:

Seems to happen to any secondary window, yet it doesn't interfere with the correct operation of the app in any way, as far I can tell, still a bug tho.

It does, sadly, interfere with the correct operation of the app.

Image:

Unbenannt.png

Edited by TheLexoPlexx
Added Image

Share this post


Link to post
Share on other sites

Are you using overwolf.windows.openOptionsPage() to open it?
If so maybe try to define it as a regular Window and open it regularly instead and see if that works.
I don't have any experience with the overwolf.io stuff so im just guessing here.

EDIT:
If it just plainly is not possible to use it from another window than the main-window, then you might work around it with the overwolf.windows.sendMessage() functionality to set up an event handler within your main-window that listens for a certain message to write the content of that message to the appropriate file.

Seems like you're trying to write some settings there? If all fails you might store them in the browsers webstorage.

Edited by Colorfulstan

Share this post


Link to post
Share on other sites
11 hours ago, Colorfulstan said:

Are you using overwolf.windows.openOptionsPage() to open it?
If so maybe try to define it as a regular Window and open it regularly instead and see if that works.
I don't have any experience with the overwolf.io stuff so im just guessing here.

EDIT:
If it just plainly is not possible to use it from another window than the main-window, then you might work around it with the overwolf.windows.sendMessage() functionality to set up an event handler within your main-window that listens for a certain message to write the content of that message to the appropriate file.

Seems like you're trying to write some settings there? If all fails you might store them in the browsers webstorage.

Yes, I used overwolf.windows.openOptionsPage() to open it. I replaced it and made the options window a regular window, however, this gives the same result.

Using overwolf.windows.sendMessage() sounds like a good idea, however, the permissions should be set globally and I would still get the errors right?
Yes, I am writing something to a file here, another reason where the sendMessage would sadly not solve the problem. If all fails, I might be thinking about saving it into the browser, however. I don't know anything about the browser itself and the permission-problem itself would not be solved. Thanks for all your help anyways!

Share this post


Link to post
Share on other sites
5 hours ago, TheLexoPlexx said:

Yes, I used overwolf.windows.openOptionsPage() to open it. I replaced it and made the options window a regular window, however, this gives the same result.

Using overwolf.windows.sendMessage() sounds like a good idea, however, the permissions should be set globally and I would still get the errors right?

If it is working when done by the main-window (start_window in the manifest) then it should work if you send your message to the main-window and let that window handle the file-writing. Permissions schould be global, so that is definetily a bug and that's why im talking about workarounds here, not intended uses.

Would be great if you can add it to the thread for API-bugs.

5 hours ago, TheLexoPlexx said:

Yes, I am writing something to a file here, another reason where the sendMessage would sadly not solve the problem. If all fails, I might be thinking about saving it into the browser, however. I don't know anything about the browser itself and the permission-problem itself would not be solved. Thanks for all your help anyways!

I got that you write to a file im asking about your reason to write to a file in the first place. If it is for storing user-settings as I assume, the webStorage of the Browser is generally good enough and easier to use (expecially over multiple windows).

The Overwolf Browser is built on top of Chromium, which means you can basically treat it like a Chrome Browser. All app-windows are basically modified browser-tabs, so you got your basic global browser objects like ```location```, ```window``` etc.

Edited by Colorfulstan

Share this post


Link to post
Share on other sites
19 hours ago, Colorfulstan said:

If it is working when done by the main-window (start_window in the manifest) then it should work if you send your message to the main-window and let that window handle the file-writing. Permissions schould be global, so that is definetily a bug and that's why im talking about workarounds here, not intended uses.

Would be great if you can add it to the thread for API-bugs.

I got that you write to a file im asking about your reason to write to a file in the first place. If it is for storing user-settings as I assume, the webStorage of the Browser is generally good enough and easier to use (expecially over multiple windows).

The Overwolf Browser is built on top of Chromium, which means you can basically treat it like a Chrome Browser. All app-windows are basically modified browser-tabs, so you got your basic global browser objects like ```location```, ```window``` etc.

Oh, okay. I misunderstood your "messaging-workaround" a bit. Sure, that could work.
Yes, I will add it and thanks for your help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now