Conversation
amaury1093
left a comment
There was a problem hiding this comment.
Very cool! Could you update @parity/light.js, I'd like to test this
| }); | ||
| } | ||
|
|
||
| function downloadParity () { |
There was a problem hiding this comment.
Would it be possible to use @parity/electron here? Or is it too Electron-focused?
There was a problem hiding this comment.
Yes, that's what I was intending to do, but somehow the postinstall script of @parity/electron isn't run when running yarn in the workspace root
There was a problem hiding this comment.
|
(Parity v2.4.1 isn't released yet, so for now Fether won't accept to run on the downloaded bundled binary; however you can test by running a separate instance of master Parity Ethereum) |
|
I don't think sending transactions will work on this PR; the changes from the other PR #394 are needed. I think I'll merge the other PR into this one |
|
I just tried running this branch on macOS in development with Initially it indicated that there was an issue with my network connection (when I don't think there was), and then after a while it decided to compile successfully, but in the Chrome Inspector > Console it showed the following error, and the Fether window was blank, even after refreshing it. Details~/code/src/paritytech/fether - [ac-parity-bbundling] $ yarn; yarn start yarn install v1.10.1 [1/5] 🔍 Validating package.json... [2/5] 🔍 Resolving packages... [3/5] 🚚 Fetching packages... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... error An unexpected error occurred: "https://registry.yarnpkg.com/@parity/abi/-/abi-5.1.1.tgz: ETIMEDOUT". info If you think this is a bug, please open a bug report with the information provided in "/Users/scon/code/src/paritytech/fether/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. yarn run v1.10.1 $ npm-run-all -l -p start-* [start-react ] $ cd packages/fether-react && yarn start [start-electron] $ cd packages/fether-electron && yarn start [start-ui ] $ cd packages/fether-ui && yarn start [start-ui ] $ yarn build --watch [start-react ] $ npm-run-all -p start-* [start-electron] $ cross-env ELECTRON_START_URL=http://localhost:3000 electron-webpack dev --ws-origins all [start-ui ] $ rimraf lib [start-ui ] $ babel src --out-dir lib --watch [start-react ] $ cross-env SKIP_PREFLIGHT_CHECK=true BROWSER=none craco start --react-scripts ../../node_modules/react-scripts [start-react ] $ npm run build-css -- --watch --recursive [start-react ] [start-react ] > fether-react@0.3.0 build-css /Users/scon/code/src/paritytech/fether/packages/fether-react [start-react ] > node-sass-chokidar src/ -o src/ "--watch" "--recursive" [start-react ] [start-react ] => changed: /Users/scon/code/src/paritytech/fether/packages/fether-react/src/index.sass [start-react ] Rendering Complete, saving .css file... [start-react ] Wrote CSS to /Users/scon/code/src/paritytech/fether/packages/fether-react/src/index.css [start-ui ] Successfully compiled 43 files with Babel. The second time I ran it with Details~/code/src/paritytech/fether - [ac-parity-bbundling] $ yarn; yarn start yarn install v1.10.1 [1/5] 🔍 Validating package.json... [2/5] 🔍 Resolving packages... [3/5] 🚚 Fetching packages... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... [4/5] 🔗 Linking dependencies... warning " > babel-eslint@10.0.1" has unmet peer dependency "eslint@>= 4.12.1". warning "workspace-aggregator-2cba0802-420a-4be4-8622-cdc4bc946181 > fether-ui@0.3.0" ... ... [5/5] 📃 Building fresh packages... $ cd scripts && node ./fetch-latest-parity.js Downloading Parity Ethereum... (https://releases.parity.io/ethereum/beta/x86_64-apple-darwin/parity) Success: bundled Parity Ethereum v2.4.0 ✨ Done in 239.35s. yarn run v1.10.1 $ npm-run-all -l -p start-* [start-electron] $ cd packages/fether-electron && yarn start [start-react ] $ cd packages/fether-react && yarn start [start-ui ] $ cd packages/fether-ui && yarn start [start-ui ] $ yarn build --watch [start-react ] $ npm-run-all -p start-* [start-electron] $ cross-env ELECTRON_START_URL=http://localhost:3000 electron-webpack dev --ws-origins all [start-ui ] $ rimraf lib [start-ui ] $ babel src --out-dir lib --watch [start-react ] $ npm run build-css -- --watch --recursive [start-react ] $ cross-env SKIP_PREFLIGHT_CHECK=true BROWSER=none craco start --react-scripts ../../node_modules/react-scripts [start-react ] [start-react ] > fether-react@0.3.0 build-css /Users/scon/code/src/paritytech/fether/packages/fether-react [start-react ] > node-sass-chokidar src/ -o src/ "--watch" "--recursive" [start-react ] [start-react ] => changed: /Users/scon/code/src/paritytech/fether/packages/fether-react/src/index.sass [start-react ] Rendering Complete, saving .css file... [start-react ] Wrote CSS to /Users/scon/code/src/paritytech/fether/packages/fether-react/src/index.css [start-ui ] Successfully compiled 43 files with Babel. The third time I ran it it showed the following in the terminal and successfully compiled. It showed the same notification in the Fether window and the Chrome Inspector Console. Details~/code/src/paritytech/fether - [ac-parity-bbundling] $ yarn; yarn start yarn install v1.10.1 [1/5] 🔍 Validating package.json... [2/5] 🔍 Resolving packages... success Already up-to-date. $ cd scripts && node ./fetch-latest-parity.js Bundled Parity Ethereum v2.4.0 is older than required version ^2.4.1 Downloading Parity Ethereum... (https://releases.parity.io/ethereum/beta/x86_64-apple-darwin/parity) Success: bundled Parity Ethereum v2.4.0 ✨ Done in 12.03s. |
|
I just tried downloading and running the latest "stable" Parity Ethereum It incorrectly says There are no errors in the Chrome Inspector > Console. It correctly shows the version number in Fether window as |
There are two version numbers:
v2.4.0 is the version of the bundled Parity Ethereum in fether-react additionally checks if the running instance of Parity Ethereum (bundled or run separately) matches the version requirement |
171c887 to
77b9d8d
Compare
amaury1093
left a comment
There was a problem hiding this comment.
This looks good!
The error cases (1/ running fether with <2.4.1 and 2/ no matches for downloading parity-ethereum) work good.
I think, just to be safe, we should wait for 2.4.1 (openethereum/parity-ethereum#10471) before merging this PR, should take a couple of days max. Putting on-ice in the meantime.
There was a problem hiding this comment.
I got this message:
[start-electron] [2019-03-19T18:59:02.486Z] INFO (@parity/electron:main/44589 on Amaurys-MacBook-Pro.local): Parity found on machine, can be run with "/Users/amaurymartiny/Library/Application Support/Electron/parity".
[start-electron] [2019-03-19T18:59:02.495Z] INFO (@parity/electron:main/44589 on Amaurys-MacBook-Pro.local): Running "/Users/amaurymartiny/Library/Application\ Support/Electron/parity --ws-origins all --light --chain kovan --ws-interface 127.0.0.1 --ws-port 8546".
I think you need to update @parity/electron to ^5 for it to take parityPath into account
| // Parity Ethereum isn't running: run the bundled binary | ||
| await this.run(); | ||
| pino.info('Running Parity Ethereum'); | ||
| return true; |
There was a problem hiding this comment.
I can't seem to run fether-react past the "Launching node" screen, unless we put resolve(true) here
amaury1093
left a comment
There was a problem hiding this comment.
Nice! Tried yarn start|electron|package, everything works 💯
|
@Tbaut Would you like to give a last try before merging? |
packages/fether-react/src/RequireParityVersion/RequireParityVersion.js
Outdated
Show resolved
Hide resolved
Tbaut
left a comment
There was a problem hiding this comment.
Yay thank you so much, it works well on Linux and Windows from my tests!
Just nit pick.


Needs openethereum/js-libs#205 to be merged (need to update js-libs dep after this). closes #204 closes #175
postinstall