Skip to content

Receive "The page url is not valid" error notification when trying to access archive of website tab that is not loading. #102

@kbailey4444

Description

@kbailey4444

System

  • OS name: Debian
  • OS version: 12
  • Browser name: Firefox
  • Browser version: 130.0.1
  • Extension version: 6.1.1

Bug description

When trying to access the archive of the current tab when the website isn't loading, I receive the error notification stating "The page url is not valid". This mostly happens when trying to load a website that is experiencing an unexpected increase in traffic and is likely not returning a response.

Step 1. Try to access a website that is not loading.
Step 2. Click the extension icon in the tool bar. Make sure "Tab" is selected vs "URL"
Step 3. Click one of the engines, e.g. "Wayback Machine" or "Google".
Step 4. Receive error notification "The page url is not valid".

Debugging

I did some light debugging of the code to try to understand why this happens.
The relevant code appears to be in onActionPopupClick

async function onActionPopupClick(engine, docUrl) {

By logging the values of docUrl and tab.url in the function i get empty string for docUrl and "about:blank" for tab.url.
Meaning that OnActionClick will be passed "about:blank"

onActionClick(session, docUrl || tab.url);

Eventually searchDocument will be passed "about:blank"

async function searchDocument(session, doc, firstBatchItem = true) {

Where it will call validateUrl on the string. Since "about:blank" isn't a valid url with http https or ftp protocols used, it shows the
notification.
await showNotification({messageId: 'error_invalidPageUrl'});

How to Fix

So basically I expected the string in the address bar to be passed to the extension, but rather the url of the previously loaded page appears to be passed.

To fix this I guess it could be changed so that the url in the address bar could be passed.
However that may break user's existing expectations in other contexts.
Should the code just stay as is and the user be expected to enter the url in the extension when the page isn't loading?

Any ideas on how to approach fixing this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions