Yikes! 14 to 15 Upgrade with Edge selected in Advanced Settings = DEATH!

Probably another check the script needs to make - I started an upgrade on a box last night and I didn’t know Edge was enabled (another Admin did it for a Module and didn’t turn it off!).

Fast Forward and it blew up completely - framework update crashed, and because it is the lynch-pin for every other module, I ended up with a dead box - no asterisk, broken GUI hung on Modules to install and no connection to Asterisk (which would crash on fwconsole start,

In case somebody else makes this (stupid but innocent) mistake, here is what I had to do to fix it:

Updating framework died very spectacularly with this error:

PHP Fatal error: Call to a member function writeln() on string in /var/www/html/admin/modules/framework/install.php on line 38
Whoops\Exception\ErrorException: Call to a member function writeln() on string in file /var/www/html/admin/modules/framework/install.php on line 38
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/html/admin/modules/framework/install.php:38

Found this post: Freepbx 14 to 15 upgrade tool stops - Distro Discussion & Help - FreePBX Community Forums

But their solution did not work for me at all :frowning:

Looking at the console it was saying that it was bombing on line 38 - Here is the section from /var/www/html/admin/modules/framework/install.php that was crashing:

}
$engine_info = engine_getinfo();
$astversion = $engine_info['version'];
if (version_compare($astversion, "13", "lt") || version_compare($astversion, "19", "ge")) {
        out(sprintf(_("<error>Error!</error>")));
        out(sprintf(_("<error>Unsupported Version of %s </error>"), $astversion));
        out(sprintf(_("<error>Supported Asterisk versions: 13, 14, 15, 16, 17, 18</error>")));
        exit(1);
}

I had installed (and verified) Asterisk 18 before I started the upgrade, so I commented out the check like so:

}
$engine_info = engine_getinfo();
$astversion = $engine_info['version'];
//if (version_compare($astversion, "13", "lt") || version_compare($astversion, "19", "ge")) {
//        out(sprintf(_("<error>Error!</error>")));
//        out(sprintf(_("<error>Unsupported Version of %s </error>"), $astversion));
//        out(sprintf(_("<error>Supported Asterisk versions: 13, 14, 15, 16, 17, 18</error>")));
//        exit(1);
//}

and then did a fwconsole ma install framework and it finally completed successfully! Fix the file back and then install the rest of the broken/disabled modules and life was good - In researching that error, I found several posts that said it was hopeless - it’s not. Hopefully this will help someone that borks their machine like I did.

I do think the upgrade script should check for Edge though…

And this is why the Edge repo needs not to be the go to answer for people to get bug fixes before QA is finished. Edge should be used for testing only.

If bug fixes are so urgent to get to the masses, streamline QA and push to Stable faster.

1 Like

Yeah - I feel bad (although I suffered for it) for not checking, it just never occurred to me to check it before I started - I have done so many 14-15 upgrades, and this is the first problem I have had - live and learn.

Personally, I agree with a streamlined testing process being needed.

But from the FreePBX point of view there is a very easy answer to this. Make edge one time only ALWAYS.

Since I only ever do things from the CLI, this is normal to me.

sudo fwconsole ma upgrade wtfevermodule --edge

It is a one shot, and affects nothing else.

The GUI should do that always with no option to override and be “always” on edge.

2 Likes

Very much agreed - That is 5 hours of my life I am never getting back - AND a grumpy customer this morning because some of the settings changed (FM/FM got turned on for every extension, CW got turned OFF for every extension - annoying!).

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.