Question

Photo of David Hanson

0

Cannot load Rock Update after upgrading to 8.0 and attempting upgrade to 8.1

Yesterday, I successfully updated to 8.0.  When I attempted to upgrade to 8.1, the process timed out.  I had to FTP into my server and remove the app_offline.htm document, which then allowed me to access my site.  Most things appear to be working fine with the occasional issue on sending out Communications; however, the main issue is that I cannot get back into the Rock Update screen to apply the rest of the updates.  When I click on the link, I receive the following error:


ArgumentException in App_Web_f2mzoeur

Message

There is a malformed 'requires-' tag in a Rock package (1.0.12)

Stack Trace

   at RockWeb.Blocks.Core.RockUpdate.ExtractRequiredVersionFromTags(IPackage package) in d:\inetpub\vhosts\ablazechristian.com\rms.welcomehomechristian.com\Blocks\Core\RockUpdate.ascx.cs:line 653

   at RockWeb.Blocks.Core.RockUpdate.rptPackageVersions_ItemDataBound(Object sender, RepeaterItemEventArgs e) in d:\inetpub\vhosts\ablazechristian.com\rms.welcomehomechristian.com\Blocks\Core\RockUpdate.ascx.cs:line 259

   at System.Web.UI.WebControls.Repeater.OnItemDataBound(RepeaterItemEventArgs e)

   at System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem)

   at System.Web.UI.WebControls.Repeater.AddDataItemsIntoItemsArray(IEnumerable dataSource, Boolean useDataSource)

   at System.Web.UI.WebControls.Repeater.PostGetDataAction(IEnumerable dataSource)

   at System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource)

   at System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e)

   at System.Web.UI.WebControls.Repeater.DataBind()

   at RockWeb.Blocks.Core.RockUpdate.BindGrid() in d:\inetpub\vhosts\ablazechristian.com\rms.welcomehomechristian.com\Blocks\Core\RockUpdate.ascx.cs:line 206

   at RockWeb.Blocks.Core.RockUpdate.OnLoad(EventArgs e) in d:\inetpub\vhosts\ablazechristian.com\rms.welcomehomechristian.com\Blocks\Core\RockUpdate.ascx.cs:line 183

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


I'm not sure what to do and would greatly appreciate any help.


  • Photo of Luke Bennett

    0

    A couple of other members of the community (myself included) ran into this recently. We were unable to figure out what was causing it, but we were able to work around it by just trying the upgrade again. The easiest way to do that is to restore to the backup immediately before your upgrade and try again. (By the way, you should create a backup before you upgrade! :-) )


    See here: https://chat.rockrms.com/channel/troubleshooting?msg=slack-C2LSLJPTM-1544659005-090900

  • Photo of David Hanson

    0

    Unfortunately, I'm not sure if restoring the backup will work this time as we have had a number of services since the time I initiated the upgrade, so we have attendance records, financial batches, communications, etc. that would be lost or would have to be rebuilt somehow.  Is the error something that can be "reset" using a SQL query or something "simple" like that?

  • Photo of Luke Bennett

    0

    The only other way I know of to do it without rolling back is this (there may be a simpler way to fix this, but I don't know what it is. This only takes about an hour):

    1) Make a backup of your site and DB, make a note of your current Rock version

    2) Delete your Rock installation (not your DB, just all the files in your www folder)

    3) Re-install Rock to a fresh DB

    4) Upgrade the fresh installation to your current version (in your case, 8.0)

    5) Re-install any plugins/themes

    6) Open web.ConnectionStrings.config and point Rock back to your original DB

    7) Upgrade Rock as originally planned (in your case, to 8.1)

  • Photo of Nick Airdo

    0

    If the upgrade to 8.1 process failed, it would leave your system in an unknown and unpredictable state. The fact that the app_offline.htm file was still present indicates the upgrade process did not complete successfully. This means there are missing files (blocks, dlls, etc.), extra files, or the wrong versions of files on your Rock system. Because the update failed, your Rock system is *also missing the correct package files* in the `App_Data\Packages` folder. This is also one of the reasons why you are not able to perform another upgrade. The files in that folder are critical and tell Rock what versions it needs to go fetch during an update -- and in your current state it is attempting to re-install very old components of Rock (version 1.0.12; that's super old) and that would be disastrous.

    Always remember to take a backup before an update. If you don't have a backup, Luke Bennett's idea is sound. The only other thing that comes to mind would be hiring an expert to do some real surgery (and even then I'm not sure I would trust that person's work). It would involve comparing all files on your system with a known set of files from a clean installation, followed by removing, replacing or adding files and checking the state of the __MigrationHistory table to see what was the last data migration that ran (data migrations are embedded inside the Rock.Migrations DLL).

  • Photo of David Hanson

    0

    UPDATE:  Today I downloaded the latest version of Rock RMS and installed it on my backup server.  I also exported my current database and used the dump to create a temporary database (to test with).  I then pointed my new installation of Rock to the temporary database to see if everything would run.  To my surprise, Rock started up just fine and I was able to do all of the normal activities we use Rock for; however, I'm noticing some exceptions being thrown when trying to send Communication test emails and SMSs (the error has to do with Foreign Key failures).  So there are some database changes that are needed, but I'm not sure how to do that.  Is there a SQL command that can be run to "upgrade" the 8.0 database to match the 8.5 code that is running?


    I should add that I attempted to find a way to download version 8.0 of Rock, but couldn't find a link to download a previous version of the code.

  • Photo of David Hanson

    0

    UPDATE:  I used a database compare tool to determine what's different between my production version of Rock RMS and the new 8.5 installation's version.  I then manually created all of the SQL scripts to address all of the differences found in tables, indexes, foreign keys, stored procedures, functions, and views.  I ran the SQL scripts against my production instance and then copied over all of the 8.5 website files to my production server.  I recycled the application pool and brought up Rock.  Everything appears to be working, but I have only performed limited testing at this point.  I'll update the group if I run into any further problems and what steps I performed to correct them (or reach back out to ask for help).  Thanks everyone!

  • Photo of Nick Airdo

    0

    Hi David, due to the way you put your environment back to v8.5, you should also confirm that your App_Data/Packages/ folder has the following items:

    • Rock.1.8.5.nupkg
    • RockUpdate-1-8-0.1.8.0.nupkg
    • RockUpdate-1-8-1.1.8.1.nupkg
    • RockUpdate-1-8-2.1.8.2.nupkg
    • RockUpdate-1-8-3.1.8.3.nupkg
    • RockUpdate-1-8-4.1.8.4.nupkg
    • RockUpdate-1-8-5.1.8.5.nupkg 
  • Photo of David Hanson

    0

    Thanks, Nick.  I confirmed...all of the packages that you listed are present in the directory.