Oops, a server error has occurred | after upgrade from V6 to V7

after upgrade from v6 to v7 getting Oops, a server error has occured in most of website pages, except main page.

@rmehta @KanchanChauhan can you please help me on this?

Try running bench migrate

@netchampfaris No success

Seems you have skipped some patches (or you have a custom web generator that needs to have a route filed)

@rmehta what is the solution?

bench upgrade --patch
bench migrate

@komsel2228
mayar@erpnext:~$ bench upgrade --patch
Usage: bench [OPTIONS] COMMAND [ARGS]…

Error: No such command “upgrade”.
mayar@erpnext:~$

bench update --patch
bench migrate

@komsel2228 I have done this all but no success

i think
in your database, table “tabWebPage” no have Column “Route”
in version 7 have that. can you check that ?

3 / 4 month ago, i have same problem. i try bench update --upgrade and bench update --patch…and its work…

what version frappe and erpnext you used?

I’m using the latest version:

ERPNext: v7.0.43
Frappe Framework: v7.0.32

I’m not able to find table “tabeWebPage” in my database

I have also try bench update --upgrade & bench update --patch … but no success

@rmehta @netchampfaris @komsel2228 I have restore the backup in a new fresh installation in another server get the same error, it mean this is my database issue can anyone help me how to rectify this?

Post full output of following commands enclosed in code block,

Run

bench update --upgrade
bench update --patch

Then

bench retry-upgrade
  • DO NOT upload screenshot of error log, it can be supplemented along with error log in code block (appropriately styled). Those who wish to help you, only posting error log in screenshot makes their life difficult and your post probably gets ignored.

  • DO NOT tag anyone to grab attention at first place unless its absolutely necessary, have some patience and wait for reply from community members. If you are in hurry hire an expert from https://community.erpnext.com/service-providers

1 Like

@mayar your patches broke for some reason. I would recommending hiring someone for an hour or so from the community to get it fixed for you.

mayar@erpnext:~$ bench update --upgrade
INFO:bench.utils:updating bench
Already up-to-date.
remote: Counting objects: 59, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 59 (delta 51), reused 51 (delta 43), pack-reused 0
Unpacking objects: 100% (59/59), done.
From https://github.com/frappe/frappe
be49d43…2c40d68 develop -> upstream/develop
8230bb7…f3f0f6f hotfix -> upstream/hotfix
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/py thon2.7/site-packages
INFO:bench.app:pulling frappe
From https://github.com/frappe/frappe

  • branch master -> FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling erpnext
    remote: Counting objects: 26, done.
    remote: Compressing objects: 100% (26/26), done.
    remote: Total 26 (delta 9), reused 0 (delta 0), pack-reused 0
    Unpacking objects: 100% (26/26), done.
    From https://github.com/frappe/erpnext
  • branch master -> FETCH_HEAD
    6835a6f…0967b17 master -> upstream/master
    Updating 6835a6f…0967b17
    Fast-forward
    erpnext/init.py | 2 ±
    …/report/sales_register/sales_register.py | 13 ++±—
    erpnext/patches.txt | 2 ±
    …/daily_timesheet_summary.py | 42 +++++++++++++±-------
    4 files changed, 36 insertions(+), 23 deletions(-)
    INFO:bench.app:pulling meeting
    From https://github.com/frappe/meeting
  • branch master -> FETCH_HEAD
    Already up-to-date.
    /home/mayar/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requ ests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not availab le on this platform. This may cause the server to present an incorrect TLS certi ficate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.o rg/en/latest/security.html#snimissingwarning.
    SNIMissingWarning
    /home/mayar/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requ ests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLConte xt object is not available. This prevents urllib3 from configuring SSL appropria tely and may cause certain SSL connections to fail. You can upgrade to a newer v ersion of Python to solve this. For more information, see https://urllib3.readth edocs.org/en/latest/security.html#insecureplatformwarning.
    InsecurePlatformWarning
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    Migrating mayar.erpnext.com
    Updating frappe : [========================================]
    Updating erpnext : [========================================]
    Updating meeting : [========================================]
    Wrote ./assets/js/print_format_v3.min.js - 18k
    Wrote ./assets/js/frappe-web.min.js - 132k
    Wrote ./assets/js/form.min.js - 136k
    Wrote ./assets/js/report.min.js - 158k
    Wrote ./assets/js/erpnext.min.js - 74k
    Wrote ./assets/css/list.min.css - 7k
    Wrote ./assets/js/item-dashboard.min.js - 6k
    Wrote ./assets/js/d3.min.js - 343k
    Wrote ./assets/css/report.min.css - 7k
    Wrote ./assets/css/frappe-web.css - 53k
    Wrote ./assets/js/list.min.js - 81k
    Wrote ./assets/js/dialog.min.js - 61k
    Wrote ./assets/js/desk.min.js - 239k
    Wrote ./assets/css/form.min.css - 4k
    Wrote ./assets/js/editor.min.js - 26k
    Wrote ./assets/css/erpnext.css - 3k
    Wrote ./assets/js/libs.min.js - 883k
    Wrote ./assets/js/erpnext-web.min.js - 2k
    Wrote ./assets/css/desk.min.css - 263k
    Wrote ./assets/css/module.min.css - 2k
    frappe-bench-frappe-schedule: stopped
    frappe-bench-frappe-default-worker-0: stopped
    frappe-bench-frappe-long-worker-0: stopped
    frappe-bench-frappe-short-worker-0: stopped
    frappe-bench-frappe-web: stopped
    frappe-bench-node-socketio: stopped
    frappe-bench-frappe-schedule: started
    frappe-bench-frappe-default-worker-0: started
    frappe-bench-frappe-long-worker-0: started
    frappe-bench-frappe-short-worker-0: started
    frappe-bench-node-socketio: started
    frappe-bench-frappe-web: started

Bench: Open source installer + admin for Frappe and ERPNext (https://erpnext.com )

mayar@erpnext:~$ bench update --patch
Migrating mayar.erpnext.com
Updating frappe : [========================================]
Updating erpnext : [========================================]
Updating meeting : [========================================]
frappe-bench-frappe-schedule: stopped
frappe-bench-frappe-default-worker-0: stopped
frappe-bench-frappe-long-worker-0: stopped
frappe-bench-frappe-short-worker-0: stopped
frappe-bench-frappe-web: stopped
frappe-bench-node-socketio: stopped
frappe-bench-frappe-schedule: started
frappe-bench-frappe-default-worker-0: started
frappe-bench-frappe-long-worker-0: started
frappe-bench-frappe-short-worker-0: started
frappe-bench-node-socketio: started
frappe-bench-frappe-web: started


Bench: Open source installer + admin for Frappe and ERPNext (https://erpnext.com )

mayar@erpnext:~$ bench retry-upgrade
INFO:bench.app:pulling frappe
From https://github.com/frappe/frappe

  • branch master -> FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling erpnext
    From https://github.com/frappe/erpnext
  • branch master -> FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling meeting
    From https://github.com/frappe/meeting
  • branch master -> FETCH_HEAD
    Already up-to-date.
    Migrating mayar.erpnext.com
    Updating frappe : [========================================]
    Updating erpnext : [========================================]
    Updating meeting : [========================================]
    Wrote ./assets/js/print_format_v3.min.js - 18k
    Wrote ./assets/js/frappe-web.min.js - 132k
    Wrote ./assets/js/form.min.js - 136k
    Wrote ./assets/js/report.min.js - 158k
    Wrote ./assets/js/erpnext.min.js - 74k
    Wrote ./assets/css/list.min.css - 7k
    Wrote ./assets/js/item-dashboard.min.js - 6k
    Wrote ./assets/js/d3.min.js - 343k
    Wrote ./assets/css/report.min.css - 7k
    Wrote ./assets/css/frappe-web.css - 53k
    Wrote ./assets/js/list.min.js - 81k
    Wrote ./assets/js/dialog.min.js - 61k
    Wrote ./assets/js/desk.min.js - 239k
    Wrote ./assets/css/form.min.css - 4k
    Wrote ./assets/js/editor.min.js - 26k
    Wrote ./assets/css/erpnext.css - 3k
    Wrote ./assets/js/libs.min.js - 883k
    Wrote ./assets/js/erpnext-web.min.js - 2k
    Wrote ./assets/css/desk.min.css - 263k
    Wrote ./assets/css/module.min.css - 2k

Your bench was upgraded to version 5
supervisor.conf already exists and this will overwrite it. Do you want to contin ue? [y/N]: y
Port configuration list:

Site mayar.erpnext.com assigned port: 80
nginx.conf already exists and this will overwrite it. Do you want to continue? [ y/N]: y
INFO:bench.utils:setting up backups
As you have setup your bench for production, you will have to reload configurati on for nginx and supervisor
To complete the migration, please run the following commands

sudo service nginx restart
sudo supervisorctl reload
mayar@erpnext:~$ sudo service nginx restart

  • Restarting nginx nginx [ OK ]
    mayar@erpnext:~$ sudo supervisorctl reload
    Restarted supervisord
    mayar@erpnext:~$

Hi,
As komsel2228 said table “tabWebPage” no have Column “Route” and as rmehta said your patches broke for some reason, I guess the fix is to add the field.

BTW its not “tabeWebPage” (in your reply) its tabWeb Page.
Please check in your db if the field route exists, run the following command
show fields from tabWeb Page;

If field route its not there add it. BACK UP! before proceeding.
run
ALTER TABLE tabWeb Page ADD route varchar(140);

In the commands above wrap tabWeb Page with backquotes (I don’t know what they call it, the one along with tilde sign). Its getting converted into Blockquote in this editor.

I’m not sure if route field without value would work, if not add data to field depending on the route of the web pages you have.

Let me know
Thank you