I have a project, very simple, based on ERB, but 50% of the time I started I get the following error in the (webkit) console:
Uncaught TypeError: Cannot read properties of undefined (reading 'forEach')
at Object.injectIntoGlobalHook (react-refresh-runtime.development.js:449:1)
at Object../node_modules/#pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js (ReactRefreshEntry.js:17:1)
at Object.options.factory (react refresh:6:1)
at __webpack_require__ (bootstrap:24:1)
at startup:4:1
at startup:10:1
at webpackUniversalModuleDefinition (universalModuleDefinition:7:1)
at universalModuleDefinition:10:2
The application starts, load a blank screen with the above error in the console.
In the terminal I see the following messages:
08:21:21.774 > Skip checkForUpdatesAndNotify because application is not packed
<i> [webpack-dev-middleware] wait until bundle finished: /index.html
[19072:0519/082130.210:ERROR:CONSOLE(160)] "Electron sandbox_bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (160)
[19072:0519/082130.210:ERROR:CONSOLE(160)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (160)
The crazy thing is that yesterday before closing the PC it was working fine, this morning, I've run it again without making any change, the same code as yesterday, and I get the error.
Please give me some hint because I really don't know what to search for!
Related
I have a Flutter Web project, and when an error is thrown, I can't open the dart file where the error was thrown, because the error line points to a JS file:
Launching lib\main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
This app is linked to the debug service: ws://127.0.0.1:63045/gOvW2paMrLg=/ws
Debug service listening on ws://127.0.0.1:63045/gOvW2paMrLg=/ws
Running with sound null safety
Debug service listening on ws://127.0.0.1:63045/gOvW2paMrLg=/ws
Error: Invalid argument(s): A value must be provided. Supported values: 0, 1
at Object.throw_ [as throw] (http://localhost:53846/dart_sdk.js:5061:11)
at Object._$36enumDecode [as _$enumDecode] (http://localhost:53846/packages/web_app/core/models/pessoa/pessoa.dart.lib.js:482:17)
at Object._$36PessoaFromJson [as _$PessoaFromJson] (http://localhost:53846/packages/web_app/core/models/pessoa/pessoa.dart.lib.js:473:54)
at Function.fromJson (http://localhost:53846/packages/web_app/core/models/pessoa/pessoa.dart.lib.js:375:21)
at http://localhost:53846/packages/web_app/repository/pessoa_repository.dart.lib.js:60:193
at repository.RepositoryGetter.new.getRecurso (http://localhost:53846/packages/web_app/repository/repository.dart.lib.js:33:18)
at getRecurso.next (<anonymous>)
at http://localhost:53846/dart_sdk.js:38640:33
at _RootZone.runUnary (http://localhost:53846/dart_sdk.js:38511:59)
at _FutureListener.thenAwait.handleValue (http://localhost:53846/dart_sdk.js:33713:29)
at handleValueCallback (http://localhost:53846/dart_sdk.js:34265:49)
at Function._propagateToListeners (http://localhost:53846/dart_sdk.js:34303:17)
at _Future.new.[_completeWithValue] (http://localhost:53846/dart_sdk.js:34151:23)
at async._AsyncCallbackEntry.new.callback (http://localhost:53846/dart_sdk.js:34172:35)
at Object._microtaskLoop (http://localhost:53846/dart_sdk.js:38778:13)
at _startMicrotaskLoop (http://localhost:53846/dart_sdk.js:38784:13)
at http://localhost:53846/dart_sdk.js:34519:9
How can I make it to show the dart file where the error occurred, instead of a JS file?
I'm using Flutter Channel stable 2.5.2, Android Studio version 2020.3.
I have found a workaround for this issue.
You basically have to install a third-party patch; it will translate the paths in JS and point to the right line in dart file.
Download the patch and follow the instructions here: https://github.com/obeobe/flutter-web-exception-mapper
Optionally you can see trace of dart files in the browser.
Make sure you have source maps enabled in your browser.
got the answer from this link on github
Note: This is a react server running on https.
Following error is noticed in the logs. The process crashes exactly on friday during midnight.
_tls_wrap.js:631
this.alpnProtocol = this._handle.getALPNNegotiatedProtocol();
^
TypeError: Cannot read property 'getALPNNegotiatedProtocol' of null
at TLSSocket._finishInit (_tls_wrap.js:631:36)
at TLSWrap.onhandshakedone (_tls_wrap.js:103:9)
I am Building my first SharePoint client-side web part. I have used gulp trust-dev-cert and the output is coming with 2 errors. How to fix it?
C:\sharepoint>gulp trust-dev-cert
Build target: DEBUG
[12:50:19] Using gulpfile C:\sharepoint\gulpfile.js
[12:50:19] Starting gulp
[12:50:19] Starting 'trust-dev-cert'...
[12:50:19] Starting subtask 'configure-sp-build-rig'...
[12:50:19] Finished subtask 'configure-sp-build-rig' after 5.6 ms
[12:50:19] Starting subtask 'trust-cert'...
[12:50:22] Error - [trust-cert] TypeError: Cannot read property 'toString' of null
[12:50:22] Error - 'trust-cert' sub task errored after 2.59 s
Cannot read property 'toString' of null
[12:50:22] 'trust-dev-cert' errored after 2.93 s
[12:50:22]
[12:50:23] ==================[ Finished ]==================
Error - [trust-cert] TypeError: Cannot read property 'toString' of null
Error - 'trust-cert' sub task errored after 2.59 s
Cannot read property 'toString' of null
[12:50:23] Project sharepoint version:0.0.1
[12:50:23] Build tools version:3.12.1
[12:50:23] Node version:v10.23.0
[12:50:23] Total duration:8.05 s
[12:50:23] Task errors:2
This is the content in the folder
You will need to run gulp trust-dev-cert in the specific SPFX Solution folder, make sure the folder path "C:\sharepoint" is valid:
So I recently started working on a linux machine (ubuntu 16.04) and followed the installation instructions here http://jsreport.net/downloads/. When I run npm start --production I get
2016-09-13T16:51:57.134Z - info: Initializing jsreport in production mode using configuration file prod.config.json
2016-09-13T16:51:57.138Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2016-09-13T16:51:57.146Z - info: Searching for available extensions in /home/ross/rifiniti/optimo_ui/
2016-09-13T16:51:57.152Z - info: Extensions location cache not found, crawling directories
2016-09-13T16:51:57.317Z - error: Error occured during reporter init Error: ENOENT, no such file or directory '/home/ross/rifiniti/optimo_ui/ember/tmp/tree_merger-tmp_dest_dir-2yGnPLMA.tmp/optimo-ui/config'
at Error (native)
at Object.fs.statSync (fs.js:801:18)
at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/util/util.js:51:21
at Array.forEach (native)
at Object.exports.walkSync (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/util/util.js:44:10)
at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/extensions/locationCache.js:50:20
From previous event:
at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:90:8
From previous event:
at Reporter.init (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:69:30)
at Reporter.reporter.init (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/lib/extendInit.js:8:21)
at Object.<anonymous> (/home/ross/rifiniti/optimo_ui/server.js:1:85)
And I have no idea why. It was working fine on mac but now it is looking for this non-existent tmp file in ember. I'm at a loss, any help would be greatly appreciated!
SOLVED!
All I had to do was remove the tmp directory in ember and it worked.
im trying to run https://github.com/ajam/banquo-server and receiving and error
Cannot read property 'createPage' of undefined
Express server listening on port 3000
Requesting http://america.aljazeera.com
/root/banquo-server/node_modules/banquo/src/banquo.js:36
ph.createPage(openPage);
^
TypeError: Cannot read property 'createPage' of undefined
at createPage (/root/banquo-server/node_modules/banquo/src/banquo.js:36:7)
at /root/banquo-server/node_modules/node-phantom/node-phantom.js:65:6
at null._onTimeout (/root/banquo-server/node_modules/node-phantom/node-phantom.js:43:5)
at Timer.listOnTimeout (timers.js:110:15)
error: Forever detected script exited with code: 1
error: Script restart attempt #7
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
I have checked and an error is being returned from node-phantom.js:36 but does not specify what.
any ideas?
regards
I've had the same issue and fixed it adding the phantomjs binary to PATH.
You can test if it is already set running the command:
$ phantomjs
The following error means that it isn't:
'phantomjs' is not recognized as an internal or external command, operable program or batch file
As you said in a comment:
not a bug as this works on my local mac, not on external server
So, that's not a problem with your code. That's a problem with your environment so I guess that you also missed to set the PATH variable.