Cannot create purchase or Sales invoice

Success!

It fixed it. However this issue remains: https://discuss.frappe.io/t/customer-data-wont-load/11980

Many thanks.

@smino I just noticed that I was indeed on develop the whole time in the VM, not on master. I don’t know how I managed to switch though… So you should just switch to master and all your problems will disappear :wink:

The output of: git show branch , in ~/frappe-bench/apps/frappe

! [develop] Merge branch ‘KanchanChauhan-WebsiteChanges’ into develop

  • [HEAD] [fix] context frappe.local.request
  • [develop] Merge branch ‘KanchanChauhan-WebsiteChanges’ into develop
  • [develop^2] [css] cleanup + moved products and homepage to erpnext + [fix] get_js
  • [develop^2^] Website Changes
  • [develop^] [cleanup] control get_value for dialog fields
  • [develop~2] [enhancement] sort selector
  • [develop~3^2^2] bumped to version 6.27.14
  • [develop~3^2^2^] [fix] Load private files having non-ascii characters when using Nginx’s X-Accel-Redirect system
  • [develop~4^2] [feature] Redirect to message page with a detailed message
  • [develop~5] [fix] regex
  • [develop~6] [enhancements] now can {% include %} in page js files and also write jinja like tags in js templates
    +* [HEAD] [fix] context frappe.local.request

Can I just issue: git checkout master , in that directory then to correct?
Sorry for lack of git mastery.

@smino git branch -a will show your current branch and all available branches:

`frappe@erpnext:~/frappe-bench/apps/frappe$ git branch -a

  • master
    remotes/upstream/HEAD → upstream/develop
    remotes/upstream/bot
    remotes/upstream/develop
    remotes/upstream/gh-pages
    remotes/upstream/hotfix
    remotes/upstream/master
    remotes/upstream/v4.x.x
    remotes/upstream/v5.x.x
    `

git remote show upstream will show you if your remote is set up properly.

`frappe@erpnext:~/frappe-bench/apps/frappe$ git remote show upstream

git checkout master will indeed change your branch to master.

I get the same error when clicking on any order (sales or purchase), nothing was modified before the last update, and I’m using the VM with erpnext pre installed.

Last time I got an error that was really similar to this, the team fixed the day after.

I did git checkout master , then for what I thought was good measure, a bench-update. The update starts out ok,. but it doesnt end well. Everything get up to date , then this:

http://imgur.com/Q0jEWyQ

Trying to login to the web intercace results in a blank page with:

Updating. We will be back in a few moments…

Rather stuck at this point.

Well, it’d be interesting to see why bench migrate fails, so maybe try bench migrate on its own. I suspect that switching from developer to master may pose some problems concerning the database. Maybe start a new site for testing.

The problem persists, none of the solutions presented worked for me…

@smino Any luck with your issue? I am stuck on the same page as yours. I also got that migrate error now.

I have been attempting to reinstall erpnext , then reload my sql backup. A first attempt at doing this resulted in the same errors etc.

At this point , I have renamed (mv) frappe-bench , bench-repo directories and deleted the config directory. Then , git cloned bench, pip installed bench repo, bench init frappe-bench and bench switch-to-master. Then bench setup config. At this point bench update produces no errors.

I installed erpnext using bench get-app. Bench update has no errors.

At this point I am unsure how re-create my site. What steps should I take prior to:
bench --site [sitename] --force restore /path/to/SQLFILE

Do i need to:
bench new-site mysite, then
bench --site mysite install-app erpnext
bench start

Or can I i copy from my renamed frappe-bench/sites or other directory?

@smino You need not have done so much. Your supervisor processes were not restarting and that’s what was causing the error.

If you still want to use the new bench you created, then you don’t need to restore the database as the database already exists in your system. Just move sites/yoursite folder into the new bench’s sites folder and then run:

bench setup nginx
sudo service nginx reload

The old frappe-bench/sites folder contains files:
apps.tx
beat.schedule
common_site_config.json
celerybeat.pid
currentsite.txt
languages.txt

and folders:

erpnext.vm
assetsl

which should I copy?

@smino I suppose erpnext.vm is your site folder. Copy that folder into the new bench’s sites folder.

PS: what you are doing is in risky territory and you might end up even more frustrated

The login screen loads, there is a blank screen with header 502 error on login

Full screenshot?

http://imgur.com/3e8zqsa

http://imgur.com/ZeqPeeY

Then after entering credentials, only the 502 header. Note that the progress bar on the bottom indicates the first two pages do not completely load.

@smino have you done customization in frappe/erpnext code?

Not in source code. I did add a custom field and customized a couple print formats in the UI. They were working without problems.

I will be afk for several hours btw, and I very much appreciate the help.

Are you on ERPNext VM?

@smino follow the instructions here: Errors After Upate v6.27.12 - #16 by anand