ERPNext update errors [7.4 / 8.3]

good morning @rmehta

cd ~/frappe-bench && bench version

erpnext 7.2.14
frappe 8.3.8

how ?

bench upgrade

bench update --upgrade

after run more errors

Hello @Ahmed_Khalifa

Below steps will help you to get the latest update of ErpNext.

=> Go to bench-repo directory
=> git checkout . ( To removed changes from base repo if any available )
=> git pull or git pull origin
=> Go back to frappe-bench/apps/erpnext directory
=> git checkout . ( To removed changes from base erpnext app. if any available )
=> Go back to frappe-bench/apps/frappe directory
=> git checkout . ( To removed changes from base frappe app. if any available )
=> Go back to frappe-bench directory
=> Run bench update
=> bench use “Your site name”
=> bench migrate
=> bench clear-cache
=> bench start

1 Like

step ( => Go back to frappe-bench/apps/erpnext directory
=> git checkout . ( To removed changes from base erpnext app. if any available )

after that : fatal : loose object ea9… (stored in .git/objects/ea/92…) is corrupt

Hello @Ahmed_Khalifa

The command is “git checkout .”

note ==> git checkout . ( you missed last dot (.) )

1 Like

the same mr. @yogendrasinh

=> Go to bench-repo directory
=> git checkout . ( To removed changes from base repo if any available )
=> git pull or git pull origin
=> Go back to frappe-bench/apps/erpnext directory
=> git checkout . ( To removed changes from base erpnext app. if any available )
=> Go back to frappe-bench/apps/frappe directory
=> git checkout . ( To removed changes from base frappe app. if any available )
=> Go back to frappe-bench directory

Hello @Ahmed_Khalifa,

Seen your traceback log screenshot.
you still missed The . (Dot) after git checkout
see below I explain you

if I am correct then your directory is frappe-bench/apps/frappe$
after that just copy below command and paste it there.
git checkout .

if you still getting the same issue then paste traceback log, not a screenshot.

1 Like

sorry mr. @yogendrasinh

i forget .(dot)

git checkout .

after run >

can you plz type command of " paste traceback log "

Hello @Ahmed_Khalifa,

I Seen your traceback log, your branch is corrupt.

Remove your ErpNext and frappe app completely and get new branch:
frappe-bench$sudo rm -rf apps/erpnext
frappe-bench$sudo rm -rf apps/frappe

Go into apps.txt and remove the line for ErpNext and frappe completely.
apps.txt file is located at frappe-bench/sites directory.

Then do
frappe-bench$ bench get-app GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch master
frappe-bench$ bench get-app GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps --branch master

1 Like

Mr. @yogendrasinh

What about database ? we need our database
3 month data on database

i have backup on my windows pc

Hello @Ahmed_Khalifa,

Only get the ErpNext and frappe application latest branch.
not remove your custom application.

for our safe side is take backup of all database first.
did you make changes in base application of ErpNext or Frappe app?

1 Like

Hello @yogendrasinh

did you make changes in base application of ErpNext or Frappe app?

No

Hello @Ahmed_Khalifa,

Okay then fine.

1 Like

done :

frappe-bench$sudo rm -rf apps/erpnext
frappe-bench$sudo rm -rf apps/frappe

the file apps.txt not found

Hello @Ahmed_Khalifa,

apps.txt file is located in frappe-bench/sites directory.

1 Like

I used VI editor for delete two lines ErpNext and frappe but one line be still there ( erpnext_demo )
it is ok ?

Please upgrade the VM to 8 it’s probably the first issues everyone runs into and also .bench folder is inside repo in 7 and all instructions miss out on that

1 Like