Getting 'unexpected mongo exit code 100' while running a meteor application - javascript

I am new to meteor .I started learning meteor language by referring a book
'My First Meteor Application'...While i was running my application i am getting a 'unexpected mongo exit code 100' error.It is showing 'unexpected mongo exit code 100 restarting'.help me get over this error

This error indicates that either mongo process is still running in the background or it was killed improperly. You may use
try `ps -A | grep 'mongo'
to see what's going on. Either way, in your .meteor/local/db directory, there will be a non-empty mongo.lock file. If there's an active mongo process, kill it and the file should become empty. Otherwise remove the file manually. When you're done the error should disappear.

This seems to be a common problem and there are multiple similar questions already out there with just as many suggested fixes. Problem is some of the proposed fixes either only work in certain cases or require using the meteor reset command which deletes the apps database(not ideal for everyone). I posted practically the same question a while back. I managed to solve it in my case and posted my answer to my own question here. It seems to have fixed the issue for several people already without the need for meteor reset so it's worth a try if you haven't found a fix yet. Good luck!

Related

Vscode fatal error when running debug console

I keep getting this error whenever I try to console log any code.
I think you might need some form of an extension like Javascript debugger(It's available on the vscode extension store ). You do need to check if it does the job for you or not. Sharing your main code here might also help in better understanding the problem.
If you are using node.js , this is a good fix for your problem
Fatal JavaScript invalid size error 169220804
Otherwise, reinstalling vscode from scratch might be another good option for you if everything else fails.
I found the solution. It was an error in my code in a for loop iteration :(.
Apparently the for loop had no break point.
I fixed it and the console worked with no issues.

TestCafe Runner.run(runOptions) never returns, browser hangs (Firefox & Chrome)

I've got a little sandbox project I've been playing around with for the last few weeks to learn the in's and out's of implementing a TestCafe runner.
I've managed to solve all my problems except one and at this point I've tried everything I can think of.
Reviewed the following similar questions:
How to close testcafe runner
How to get the testCafe exit code
But still my problem remains.
I've toyed around with my argv.json file.
I've toyed around with my CICDtestBranches.json file.
I've toyed around with my package.json file.
I've tested the same branch that has the problem on multiple
machines.
I've tested with multiple browsers (Firefox & Chrome) -
both produce the same problem.
I've tried to re-arrange the code, see
below
I've tried add multiple tests in a fixture and added a page
navigation to each one.
I've tried to remove code that is processing
irrelevant options like video logs & concurrency (parallel execution)
I also talked with some coworkers around the office who have done similar projects and asked them what they did to fix the problem. I tried their recommendations, and even re-arranging things according to what they tried and still no joy.
I've read through the TestCafe documentation on how to implement a test runner several times and still I haven't been able to find any specific information about how to solve a problem with the browser not closing at the end of the test/fixture/script run.
I did find a few bugs that describe similar behavior, but all of those bugs have been fixed and the remaining bugs are specific to either Firefox or Safari. In my case the problem is with both Chrome & Firefox. I am running TestCafe 1.4.2. I don't want to file a bug with TestCafe unless it really is a confirmed bug and there is nothing else that can be done to solve it.
So I know others have had this same problem since my coworker said he faced the same problem with his implementation.
Since I know I am out of options at this point, I'm posting the question here in the hopes that someone will have a solution. Thank you for taking the time to look over my problem.
When executing the below code, after the return returnData; is executed, the .then statement is never executed so the TestCafe command and browser window are never terminated.
FYI the following code is CommonJS implemented with pure NodeJS NOT ES6 since this is the code that starts TestCafe (app.js) and not the script code.
...**Boiler Plate testcafe.createRunner() Code**...
console.log('Starting test');
var returnData = tcRunner.run(runOptions);
console.log('Done running tests');
return returnData;
})
.then(failed => {
console.log(`Test finished with ${failed} failures`);
exitCode = failed;
if (argv.upload) return upload(jsonReporterName);
else return 0;
testcafe.close();
process.exit(exitCode);
})
.then(() => {
console.log('Killing TestCafe');
testcafe.close();
process.exit(exitCode);
});
I've tried to swap around the two final .then statements to try and see if having one before the other will cause it to close. I copied the testcafe.close() and process.exit() and put them after the if-else statement in the then-failed block, although I know they might-should not get called because of the if-else return statements just before that.
I've tried moving those close and exit statements before the if-else returns just to see if that might solve it.
I know there are a lot of other factors that could play into this scenario, like I said I played around with the runOptions:
const runOptions = {
// Testcafe run options, see: https://devexpress.github.io/testcafe/documentation/using-testcafe/programming-interface/runner.html#run
skipJSErrors: true,
quarantineMode: true,
selectorTimeout: 50000,
assertionTimeout: 7000,
speed: 0.01
};
Best way I can say to access this problem and project and all of the code would be to clone the git lab repo:
> git clone "https://github.com/SethEden/CAFfeinated.git"
Then checkout the branch that I have been working this problem with: master
You will need to create an environment variable on your system to tell the framework what sub-path it should work with for the test site configuration system.
CAFFEINATED_TEST_SITE_NAME value: SethEden
You'll need to do a few other commands:
> npm install
> npm link
Then execute the command to run all the tests (just 1 for now)
> CAFfeinated
The output should look something like this:
$ CAFfeinated
Starting test
Done running tests
Running tests in:
- Chrome 76.0.3809 / Windows 10.0.0
LodPage
Got into the setup Test
Got to the end of the test1, see if it gets here and then the test is still running?
√ LodPage
At this point the browser will still be spinning, and the command line is still busy. You can see from the console output above that the "Done running tests" console log has been output and the test/fixture should be done since the "Got to the end of the test1,..." console log has also been executed, that is run as part of the test.after(...). So the next thing to execute should be in the app.js with the .then(()) call.....but it's not. What gives? Any ideas?
I'm looking for what specifically will solve this problem, not just so that I can solve it, but so others don't run into the same pitfall in the future. There must be some magic sauce that I am missing that is probably very obvious to others, but not so obvious to me or others who are relatively new to JavaScript & NodeJS & ES6 & TestCafe.
The problem occurs because you specified the wrong value for the runner.src() method.
The cause of the issue is in your custom reporter. I removed your reporter and now it works correctly. Please try this approach and recheck your reporter.

Emscripten: 'undefined symbol' when calling JavaScript from C/C++; ERROR_ON_UNDEFINED_SYMBOLS does not work

Actually I've two questions, because the common workaround for my initial problem does not work :)
I'm trying to build an Emscripten based library which calls JavaScript functions as described here: https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#implement-a-c-api-in-javascript
Simply put I just implement my C/C++ code against a C-Function, implement that function in a .js file and 'link' that file using --js-library.
Basically things are working for me except with version EMSDK version 1.38.12 I got a warning when linking the final library:
warning: undefined symbol: foo_
.. which I don't understand but I could just ignore it. In newer versions of EMSDK the behavior changed and the warnings become errors.
Searching for this error you find you can just add -s ERROR_ON_UNDEFINED_SYMBOLS=0 when linking, but this doesn't work (for me) - I still get this error despite I can see this option being added to the linker.
So my questions are:
how do I make -s ERROR_ON_UNDEFINED_SYMBOLS=0 work for me?
and why do I get this warning in the first place? how do I get rid of it?

Can't retrieve a valid WinSAT assessment. javascript console

i frequently get this error when running my web app on google chrome
[2536:2008:0502/143602:ERROR:gpu_info_collector_win.cc(96)] Can't retrieve a valid WinSAT assessment.
its ok in firefox and IE..
i've already search for solutions but with no luck.
i am using Aptana Studio + Sencha
how to get rid of this?
I had this error when I was providing the path to chrome.exe as the system property - it went away when I was using chromedriver.exe as downloaded from here: https://code.google.com/p/chromedriver/downloads/list
This means that winsat validation failed.
Winsat is a tool that checks out windows. If it fails, normally this indicates that something is wrong with your system (probably a driver).
In the above case, I would go with the display adapter driver, so try to update it via the Windows Update.
To run winsat yourself, you can run 'winsat formal' from the command line. Then you can look for suspicious output (if you have 0 F/S performance in the direct3d, then this is not fine :-))
Based on the problematic output, you can see what is wrong in the system (in the above example, the display adapter was found as a standard VGA, and a simple update, fixed the error made chrome/selenium).
HTH

undefined method `invalid_element_errors' in capybara-webkit

first off I'd like to point out that I'm a bit new at this and thus hope this post will be understandable.
Gems:
rails (2.3.11
nokogiri (1.5.4)
cucumber (1.1.9)
capybara (1.1.2)
copybara-webkit (0.12.1)
Right now I'm doing a project were I'm trying to use cucumber for integration testing of a rails web application.
Since the web-application relies heavily on javascript and ajax I want to use a capybara driver that can handle this. (I just realized :rake_test does not) But I don't want to have a browser window pop up all the time as that will take time.
So I opted on capybara-webkit.
But now that I changed driver, by setting the javascript driver for capybara in my env.rb, I keep getting a annoying error all the time:
undefined method `invalid_element_errors' for #<Capybara::Driver::Webkit:0x9c50bf8> (NoMethodError)
./features/step_definitions/some_steps.rb:37
My code at that line:
>> 35 select("something", :from => find("select[class='class_name']")[:id])
>> 36 click_link('javascript_link')
>> 37 click_link('another_javascript_link')
I'm using a find in line 35 since the id is dynamic.
Now it seems like the problem is actually the find method since if I add another find with known id above this point I'm getting the same error thrown on me on that line instead.
How do I get rid of this problem so I can use capybara-webkit?
I've heard somewhere that this is a problem in the actual driver and that a fix is available at the github masterbranch and that you somehow can link your gem there?
If so can anybody explain how to do it?
I've suffered this problem too. It's a capybara-webkit bug: the 0.12.1 version does not have the invalid_element_errors method.
There was a pull request a few months ago with the fix, but it wasn't merged (https://github.com/thoughtbot/capybara-webkit/pull/288). Now they have added the method in the master branch, so you have to use the git repository:
gem 'capybara-webkit', :git => 'git://github.com/thoughtbot/capybara-webkit'
Try it and see if it works for you :).

Categories