ACK-J/Port_Authority

GUI breaks after opening a private browsing window

Closed this issue · 2 comments

ACK-J commented

Describe the bug
When opening a private browsing window with Port Authority the GUI switches don't work but functionality of the addon still works.

To Reproduce
Steps to reproduce the behavior:

  1. Open a private browsing window in FF
  2. Open the Port Authority GUI

Expected behavior
The GUI to function normally and the switches to work

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser FF
  • Version 89.0.2

Hi, I can reproduce this problem and it is caused by the code from #6 -

TypeError: can't access property "isListening", bg is null switch.js:12:12
TypeError: can't access property "isNotifying", bg is null notifications.js:8:12

In case I can't find the time to make a pull request: the fix is to not use runtime.getBackgroundPage at all, but instead use runtime.sendMessage in the popup and do the background page stuff in a runtime.onMessage listener in the background page.

ACK-J commented

Thank @laniakea64, nice find. If you have the time to make a PR that would be appreciated but if not one of these days I will find time to get to it.