-
Notifications
You must be signed in to change notification settings - Fork 9
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
Discover app compilation on node 14 #112
Comments
It's possible to create nodejs virtual env similar to python one.
I've created |
Ok, as expected it doesn't compile successfully:
Let see how it works on gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (/home/archie/work/dap-ps/discover/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/home/archie/work/dap-ps/discover/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/home/archie/work/dap-ps/discover/node_modules/which/which.js:80:29)
gyp verb `which` failed at /home/archie/work/dap-ps/discover/node_modules/which/which.js:89:16
gyp verb `which` failed at /home/archie/work/dap-ps/discover/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /home/archie/work/dap-ps/discover/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:191:21)
gyp verb `which` failed python2 Error: not found: python2
gyp verb `which` failed at getNotFoundError (/home/archie/work/dap-ps/discover/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/home/archie/work/dap-ps/discover/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/home/archie/work/dap-ps/discover/node_modules/which/which.js:80:29)
gyp verb `which` failed at /home/archie/work/dap-ps/discover/node_modules/which/which.js:89:16
gyp verb `which` failed at /home/archie/work/dap-ps/discover/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /home/archie/work/dap-ps/discover/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:191:21) {
gyp verb `which` failed code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? Well, it's so old that
Got progress. |
It's a bug in a |
Faced the same error on
|
This is not an error we care about:
We just want to compile the solidity contract, we don't care about deploying it. We just need the ABI to be able to build the app. |
You can get the logs for failed deployment from here: Here's the failure in
|
In order to get things building locally I used a Nix shell like this: NIXPKGS_ALLOW_INSECURE=1 nix-shell With this { pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "discover";
buildInputs = with pkgs; [
nodejs-12_x
(yarn.override { nodejs = nodejs-12_x; })
python2
];
} I also had to upgrade diff --git a/package.json b/package.json
index 9d49596..6ef1eb6 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
"history": "^4.7.2",
"idb": "4.0.3",
"moment": "^2.24.0",
- "node-sass": "^4.11.0",
+ "node-sass": "^4.14.1",
"prop-types": "^15.7.2",
"rc-slider": "8.6.9",
"rc-tooltip": "3.7.3", Newest still supports NodeJS 12: https://github.com/sass/node-sass/releases/tag/v7.0.1 But it fails at build time:
|
Actually. After purging all of
But the question is, will it work. |
The API works, as far as I can tell:
Which matches the MongoDB contents:
So that's nice. |
I logged into the current
|
I'm wondering if your
And can build prod app without issues:
However building the
|
It's not if you don't use the |
Also, only |
I've managed to build the app using this branch: It appears to work without errors:
The secret sauce was running |
I tested it locally with
|
Yeah, I'm suspecting nginx, which is by default it trying to send traffic to the backend port 5000. There is no Maybe I'm wrong, but as I understand the flow is: |
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/nodejs-platform-proxy.html Also: https://github.com/dap-ps/infra-dapps/blob/d545adceaad51eebca724e17e11b7d878e134067/dev.tf#L5 |
You can try changing the ssh key for EB env so you can access the EB hosts once they get re-created. |
|
Called |
I'm seeing the same issue using the pure Nix shell from #113:
And indeed the file is missing from
Maybe someone from the old Embark team could help you figure this one out. |
Thanks to the Richard, we are able to generate Steps that Richard took:
|
Anyway, app created by
|
That app cannot be compiled on
Let's try to build it on |
Ok, I've built app using
It starts without issues on my desktop:
|
Necessary for investigation in: dap-ps/discover#112 #22 Signed-off-by: Jakub Sokołowski <[email protected]>
Would be good to upload the missing Added |
We can debug loading of Node.JS modules using these methods:
And check what paths Node.JS is checking when searching for the Line 2 in 97bfb18
|
As you've said, the app loads via: http://dev-dap-ps-app.eba-6uufvgb2.us-east-1.elasticbeanstalk.com/
I have seen this before, but it was transitory: But I verified just in case that the default Ropsten Infura endpoint works, and it does:
|
The error appears to come from here: ABICoder.prototype.decodeParameters = function (outputs, bytes) {
if (outputs.length > 0 && (!bytes || bytes === '0x' || bytes === '0X')) {
throw new Error(
'Returned values aren\'t valid, did it run Out of Gas? ' +
'You might also see this error if you are not using the ' +
'correct ABI for the contract you are retrieving data from, ' +
'requesting data from a block number that does not exist, ' +
'or querying a node which is not fully synced.'
);
} Which appears to be triggered by this call to discover/src/common/blockchain/services/discover-service/discover-service.js Lines 76 to 80 in 97bfb18
My best guess is that it's some incompatibility with MetaMask, but that doesn't explain why it works on prod. |
I managed to get the env upgraded by manually adjusting the ZIP we deployed previously: dap-ps/infra-dapps#22 (comment) But there are issues with the submission popup that I'm not sure how to fix. |
As mentioned here: dap-ps/infra-dapps#22 Elastic Beanstalk is only in V2 version.
According to the https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-retiring.html#platforms-retiring.nodejs the lowest supported version of nodejs is
14.0.0
hence is required to compilediscover
innodejs 14
env.The text was updated successfully, but these errors were encountered: