Meteor constantly crashing: Error: write after end - meteor

My meteor instance is crashing after every refresh I do. Interestingly it does not happen when I run it inside a docker container.
=> App running at: http://localhost:3000/
events.js:141
throw er; // Unhandled 'error' event
^
Error: write after end
at ServerResponse.OutgoingMessage.write (_http_outgoing.js:430:15)
at IncomingMessage.ondata (_stream_readable.js:542:20)
at emitOne (events.js:77:13)
at IncomingMessage.emit (events.js:169:7)
at IncomingMessage.Readable.read (_stream_readable.js:368:10)
at flow (_stream_readable.js:759:26)
at resume_ (_stream_readable.js:739:3)
at nextTickCallbackWith2Args (node.js:458:9)
at process._tickCallback (node.js:372:17)
Any idea how I could further debug this issue?

Related

Symfony encore watch and vscode Remote SSH development freeze the server when running at the same time

I'm developing my Symfony project on a remote server and use Vscode Remore SSH plugin to writing code on it.
I use symfony Webpack Encore to build front side, and if I try to run commands like yarn encore dev or yarn watch to let webpack to rebuild my assets when vscode is working and connected to the server all freeze.
Web pages become loading very long time, vscode cannot save anything and the command line may show sting Running webpack ... without any results a minutes or throw an error like this
[webpack-cli] Failed to load '/var/proj/veto/webpack.config.js' config
[webpack-cli] Error: Timed out waiting for sync-rpc server to start (it should respond with "pong" when sent "ping"):
node:events:491
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 127.0.0.1:36465
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 36465
}
at waitForAlive (/var/proj/veto/node_modules/sync-rpc/lib/index.js:85:11)
at start (/var/proj/veto/node_modules/sync-rpc/lib/index.js:41:3)
at sendMessage (/var/proj/veto/node_modules/sync-rpc/lib/index.js:133:17)
at createClient (/var/proj/veto/node_modules/sync-rpc/lib/index.js:173:27)
at Object.<anonymous> (/var/proj/veto/node_modules/#symfony/webpack-encore/lib/plugins/eslint.js:13:32)
at Module._compile (node:internal/modules/cjs/loader:1165:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
at Module.load (node:internal/modules/cjs/loader:1043:32)
at Function.Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1067:19)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
When vscode doesn't work webpack's running without any problems. When I'm writing and saving code and do not use webpack all works great either.
I have very few ideas how can I fix it. How may it be related?
I tried to turn off vscode plugins that may scanning the project, but it didn't help

Emitted 'error' event on WriteStream instance

When making a build for production, I keep getting this error. I never had the issue before upgrading to version 12.0.0.
I tried deleting the file, but it only works when the dev server is not running, while it runs I cannot open or delete it and that make every production build fail.
info - Creating an optimized production build .events.js:291
throw er; // Unhandled 'error' event
^
Error: EPERM: operation not permitted, open 'D:\etc\ss\ss\ss\.next\trace'
Emitted 'error' event on WriteStream instance at:
at D:\etc\ss\ss\ss\node_modules\next\dist\compiled\#vercel\nft\index.js:1:287421
at D:\etc\ss\ss\ss\node_modules\next\dist\compiled\#vercel\nft\index.js:1:287860
at FSReqCallback.oncomplete (fs.js:164:23) {
errno: -4048,
code: 'EPERM',
syscall: 'open',
path: 'D:\\etc\\ss\\ss\\ss\\.next\\trace'
}
Just stop npm run dev then run npm run build. That worked for me.

Nextjs displays white screen during development

When I run yarn dev I get the following error
(node:171412) UnhandledPromiseRejectionWarning: TypeError: Cannot set
property 'status' of undefined at
xxx\my-next-app\node_modules\next\dist\server\hot-reloader.js:16:94 at
async Promise.all (index 0) at async DynamicEntryPlugin.config.entry
(xxx\my-next-app\node_modules\next\dist\server\hot-reloader.js:15:96)
(Use node --trace-warnings ... to show where the warning was
created) (node:171412) UnhandledPromiseRejectionWarning: Unhandled
promise rejection. This error originated either by throwing inside of
an async function without a catch block, or by rejecting a promise
which was not handled with .catch(). To terminate the node process on
unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict (see
https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode).
(rejection id: 32)
I have been unable to figure out the issue
My next version is ^10.0.4

Meteor throws "Must throw non-empty error" on page load

So my Meteor project just crashes after a small ammount of time (2 seconds (maybe)). I get this error in the console and Meteor exits: (whole console output from meteor command)
[[[[[ /path/to/meteor/project ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/
/home/user/.meteor/packages/meteor-tool/.1.1.9.42pmuo++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:259
throw new Error('Must throw non-empty error');
^
Error: Must throw non-empty error
at Object.Future.throw (/home/user/.meteor/packages/meteor-tool/.1.1.9.42pmuo++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:259:10)
at Extract.<anonymous> (/tools/fs/files.js:699:42)
at Extract.emit (events.js:117:20)
at DirWriter.<anonymous> (/home/user/.meteor/packages/meteor-tool/.1.1.9.42pmuo++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/tar/lib/extract.js:61:8)
at DirWriter.emit (events.js:117:20)
at FileWriter.<anonymous> (/home/user/.meteor/packages/meteor-tool/.1.1.9.42pmuo++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fstream/lib/dir-writer.js:158:12)
at FileWriter.emit (events.js:117:20)
at WriteStream.<anonymous> (/home/user/.meteor/packages/meteor-tool/.1.1.9.42pmuo++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fstream/lib/file-writer.js:50:47)
at WriteStream.emit (events.js:95:17)
at onwriteError (_stream_writable.js:239:10)
at onwrite (_stream_writable.js:257:5)
at WritableState.onwrite (_stream_writable.js:97:5)
at evalmachine.<anonymous>:1692:14
at Object.wrapper [as oncomplete] (evalmachine.<anonymous>:522:5)
Could it be an issue with available free space, or an error handling bug? This issue reports a similar case: https://github.com/meteor/meteor/issues/4178
You have not enought space for mongo.
Try to install mongo and then start its server with --smallfiles
Then tell meteor to start using the listening mongo.
MONGO_URL=mongodb://0.0.0.0:27017 meteor

Meteor Up (Mup) deployment error

I am trying to deploy a Meteor project using Mup. Mup Setup worked fine, but when i used the command Mup Deploy i get the following error below:
(Note: I have tried multiple appPaths but i have found no solution)
Meteor Up: Production Quality Meteor Deployments
“ Checkout Kadira!
It's the best way to monitor performance of your app.
Visit: https://kadira.io/mup ”
Building Started: /srv/asm/
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1011:11)
at Process.ChildProcess._handle.onexit (child_process.js:802:34)
Fixed. In order to correct this error i double checked app path:
// Location of app (local directory)
"app": "/srv/asm/",
and uninstalled Meteor, then reinstalled meteor, then ran mup deploy. All is now working correctly.

Resources