[v10-develop] Yarn - Rollup - Develop - Docker Issues

@JoEz Agreed, everything you have said so far I agree

@netchampfaris I appreciate this so much. Anything I can do, just ask

I have already installed yarn multiple ways and globally as root onto the frappe container.

Again, you have to install bench from master branch instead of develop …otherwise you’ll not able to fix the issue …

@JoEz

THX for the help.

I just freeze my production VM virtual image and wait…

1 Like

Tried the new PR - looks very promising!
It got stuck on 404 error for wkhtmltopdf - solved by adding apt-get -y update && apt-get upgrade -y to Dockerfile
But now bench update --reset says invalid mysql user/pass. Even though the password is unchanged (I checked the backup files)

The new PR has bene merged …it works on bench init so you should install it from scratch

Please direct those Python 3 issues to me. Happy to work on it.

@joshreeder @binary64 @krnkris
We have pushed a potential fix. Please try setting up frappe-bench on production as well as develop.
If you face any problems please post the traceback.

@netchampfaris

on production in VM virtual image
the situation same as before, because the virtual image is 32 bit,
not allow the chromedriver somehow:

frappe@erpnext:~/frappe-bench$ bench update --reset
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at d46ac5e Merge branch 'hotfix'
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git fetch --all
Fetching upstream
remote: Counting objects: 230, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 230 (delta 199), reused 199 (delta 198), pack-reused 25
Receiving objects: 100% (230/230), 2.58 MiB | 1.09 MiB/s, done.
Resolving deltas: 100% (202/202), completed with 152 local objects.
From https://github.com/frappe/erpnext
 * [new branch]      codingCoffee-patch-2 -> upstream/codingCoffee-patch-2
   e53a238..c209014  develop    -> upstream/develop
   3799f8b..a310cc7  hotfix     -> upstream/hotfix
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 4ff4d18 Merge branch 'hotfix'
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling erpnext_demo
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 5567d19 Merge pull request #25 from neilLasrado/master
INFO:bench.utils:find . -name "*.pyc" -delete
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install --upgrade pip
/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/bench-repo/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext_demo/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
Updating node packages...
INFO:bench.utils:npm install

> chromedriver@2.35.0 install /home/frappe/frappe-bench/node_modules/chromedriver
> node install.js

Only Linux 64 bits supported.
npm WARN frappe@ No description
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"ia32"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@2.35.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the chromedriver@2.35.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/frappe/.npm/_logs/2018-02-28T15_57_21_709Z-debug.log
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/bench-repo/bench/commands/update.py", line 58, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, force=force, reset=reset)
  File "/home/frappe/bench-repo/bench/commands/update.py", line 75, in _update
    update_node_packages(bench_path=bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 443, in update_node_packages
    update_npm_packages(bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 490, in update_npm_packages
    exec_cmd('npm install', cwd=bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 145, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: npm install

@netchampfaris

Thank you for your hard work!

on develop in VM virtual image
the situation same as before everything runs smooth

I got a very long traceback, but finally develop works.7

Installed Apps

ERPNext: v11.x.x-develop (c209014) (develop)

Frappe Framework: v11.x.x-develop (ad9a207) (develop)


When switching back to master, after login it not switch to the desk it stay on the login screen.
Have to F5 reload to get the drop down menu in the right.
+
same error, but it seem the cause is the chat is not integrated to master up today

Installed Apps

ERPNext: v10.1.4 (master)

Frappe Framework: v10.1.1 (master)

Applause to @JoEz for fixing frappe_docker to launch on a CLEAN system and by clean you must erase all content and setting in docker preferences to know it is clean. From there you can install the frappe_docker with no errors or issues. But the problem currently is that @JoEz switched the bench repo to “master” but not “erpnext” or “frappe” so switch-to-master bricks again with the “column translatable null” error.

I think I have found a way to edit the travis.yml files after initial clone and before install and I am testing now - hope to report good news.

thanks again to @JoEz for getting 90% of the issues solved but still no way to develop on the stable masters at least in docker.

@netchampfaris Does this sound correct? Should the simple change from @JoEz to master branch of bench repo result in master branches of frappe and erpnext? Right now I can not get any conversion from develop back to master branches…

The best time to switch from develop to master is when develop is merged into master, or around the same time. Right now, develop is so different from master that switching will most likely not be successful. If you’re launching a new system for production, yes - using master from the get-go will be the best route to take.

1 Like

Somehow its just not working. I just did a fresh frappe_docker install using the clone -b master bench.git and it installs develop branches with no control I can find.

@felix is there a way (a few instructions for me to test) to install frappe_docker with production/master branches?

I don’t think that’s the problem, when you install a new bench, as far as i know, if you don’t specify branch it will always get the master branch.

snap from playbook:

branch = args.bench_branch or 'master'
	repo_url = args.repo_url or 'https://github.com/frappe/bench'

	success = run_os_command(
		{'git': 'git clone {repo_url} {bench_repo} --depth 1 --branch {branch}'.format(
			repo_url=repo_url, bench_repo=clone_path, branch=branch)}
	)

I don’t think so, as far as i know both frappe and erpnext has develop branch as default one …

I don’t know much about the docker setup, so i’m not going to be of much help unfortunately.

@felix- pretty sure it has nothgin to do with docker.

I have spent the day hacking away at clones of frappe_docker and clones of bench trying to find a way to either install frappe_docker using the master branches (no luck) or switch to master once installed (no luck).

Giving up for now…

It could be simpler than it appear …once you finish to set up docker and dbench init, login as frappe user and drop-site, delete /apps/frappe and /apps/erpnext, than use git clone -b master to get master branch

Thanks - will try that. As this is a workaround - i hope we can get standard bench commands working again on develop and frappe_docker at last check these commands do not work:
bench switch-to-master (error)
bench switch to develop (error)
sudo bench setup production (i dont think supervisor or nginix are setup properly)
sudo bench disable-production
bench new-app … (Yes you heard me right, in develop branches i have not been able to create a new app)
bench remove-app
bench uninstall-app

Can anyone confirm if these are working on your end in frappe_docker and/or on develop branches?
If you are struggling with normal bench commands that use to work but are now not please post them here. If some of these have been fixed since my last attempt, please call them out.

1 Like
frappe@458f27f11b17:~/frappe-bench$ bench new-app testing

INFO:bench.app:creating new app testing
App Title (default: Testing): App Description:
App Description: TEsting
App Publisher: Myself
App Email: test@test.com
App Icon (default 'octicon octicon-file-directory'):
App Color (default 'grey'):
App License (default 'MIT'):
'testing' created at /home/frappe/frappe-bench/apps/testing
INFO:bench.app:installing testing
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/testing --no-cache-dir
frappe@458f27f11b17:~/frappe-bench$
frappe@458f27f11b17:~/frappe-bench$ bench remove-app testing
INFO:bench.utils:['./env/bin/pip uninstall -y ./apps/testing']

> frappe@ production /home/frappe/frappe-bench/apps/frappe
> FRAPPE_ENV=production node rollup/build.js

Production mode
✔ Built js/libs.min.js

Building frappe assets...

✔ Built css/frappe-rtl.css
✔ Built css/web_form.css
✔ Built css/report.min.css
✔ Built css/module.min.css
✔ Built css/form.min.css
✔ Built css/list.min.css
✔ Built css/frappe-web.css
✔ Built js/print_format_v3.min.js
✔ Built js/web_form.min.js
✔ Built css/desk.min.css
✔ Built js/frappe-web.min.js
✔ Built js/form.min.js
✔ Built js/control.min.js
✔ Built js/list.min.js
✔ Built js/dialog.min.js
✔ Built js/report.min.js
✔ Built js/desk.min.js
✨  Done in 44.734s

Building erpnext assets...

✔ Built css/erpnext.css
✔ Built js/erpnext-web.min.js
✔ Built js/item-dashboard.min.js
✔ Built js/erpnext.min.js
✨  Done in 2.737s

Probably you’ve something wrong in your system; i’ve docker installation and is working fine.

thanks for checking! i work with several other guys and this was bricked on everyones system so it must have gotten fixed - will test again and confirm.