Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide n' Seek 4.1.1 #5

Merged
merged 4 commits into from
Feb 25, 2023
Merged

Hide n' Seek 4.1.1 #5

merged 4 commits into from
Feb 25, 2023

Conversation

damianmgarcia
Copy link
Owner

A few days after updating from 4.0.0 to 4.1.0, the Hide n' Seek UI failed to display on Indeed and LinkedIn job search tabs.

This issue persisted even after reloading the tabs. Restarting Chrome resolved this issue, but what was the cause? Two uncaught promise rejection errors in background.js were logged:

  • "No tab with id: ##########."
  • "Frame with ID 0 was removed."

However, I do not know if these errors caused the issue. These errors seem to occur when background.js queries tabs, then tries to inject the content script into applicable tabs, and fails. The cause of the injection failure may be due to the use of an incorrect or obsolete tab id, in which case the tab id must have changed or was lost between tab querying and script injection.

(1) A bug occurred in which the Hide n' Seek UI failed to display on
Indeed and LinkedIn, and then continued to fail to display even after
reloading the tabs. Two uncaught promise rejection errors were logged:

* "No tab with id: ##########."
* "Frame with ID 0 was removed."

Although I am not certain that these errors were the cause of the
missing Hide n' Seek UI, I decided to simply handle rejections by
adding a safeAwait utility function that handles the promises returned
by several Chrome APIs, such as scripting.executeScript,
scripting.insertCSS, etc.
(1) async was removed from the addListener callback because it was
unnecessary.

(2) Removed unnecessary storage arguments from calls to popup start
methods
(1) async was removed from the runtime.onMessage.addListener callback
because it is unnecessary.
@damianmgarcia damianmgarcia merged commit 8e4bb84 into main Feb 25, 2023
@damianmgarcia damianmgarcia deleted the bug-no-tab-id-error branch February 25, 2023 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant