egeres / Long-calendar

MIT License
4 stars 1 forks source link

Blank page on start #1

Closed ErikBjare closed 2 years ago

ErikBjare commented 2 years ago

Tried running, but got an error and a blank page:

npm start

> long-calendar@ start /home/erb/Programming/Long-calendar
> ts-node ./.erb/scripts/check-port-in-use.js && npm run start:renderer

> long-calendar@ start:renderer /home/erb/Programming/Long-calendar
> cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts

Starting Main Process...
(node:98777) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use `node --trace-deprecation ...` to show where the warning was created)
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:11212/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.1.106:11212/
<i> [webpack-dev-server] Content not from webpack is served from '/home/erb/Programming/Long-calendar/public' directory
<i> [webpack-dev-server] 404s will fallback to '/index.html'

> long-calendar@ start:main /home/erb/Programming/Long-calendar
> cross-env NODE_ENV=development electron -r ts-node/register/transpile-only ./src/main/main.ts

Listening
[98851:0421/183312.033911:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
(node:98816) ExtensionLoadWarning: Warnings loading extension at /home/erb/.config/Electron/extensions/fmkadmapgofadopljbjfkapdkoienihi:
  Manifest version 2 is deprecated, and support will be removed in 2023. See https://developer.chrome.com/blog/mv2-transition/ for more details.

(Use `electron --trace-warnings ...` to show where the warning was created)
18:33:12.129 › APPIMAGE env is not defined, current application is not an AppImage
<i> [webpack-dev-middleware] wait until bundle finished: /index.html
[98816:0421/183316.751611:ERROR:CONSOLE(160)] "Electron sandbox_bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (160)
[98816:0421/183316.751644:ERROR:CONSOLE(160)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (160)

The dev tools just show a single weird error:

image

Tried running both with node v17 and node v14 (and removing node_modules in between), but same thing.

Using Arch Linux, but shouldn't have to do with it?

I'll also open a PR with some docs I wrote. (edit: later)

egeres commented 2 years ago

That's weird!

I don't think node (my version is v16.9.1) or the OS should interfere since this is based on electron-react-boilerplate, can you pull the latest commit and check if it works? I haven't added any extra dependencies, so I don't think you need to re-install node_modules or change the node version!

In case it still doesn't I'll extend the logging of the backend as well as the front end to debug this properly!

ErikBjare commented 2 years ago

Just pulled the latest code and ran it again, but same thing.

Here's a full screenshot in case there's something I missed:

image

ErikBjare commented 2 years ago

I searched and found an issue relating to those last warning messages, but not sure if that's why the page is blank: https://github.com/electron/electron/issues/32133

egeres commented 2 years ago

In this issue https://github.com/vercel/next.js/issues/18025 they relate the error to a package called react-devtools, but it's not on the dependencies of the project and it looks like a package for browser debugging, so I guess that cause should be discarded

egeres commented 2 years ago

Oh okay, I think the problem is actually caused by the package react-refresh-webpack-plugin. Some people is having a similar issue, but it's happening on MacOS... https://github.com/facebook/react/issues/21047

egeres commented 2 years ago

Could you try running UPGRADE_EXTENSIONS=1 npm start as said in: https://electron-react-boilerplate.js.org/docs/dev-tools/ ?

ErikBjare commented 2 years ago

That worked! Awesome.