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

[Bug] White screen during development #1582

Closed
captn3m0 opened this issue Jul 1, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@captn3m0
Copy link

commented Jul 1, 2019

  • Insomnia Version: develop branch Commit: a4f56ffe7d74b56c7ad927a72b08a43b6165bf21
  • Operating System: 5.1.15-arch1-1-ARCH Arch Linux

Details

Running npm run app-start launches Insomnia to a white screen. Developer Tool log:

2webpack-internal:///../node_modules/webpack/hot/log.js:24 [HMR] Waiting for update signal from WDS...
webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:21302 Download the React DevTools for a better development experience: https://fb.me/react-devtools
webpack-internal:///./common/database.js:80 [db] Initialized DB client
/home/nemo/projects/personal/insomnia/packages/insomnia-app/node_modules/electron/dist/resources/electron.asar/renderer/security-warnings.js:143 Electron Security Warning (Node.js Integration with Remote Content) This renderer process has Node.js integration enabled
      and attempted to load remote content from 'http://localhost:3333/renderer.html'. This
      exposes users of this app to severe security risks.
 
For more information and help, consult
https://electronjs.org/docs/tutorial/security.
 This warning will not show up
once the app is packaged.
warnAboutNodeWithRemoteContent @ /home/nemo/projects/personal/insomnia/packages/insomnia-app/node_modules/electron/dist/resources/electron.asar/renderer/security-warnings.js:143
/home/nemo/projects/personal/insomnia/packages/insomnia-app/node_modules/electron/dist/resources/electron.asar/renderer/security-warnings.js:127 Electron Security Warning (Insecure Resources) This renderer process loads resources using insecure
    protocols.This exposes users of this app to unnecessary security risks.
    Consider loading the following resources over HTTPS or FTPS. 
 - http://localhost:3333/bundle.js
    
 
For more information and help, consult
https://electronjs.org/docs/tutorial/security.
 This warning will not show up
once the app is packaged.
warnAboutInsecureResources @ /home/nemo/projects/personal/insomnia/packages/insomnia-app/node_modules/electron/dist/resources/electron.asar/renderer/security-warnings.js:127
/home/nemo/projects/personal/insomnia/packages/insomnia-app/node_modules/electron/dist/resources/electron.asar/renderer/security-warnings.js:184 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security
      Policy set or a policy with "unsafe-eval" enabled. This exposes users of
      this app to unnecessary security risks.
 
For more information and help, consult
https://electronjs.org/docs/tutorial/security.
 This warning will not show up
once the app is packaged.
warnAboutInsecureCSP @ /home/nemo/projects/personal/insomnia/packages/insomnia-app/node_modules/electron/dist/resources/electron.asar/renderer/security-warnings.js:184
webpack-internal:///./ui/redux/selectors.js:186 Uncaught TypeError: Cannot read property '_id' of undefined
    at Object (webpack-internal:///./ui/redux/selectors.js:186)
    at eval (webpack-internal:///../node_modules/reselect/lib/index.js:76)
    at eval (webpack-internal:///../node_modules/reselect/lib/index.js:36)
    at eval (webpack-internal:///../node_modules/reselect/lib/index.js:90)
    at eval (webpack-internal:///../node_modules/reselect/lib/index.js:36)
    at Function.mapStateToProps [as mapToProps] (webpack-internal:///./ui/containers/app.js:1265)
    at mapToPropsProxy (webpack-internal:///../node_modules/react-redux/lib/connect/wrapMapToProps.js:53)
    at Function.detectFactoryAndVerify (webpack-internal:///../node_modules/react-redux/lib/connect/wrapMapToProps.js:62)
    at mapToPropsProxy (webpack-internal:///../node_modules/react-redux/lib/connect/wrapMapToProps.js:53)
    at handleFirstCall (webpack-internal:///../node_modules/react-redux/lib/connect/selectorFactory.js:34)
webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:17118 The above error occurred in the <ConnectFunction> component:
    in ConnectFunction (created by DragDropContext(Connect(App)))
    in DragDropContext(Connect(App))
    in Provider
    in AppContainer

React will try to recreate this component tree from scratch using the error boundary you provided, AppContainer.
logCapturedError @ webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:17118
webpack-internal:///../node_modules/react-hot-loader/dist/react-hot-loader.development.js:241 TypeError: Cannot read property '_id' of undefined
    at Object (webpack-internal:///./ui/redux/selectors.js:186)
    at eval (webpack-internal:///../node_modules/reselect/lib/index.js:76)
    at eval (webpack-internal:///../node_modules/reselect/lib/index.js:36)
    at eval (webpack-internal:///../node_modules/reselect/lib/index.js:90)
    at eval (webpack-internal:///../node_modules/reselect/lib/index.js:36)
    at Function.mapStateToProps [as mapToProps] (webpack-internal:///./ui/containers/app.js:1265)
    at mapToPropsProxy (webpack-internal:///../node_modules/react-redux/lib/connect/wrapMapToProps.js:53)
    at Function.detectFactoryAndVerify (webpack-internal:///../node_modules/react-redux/lib/connect/wrapMapToProps.js:62)
    at mapToPropsProxy (webpack-internal:///../node_modules/react-redux/lib/connect/wrapMapToProps.js:53)
    at handleFirstCall (webpack-internal:///../node_modules/react-redux/lib/connect/selectorFactory.js:34)
error @ webpack-internal:///../node_modules/react-hot-loader/dist/react-hot-loader.development.js:241
webpack-internal:///../node_modules/react-hot-loader/dist/react-hot-loader.development.js:2157 Uncaught TypeError: Cannot read property '_id' of undefined
    at Object (webpack-internal:///./ui/redux/selectors.js:186)
    at eval (webpack-internal:///../node_modules/reselect/lib/index.js:76)
    at eval (webpack-internal:///../node_modules/reselect/lib/index.js:36)
    at eval (webpack-internal:///../node_modules/reselect/lib/index.js:90)
    at eval (webpack-internal:///../node_modules/reselect/lib/index.js:36)
    at Function.mapStateToProps [as mapToProps] (webpack-internal:///./ui/containers/app.js:1265)
    at mapToPropsProxy (webpack-internal:///../node_modules/react-redux/lib/connect/wrapMapToProps.js:53)
    at Function.detectFactoryAndVerify (webpack-internal:///../node_modules/react-redux/lib/connect/wrapMapToProps.js:62)
    at mapToPropsProxy (webpack-internal:///../node_modules/react-redux/lib/connect/wrapMapToProps.js:53)
    at handleFirstCall (webpack-internal:///../node_modules/react-redux/lib/connect/selectorFactory.js:34)
webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:17118 The above error occurred in the <AppContainer> component:
    in AppContainer

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
logCapturedError @ webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:17118
webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:211 Uncaught (in promise) Error: A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.
    at Object.invokeGuardedCallbackDev (webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:211)
    at invokeGuardedCallback (webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:257)
    at commitRoot (webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:18949)
    at eval (webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:20419)
    at Object.unstable_runWithPriority (webpack-internal:///../node_modules/scheduler/cjs/scheduler.development.js:255)
    at completeRoot (webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:20418)
    at performWorkOnRoot (webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:20347)
    at performWork (webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:20255)
    at performSyncWork (webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:20229)
    at requestWork (webpack-internal:///../node_modules/@hot-loader/react-dom/cjs/react-dom.development.js:20098)
webpack-internal:///../node_modules/webpack-dev-server/client/index.js?http://localhost:3333:79 [WDS] Hot Module Replacement enabled.
e8f02a8936d310f86882.worker.js:2 Uncaught ReferenceError: window is not defined
e8f02a8936d310f86882.worker.js:2 Uncaught ReferenceError: window is not defined

Tests are passing. No errors in console:


> insomnia@1.0.0 app-start /home/nemo/projects/personal/insomnia
> lerna run start --stream --parallel --bail

lerna notice cli v3.14.1
lerna info versioning independent
lerna info Executing command in 1 package: "npm run start"
insomnia-app: > insomnia-app@1.1.7 start /home/nemo/projects/personal/insomnia/packages/insomnia-app
insomnia-app: > concurrently --kill-others "npm run start:dev-server" "npm run start:electron"
insomnia-app: [0] 
insomnia-app: [0] > insomnia-app@1.1.7 start:dev-server /home/nemo/projects/personal/insomnia/packages/insomnia-app
insomnia-app: [0] > webpack-dev-server --config ./webpack/webpack.config.development.babel.js
insomnia-app: [0] 
insomnia-app: [1] 
insomnia-app: [1] > insomnia-app@1.1.7 start:electron /home/nemo/projects/personal/insomnia/packages/insomnia-app
insomnia-app: [1] > cross-env NODE_ENV=development webpack --config ./webpack/webpack.config.electron.babel.js && electron .
insomnia-app: [1] 
insomnia-app: [0] ℹ 「wds」: Project is running at http://localhost:3333/
insomnia-app: [0] ℹ 「wds」: webpack output is served from /
insomnia-app: [1] Hash: 2fda948506e004b90868
insomnia-app: [1] Version: webpack 4.30.0
insomnia-app: [1] Time: 1997ms
insomnia-app: [1] Built at: 07/02/2019 12:02:57 AM
insomnia-app: [1]       Asset     Size  Chunks             Chunk Names
insomnia-app: [1] main.min.js  963 KiB       0  [emitted]  main
insomnia-app: [1] Entrypoint main = main.min.js
insomnia-app: [1]  [0] ./common/constants.js 30.4 KiB {0} [built]
insomnia-app: [1]  [1] ./common/database.js 23.6 KiB {0} [built]
insomnia-app: [1]  [4] external "electron" 42 bytes {0} [built]
insomnia-app: [1]  [5] ./models/index.js 6.78 KiB {0} [built]
insomnia-app: [1]  [7] external "path" 42 bytes {0} [built]
insomnia-app: [1]  [8] ./common/misc.js 14 KiB {0} [built]
insomnia-app: [1]  [9] external "fs" 42 bytes {0} [built]
insomnia-app: [1] [10] external "mkdirp" 42 bytes {0} [built]
insomnia-app: [1] [11] /home/nemo/projects/personal/insomnia/packages/insomnia-url/index.js 545 bytes {0} [built]
insomnia-app: [1] [16] ./main/window-utils.js 14.2 KiB {0} [built]
insomnia-app: [1] [20] ./main/squirrel-startup.js 1.72 KiB {0} [built]
insomnia-app: [1] [22] ./main/error-handling.js 968 bytes {0} [built]
insomnia-app: [1] [23] ./main/updates.js 5.64 KiB {0} [built]
insomnia-app: [1] [46] multi ./main.development.js 28 bytes {0} [built]
insomnia-app: [1] [47] ./main.development.js 5.85 KiB {0} [built]
insomnia-app: [1]     + 42 hidden modules
insomnia-app: [1] [fix] Running database repairs
insomnia-app: [1] [db] Initialized DB at /home/nemo/.config/insomnia-app/insomnia.$TYPE.db
insomnia-app: [1] Init responses DB
insomnia-app: [1] [localstorage] Initialized at /home/nemo/.config/insomnia-app/localStorage
insomnia-app: [1] [main] Loading http://localhost:3333/renderer.html
insomnia-app: [1] [updater] Updater not running platform=linux dev=true
insomnia-app: [0] ℹ 「wdm」: wait until bundle finished: /renderer.html
insomnia-app: [0] ℹ 「wdm」: Hash: 803cc9689f9b6e36175d
insomnia-app: [0] Version: webpack 4.30.0
insomnia-app: [0] Time: 16839ms
insomnia-app: [0] Built at: 07/02/2019 12:03:12 AM
insomnia-app: [0]                          Asset       Size  Chunks             Chunk Names
insomnia-app: [0]                      bundle.js   33.3 MiB    main  [emitted]  main
insomnia-app: [0] e8f02a8936d310f86882.worker.js      4 MiB          [emitted]  
insomnia-app: [0]      fontawesome-webfont.woff2   70.2 KiB          [emitted]  
insomnia-app: [0]                  renderer.html  574 bytes          [emitted]  
insomnia-app: [0] Entrypoint main = bundle.js
insomnia-app: [0] [0] multi ../node_modules/webpack-dev-server/client?http://localhost:3333 ../node_modules/webpack/hot/dev-server.js webpack-dev-server/client?http://localhost:3333 webpack/hot/only-dev-server ./renderer.js ./renderer.html 88 bytes {main} [built]
insomnia-app: [0] [../node_modules/loglevel/lib/loglevel.js] 7.68 KiB {main} [built]
insomnia-app: [0] [../node_modules/strip-ansi/index.js] 161 bytes {main} [built]
insomnia-app: [0] [../node_modules/webpack-dev-server/client/index.js?http://localhost:3333] ../node_modules/webpack-dev-server/client?http://localhost:3333 8.26 KiB {main} [built]
insomnia-app: [0] [../node_modules/webpack-dev-server/client/overlay.js] 3.59 KiB {main} [built]
insomnia-app: [0] [../node_modules/webpack-dev-server/client/socket.js] 1.05 KiB {main} [built]
insomnia-app: [0] [../node_modules/webpack/hot sync ^\.\/log$] ../node_modules/webpack/hot sync nonrecursive ^\.\/log$ 170 bytes {main} [built]
insomnia-app: [0] [../node_modules/webpack/hot/dev-server.js] 1.61 KiB {main} [built]
insomnia-app: [0] [../node_modules/webpack/hot/emitter.js] 75 bytes {main} [built]
insomnia-app: [0] [../node_modules/webpack/hot/log-apply-result.js] 1.27 KiB {main} [built]
insomnia-app: [0] [../node_modules/webpack/hot/log.js] 1.11 KiB {main} [built]
insomnia-app: [0] [../node_modules/webpack/hot/only-dev-server.js] 2.55 KiB {main} [built]
insomnia-app: [0] [./renderer.html] 59 bytes {main} [built]
insomnia-app: [0] [./renderer.js] 14 bytes {main} [built]
insomnia-app: [0] [./ui/index.js] 3.28 KiB {main} [built]
insomnia-app: [0]     + 1537 hidden modules
insomnia-app: [0] Child worker:
insomnia-app: [0]                              Asset   Size  Chunks             Chunk Names
insomnia-app: [0]     e8f02a8936d310f86882.worker.js  4 MiB    main  [emitted]  main
insomnia-app: [0]     Entrypoint main = e8f02a8936d310f86882.worker.js
insomnia-app: [0]     [../node_modules/pdfjs-dist/build/pdf.worker.js] 1.51 MiB {main} [built]
insomnia-app: [0] ℹ 「wdm」: Compiled successfully.
@gschier

This comment has been minimized.

Copy link
Collaborator

commented Jul 2, 2019

Thank you @captn3m0 for catching this! It looks like this error happens on first launch when there is not yet any data. I checked the current production version and cannot reproduce, so it must have been something that was added since then.

I have reproduced it locally and will include a fix for it soon

Note, the error message within the logs you posted is this:

webpack-internal:///./ui/redux/selectors.js:186 Uncaught TypeError: Cannot read property '_id' of undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.