Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node 12 and MongoDB upgrades in progress, note for Snap/Docker/Sandstorm/Source users #2881

Closed
xet7 opened this issue Jan 11, 2020 · 6 comments

Comments

@xet7
Copy link
Member

xet7 commented Jan 11, 2020

Upgrades in progress

Meteor 1.9 has been released, it includes using Node v12, MongoDB 4.x etc. There is currently a lot of changes in progress to make all platforms compatible and working, so I recommed following:

Snap

Don't use edge channel, it has in-progress changes. Keep using stable channel in production. For example:

sudo snap refresh wekan --stable --amend

Docker

Don't use latest tag. In production, use Docker tag v3.64, that is before major upgrades. For newer versions of Wekan, test on some separate system, before using the version in production.

Sandstorm

Please make backup of your Sandstorm installation and grains before testing newest Wekan version.

Source

Meteor 1.9 uses Node 12.14.0 and MongoDB 4.0.8. Currently I'm trying to get newest Node 12.14.1 and MongoDB 4.2.2 working. You can try some of those versions.

@xet7
Copy link
Member Author

xet7 commented Jan 11, 2020

Currently when trying to build snap locally, I get these errors:

Even with METEOR_ALLOW_SUPERUSER or --allow-superuser, permissions in your app directory will be incorrect if you ever
attempt to perform any Meteor tasks as a normal user. If you need to fix your permissions, run the following command from
the root of your project:

  sudo chown -Rh <username> .meteor/local

/root/.meteor/packages/meteor-tool/.1.9.0.1eeo39q.88jy++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:218
      throw error;
      ^

Error: spawn ENOMEM
    at ChildProcess.spawn (internal/child_process.js:394:11)
    at spawn (child_process.js:540:9)
    at Object.execFile (child_process.js:224:17)
    at /tools/isobuild/meteor-npm.js:901:32
    at new Promise (<anonymous>)
    at /tools/isobuild/meteor-npm.js:900:12
    at /root/.meteor/packages/meteor-tool/.1.9.0.1eeo39q.88jy++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40
 => awaited here:
    at Promise.await (/root/.meteor/packages/meteor-tool/.1.9.0.1eeo39q.88jy++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:60:12)
    at /tools/isobuild/meteor-npm.js:915:8
    at /root/.meteor/packages/meteor-tool/.1.9.0.1eeo39q.88jy++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40
 => awaited here:
    at Promise.await (/root/.meteor/packages/meteor-tool/.1.9.0.1eeo39q.88jy++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:60:12)
    at /tools/isobuild/meteor-npm.js:917:6
    at Object.rebuildIfNonPortable (/tools/isobuild/meteor-npm.js:370:25)
    at /tools/isobuild/bundler.js:427:19
    at Function._.each._.forEach (/root/.meteor/packages/meteor-tool/.1.9.0.1eeo39q.88jy++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:191:9)
    at Function.readDirsFromJSON (/tools/isobuild/bundler.js:426:9)
    at /tools/isobuild/bundler.js:2533:34
    at Function._.each._.forEach (/root/.meteor/packages/meteor-tool/.1.9.0.1eeo39q.88jy++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:186:9)
    at Function.readFromDisk (/tools/isobuild/bundler.js:2525:7)
    at Object.readJsImage (/tools/isobuild/bundler.js:3516:18)
    at /tools/isobuild/isopack.js:898:28
    at Function._.each._.forEach (/root/.meteor/packages/meteor-tool/.1.9.0.1eeo39q.88jy++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:186:9)
    at Isopack._loadUnibuildsFromPath (/tools/isobuild/isopack.js:895:7)
    at /tools/packaging/tropohouse.js:521:21
    at Function._.each._.forEach (/root/.meteor/packages/meteor-tool/.1.9.0.1eeo39q.88jy++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:186:9)
    at /tools/packaging/tropohouse.js:520:13
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at /tools/packaging/tropohouse.js:515:22
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at Object.download (/tools/packaging/tropohouse.js:427:20)
    at /tools/packaging/tropohouse.js:613:18
    at /tools/utils/buildmessage.js:609:21
    at /root/.meteor/packages/meteor-tool/.1.9.0.1eeo39q.88jy++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40
 => awaited here:
    at Promise.await (/root/.meteor/packages/meteor-tool/.1.9.0.1eeo39q.88jy++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:60:12)
    at Object.forkJoin (/tools/utils/buildmessage.js:641:6)
    at exports.Tropohouse.downloadPackagesMissingFromMap (/tools/packaging/tropohouse.js:609:18)
    at /tools/project-context.js:836:25
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at /tools/project-context.js:835:20
    at /tools/packaging/catalog/catalog.js:100:5
    at Object.capture (/tools/utils/buildmessage.js:283:5)
    at Object.catalog.runAndRetryWithRefreshIfHelpful (/tools/packaging/catalog/catalog.js:99:31)
    at ProjectContext._downloadMissingPackages (/tools/project-context.js:834:13)
    at /tools/project-context.js:300:9
    at Object.enterJob (/tools/utils/buildmessage.js:388:12)
    at ProjectContext._completeStagesThrough (/tools/project-context.js:290:18)
    at /tools/project-context.js:282:12
    at Function.run (/root/.meteor/packages/meteor-tool/.1.9.0.1eeo39q.88jy++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/tool-env/tools/tool-env/profile.ts:289:14)
    at ProjectContext.prepareProjectForBuild (/tools/project-context.js:281:13)
    at /tools/cli/commands-packages.js:2160:20
    at Object.capture (/tools/utils/buildmessage.js:283:5)
    at Command.func (/tools/cli/commands-packages.js:2159:27)
    at /tools/cli/main.js:1528:15 {
  errno: 'ENOMEM',
  code: 'ENOMEM',
  syscall: 'spawn'
}
Failed to run 'override-build': Exit code was 1.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.

Also, local building with snapcraft seems to use yarn, when I normally just build with npm.

I can build bundle locally, but I don't know is it possible to create bundle correctly at snap Canonical's Snap build server, because it gives those errors above. Currently Canonical's Snap server has been trying to build snap package for about 2h, and it's still in progress. Having prebuild bundle would most likely speed up creating snap package a lot.

I'll try to go back to previous way of creating snap:

  1. Create bundle .zip manually
  2. In snapcraft.yaml download that bundle from https://releases.wekan.team

And then maybe also try to create similar Snap for arm64 etc:
wekan/wekan-snap#103 (comment)

@xet7
Copy link
Member Author

xet7 commented Jan 11, 2020

The way to build snap packages locally has changed.

Previously when I was building snap packages locally, on Ubuntu 16.04 I did run:

sudo snap install snapcraft --classic
sudo snapcraft

Newest Snapcraft uses multipass, that is some VM system. So I did:

sudo snap install snapcraft --classic
sudo snap install multipass
sudo chown uog+rw /var/snap/multipass/common/multipass_socket
multipass launch ubuntu
snapcraft

And that gave the errors above.

Locally I'm running Debian sid.

@xet7
Copy link
Member Author

xet7 commented Jan 11, 2020

Running Wekan locally with command meteor has these versions info:

wekan-meteor19

@xet7
Copy link
Member Author

xet7 commented Jan 11, 2020

When running meteor locally, I get some buffer warnings:

$ WITH_API=true meteor --port 4000
[[[[[ ~/repos/wekan ]]]]]                     

=> Started proxy.                             
=> Started MongoDB.                           
I20200111-15:19:00.838(2)? Presence started serverId=xC8TA6LuHWWzxbDyX
I20200111-15:19:01.825(2)? Meteor APM: completed instrumenting the app
=> Started your app.

=> App running at: http://localhost:4000/
W20200111-15:37:12.904(2)? (STDERR) (node:3662756) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

I already tried to fix buffer warnings with e01f4db but there still is that warnings. Maybe some Node 12 changes causes that? Does someone know how to make the correct changes?

@arradoq
Copy link

arradoq commented Mar 1, 2020

Is this mean I must upgrade my node version in order to use >> v. 3.69 ?

@xet7
Copy link
Member Author

xet7 commented Mar 1, 2020

@arradoq

Old Node and Wekan versions are vulnerable and not supported.

For Snap/Docker/Source Node and Meteor have already been upgraded. Sandstorm Node and Meteor will be upgraded when there is new version of meteor-spk available.

@xet7 xet7 closed this as completed Mar 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants