Avoiding "The address isn't valid" for custom about: pages?

My extension has a custom about:URL page which I always pin. When restarting the browser the page shows up as “The address isn’t valid” until I manually refresh it.

Does anyone know how to get this to load correctly on browser restart? I’m assuming the message is shown because the extension is loaded after the app tab wants to load. I tried looking how the native about:URL windows loaded correctly, but I couldn’t find how they did it.

How are you initialising your addon? There might be a way to make it load earlier. I don’t know if it is possible to make it load early enough, but I think that’s going to be your easiest answer. Otherwise you might rewrite the addon to pin itself in a tab at startup.

I don’t have any initialization functions so maybe that’s the issue? I’m using the SDK so I thought it handled that by itself. I do have a function to register the remotepages using

exports.main = function(options, callbacks) {
    if (options.loadReason == "install") {
        factory = new Factory(AboutCAEJobs);
        registerRemotePages();
    } else if (options.loadReason == "startup") {
        factory = new Factory(AboutCAEJobs);
        registerRemotePages();
    }
};

This was added since the pages were not working at all after upgrading without restarting.

I’d rather not force all users to have the pages pinned, but maybe I could check all pinned tabs during my startup function and force a refresh. I’ll try that for now.

For reference adding this is working.

        for each (var tab in tabs) {
          if (tab.url == "about:caejobs") {
            tab.reload();
          }
        }

The above code doesn’t work as of FF45. Haven’t found a work around yet or why it stopped working.

When I add a statement to print each open tab at startup the about: tab isn’t listed so it seems like it is running the code before the tab is “ready”

I had the same exact problem. My custom about page worked in everything except the latest nightly. I found the only way to make it work was to NOT include the flag URI_MUST_LOAD_IN_CHILD and instead use the flag URI_CAN_LOAD_IN_CHILD, it was very weird. https://github.com/Noitidart/Profilist/blob/master/bootstrap.js#L67-L116

Based on your comment I tried several things to try to get mine to work again, but have been unsuccessful. I found this bug, and posted a comment since it seems to be related. https://bugzilla.mozilla.org/show_bug.cgi?id=1215793

This syntax for each is deprecated. Not related to the issue though.