Skip to content

Instantly share code, notes, and snippets.

@Folaht
Created January 6, 2021 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Folaht/4f4135236a43480fe9d9d554f5f1cd8e to your computer and use it in GitHub Desktop.
Save Folaht/4f4135236a43480fe9d9d554f5f1cd8e to your computer and use it in GitHub Desktop.
sn_browser LAN attempt
[folaht@pjehrsohmehj sn_browser]$ cat node_modules/electron/dist/electron.crust.config
{
"hard_coded_contacts": [
"192.168.178.24:12000"
],
"whitelisted_node_ips": null,
"whitelisted_client_ips": null,
"tcp_acceptor_port": 12000,
"service_discovery_port": null,
"bootstrap_cache_name": null,
"force_acceptor_port_in_ext_ep": false,
"network_name": "beta",
"dev": null
}
[folaht@pjehrsohmehj sn_browser]$ yarn prod-dev
yarn run v1.22.10
$ cross-env START_HOT=1 node -r babel-register-ts ./internals/scripts/CheckPortInUse.ts && cross-env NODE_ENV=production START_HOT=1 yarn start-renderer-dev
$ cross-env webpack-dev-server --config configs/webpack.config.renderer.dev.babel.js
Starting Main Process... nodeenv production
npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1609949855476-0.5501756457663058/node but npm is using /usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> sn_browser@0.18.0 start-main-dev /home/folaht/safe/sn_browser
> cross-env HOT=1 IS_UNPACKED=true electron -r babel-register-ts ./app/main.dev.ts
17:17:42.882 ›
17:17:42.890 ›
17:17:42.892 ›
17:17:42.892 › >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
17:17:42.893 › Started with node env: production
17:17:42.894 › Log location: /home/folaht/.config/SAFE Browser/logs/main.log
17:17:42.895 › >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
17:17:42.895 › Running with derived constants:
17:17:42.896 ›
17:17:42.897 › isCI?: null
17:17:42.898 › process.env.NODE_ENV: production
17:17:42.899 › isRunningDebug? false
17:17:42.900 › isRunningUnpacked? true
17:17:42.900 › isRunningPackaged? false
17:17:42.901 › inMainProcess? true
17:17:42.901 › startedRunningProduction? true
17:17:42.902 › startedRunningMock? false
17:17:42.902 › isRunningTestCafeProcess? false
17:17:42.903 ›
17:17:42.903 › >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
17:17:42.904 ›
17:17:46.678 › Main process starting.
17:17:46.753 › Registered to handle safe: urls ? false
17:17:46.754 › HACK: mysites local location /home/folaht/.config/Electron/mySites.json
(node:211759) DeprecationWarning: file property is deprecated and will be removed in v5.
(electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false". It will change to be "true" in Electron 9. For more information please check https://github.com/electron/electron/issues/18397
17:17:47.227 › App Ready
17:17:47.235 › OnAppReady: Setting mock in store. false
17:17:47.242 › Installing devtools extensions
17:17:47.676 › Local mysites info found. []
Error: Invalid header: Does not start with Cr24
at crxToZip (/home/folaht/safe/sn_browser/node_modules/unzip-crx/dist/index.js:32:15)
at /home/folaht/safe/sn_browser/node_modules/unzip-crx/dist/index.js:57:32
at callHanler (/home/folaht/safe/sn_browser/node_modules/yaku/lib/yaku.js:719:16)
at tryCatcher (/home/folaht/safe/sn_browser/node_modules/yaku/lib/yaku.js:436:32)
at /home/folaht/safe/sn_browser/node_modules/yaku/lib/yaku.js:575:38
at flush (/home/folaht/safe/sn_browser/node_modules/yaku/lib/yaku.js:478:17)
at processTicksAndRejections (internal/process/task_queues.js:75:11)
17:17:47.889 › Setting up Background Process
17:17:47.892 › loading bg: file:///home/folaht/safe/sn_browser/app/bg.html
17:17:58.526 › Background process init.
17:17:58.553 › Registering SAFE Network Protocols
17:17:58.555 › safe Registering
(node:211759) ProtocolDeprecateCallback: The callback argument of protocol module APIs is no longer needed.
17:17:58.618 › Peruse internal server listening on port 43505!
17:17:58.630 › Background process renderer loaded.
17:17:58.918 › Extending menus array
17:17:58.921 › Adding SAFE menus to browser
17:17:58.952 › Initialising anonymous SAFE App
17:17:58.953 › Connecting to the Network...
17:19:29.145 › Failed to connect: ConnectionError("Failed to connect to the SAFE Network: Unexpected(\"Connection timed out when bootstrapping to the network\")")
17:19:29.154 › Request to modify http://localhost:1212/dist/renderer.dev.js
17:19:29.160 › Extensions: Checking urlIsValid via all extensions.
17:19:29.162 › Checking urlIsValid http://localhost:1212/dist/renderer.dev.js
17:19:32.206 › Extending ButtonsLHS via the extensions Api
17:19:32.213 › Extending ButtonsRHS via the extensions Api
17:19:32.227 › Extending AddressBarInput via the extensions Api
17:19:32.245 › Extending Browser via the extensions Api
17:19:32.253 › Starting render process
17:19:32.281 › Getting extension browser actions
17:19:32.286 › Wrapping browser
17:19:32.305 › Wrapping Address bar buttons LHS
17:19:32.319 › Wrapping Address bar input
17:19:32.325 › Version determined from URL query: null
17:19:32.327 › Latest known version: null
17:19:32.336 › Wrapping Address bar buttons RHS
17:19:32.964 › state-thisWindowId 2
17:19:32.971 › OnOpen: Setting mock in store. false
17:19:33.304 › Version determined from URL query: null
17:19:33.313 › Latest known version: null
17:19:33.406 › Version determined from URL query: null
17:19:33.408 › Latest known version: null
17:19:33.886 › Request to modify http://localhost:1212/sockjs-node/info?t=1609949973849
17:19:34.044 › Extensions: Checking urlIsValid via all extensions.
17:19:34.050 › Checking urlIsValid http://localhost:1212/sockjs-node/info?t=1609949973849
17:19:35.211 › Webview: loading url: safe-browser://my-sites
17:19:35.225 › Tab did stop loading
Error occurred in handler for 'ELECTRON_GUEST_VIEW_MANAGER_CALL': Error: ERR_FAILED (-2) loading 'safe-browser://my-sites'
at rejectAndCleanup (electron/js2c/browser_init.js:6131:21)
at WebContents.stopLoadingListener (electron/js2c/browser_init.js:6172:9)
at WebContents.emit (events.js:215:7) {
errno: -2,
code: 'ERR_FAILED',
url: 'safe-browser://my-sites'
}
17:19:35.348 › Tab did finish loading
17:19:35.369 › Tab did stop loading
17:19:35.406 › Version determined from URL query: null
17:19:35.411 › Latest known version: null
17:19:35.420 › webview started loading
17:19:35.432 › Tab did stop loading
17:19:35.465 › Version determined from URL query: null
17:19:35.467 › Latest known version: null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment