Remove unnecessary logs in cli - nativescript

How to remove this unnecessary logs in my command line. Because it's really hard to see my own logged datas. It appears when I updated my nativescript version to 4.0.0+.

Do you have any examples of the kinds of unnecessary logs you're seeing? iOS or Android?
If you're on iOS, one possible case is that you're seeing a bunch of extra logs related to network requests. As of 4.1.0, there still appears to be a problem that causes these logs to reach the console when a network request fails. This is a bug. These logs should NOT reach the console unless you run tns device log.
If this is the problem you're encountering, you can track the issue (and resolution) here: https://github.com/NativeScript/nativescript-cli/issues/3544
Hope that helps.

Related

Xcode 13 won't stay paused at breakpoint

I'm on Xcode 13 GM (13A233) and I'm noticing that it won't stay paused when it hits a breakpoint. It stops, but about a minute later it just resumes. Is there a new default setting that might cause this? I don't see anything relevant in "Behaviors," but maybe I'm missing something. Has anybody else encountered this issue?
The only unusual thing about my project is that I am calling Python from it, using PythonKit. But this breakpoint pause issue isn't isolated to code involving PythonKit.
I've tried all the usual "fixes"—i.e., clean build, delete derived data, reboot, etc. The app is just a simple SwiftUI app for macOS.
This is actually the debugger crashing and the app detaching: The LLDB RPC server has crashed. You may need to manually terminate your process. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log....
It doesn't do it my main View, but does do it in a static method called on a singleton in the app, and also at various points in a custom package I'm developing alongside the app.
I see a similar unresolved issue from August at bugs.swift.org: https://bugs.swift.org/browse/SR-15110?jql=text%20~%20%22lldb%20crash%22, In case anyone else is seeing the same issue (maybe you can post your log there).
UPDATE: I completely forgot that I was running on a dev snapshot toolchain. All good in Xcode 13.1 with bundled toolchain. Moral of the story; if something really strange is going on, check your toolchain.

EDSDK EdsOpenSession EXC_BAD_ACCESS signal

I believe this is similar to the thread: Canon SDK 2.11 on OSX
However the solution there did not work for me. I'm perplexed because I'm not sure how to figure out what has changed. I had some working software, did not work on it over the holiday and now when I open it up to work it fails. Not only my software but the demo app included with the SDK, which I have never changed and indeed used to work just fine.
I have tried with two different cameras (5DmII and 5DmIII) with the same result.
when I try and run the application, the camera is recognized but, as it attempts to open a session it receives a EXC_BAD_ACCESS signal. In each program it happens when a call is made to EdsOpenSession() with this message...
*** -[NSConcreteData release]: message sent to deallocated instance 0x8157af0
Interestingly, when I tried to use the EOS Utility that would crash also. So I updated and now that works great. I followed the suggestion in the above thread and copied the EDSDK.framework from the working bundle to my program and recompiled but I get the same results.
I'm trying to figure out how to contact Canon to get some information but they don't make it easy to get help so I'm appealing to the one group I know is responsive.
The only thing I can think is that sometime over the holiday I updated some critical library without knowing it.
Has anyone else run into and been able to solve this?
I'm running OS X 10.7.5, xcode 4.1, and EDSDK 2.11.3
Solved this. It did turn out to be the same solution as the mentioned link. However, what I was missing was that I needed to also copy the new EDSDK.framework into /Library/Frameworks not just have it in my source directory. This may be because I don't have everything setup correctly in XCode.

Slony-I service filling up my event viewer in Windows

I wrote a similar question before but I got no answers so I was thinking on asking again in a simpler way.
I have slony-I replicating databases in a windows environment (Master has windows xp and slave has windows 7, both with postgreSQL 8.2). I registered a service using slon -regservice in both master and slave and everything works fine.
The problem I have is that the service is writing logs in the event viewer every time it runs so I have 5 or 6 new logs every second. I was hoping that it would write only errors in the event viewer but it writes logs all the time and the event viewer in my master server is getting filled with them. Since windows xp has a limit of space in the event viewer, the logs make the event viewer reach its limit and all the applications that use the event viewer crash.
Is there a way to configure the slony service to avoid writing logs in the event viewer?
Any help will be greatly appreciated. I've been struggling with this problem for 2 weeks now and I read every tutorial in the web and all of them have the same instructions but none of them mentions the logs in the event viewer. Am I missing something?
Thanks!
You probably ought to raise a bug in the Slony-I bug database or e-mail their mailing list. Since it is open source you could even re-build it and remove the unwanted event logging. Also, you don't need to register to receive event logs but you probably want errors.
You appear to be using Windows XP which is rather decrepit now – it's 10 years old! The modern versions of Windows have much more resilient event logs.
Finally, you could reconfigure the event log settings to try to avoid the problem. You could make the log much bigger (512KB default is quite small) and there appear to be other settings available. Open the event viewer, right click one of the event logs and select properties.

Couldn't register with the bootstrap Server

I just changed some code in my program and got this error:
Couldn't register com.yourcompany.XXX with the bootstrap server.
Error: unknown error code.
This generally means that another instance of this process was already
running or is hung in the debugger.Program received signal:
“SIGABRT”.
I tried restoring my program to a version that worked, rebooted, restarted, empty caches and rebuild on versions that even worked before.
Any help would be appreciated.
I was able to recover from this by unplugging the iPad, powering it down and back up, clearing all XCode caches and targets, and doing a clean build.
I'm running XCode 3.5.4 and iOS 4.2.1
UPDATE: Same problem running Xcode 4.3 and iOS5 - just power-cycle the device.
You might wish to kill all Simulator processes, that can cause this error as well.
Here's a one-liner to kill 'em all:
kill -9 `ps ax | grep Simulator | grep -v grep | awk '{print $1}'`
Or more concise, like #brianegge mentions as a comment:
killall -9 Simulator
My solution was to restart the ipad, wait a while and try again.
If you get the hang when using the simulator, look at this thread: Strange Error When Testing Simulator
You may find this test of interest, as it will tell you ASAP if the only solution is to reboot now or not:
Open Terminal and run this command: ps -Ael | grep Z. If you get two entries, one "(clang)" and the other your app or company name, you're hosed - reboot.
If you are a developer, enter a short bug and tell Apple how absolutely annoying having to reboot is, and mention they can dup this bug to "rdar://10401934" .
I received the same problem, running an app on an iPhone from Xcode. The message that I was getting was the same as above:
Couldn't register xxx.com.company.appname with
the bootstrap server. This generally
means that another instance of this
process was already running or is hung
in the debugger.
I tried many things to fix the problem, in this order, all which failed:
force quitting the app on the iPhone
force quitting and then deleting the app the iPhone
opening and closing the project
cleaning the project
restarting XCode
Eventually, I rebooted the iPhone and the problem went away, which leads me to think that the source of the problem is a hung process that Xcode cannot or will not kill. If I am able to reproduce exactly what I was doing during my debugging session to get this strange state I'll add another note here.
I opened a bug report with Apple: https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/19/wo/WBbbbyopNFW8FFUuNSbk0w/10.66
Please let me know if you can't access it.
Summary: XCode debugger is not releasing bootstrap server port
Steps to Reproduce:
While debugging an iPhone iOS5 app in the simulator in Xcode 4.2 Build 4D5163b on Lion 10.7.2, a crash can sometimes result in being unable to start the bugger. Instead, Xcode produces this error:
Couldn't register com.MyApp.MyApp with the bootstrap server.
Error: unknown error code. This generally means that another instance
of this process was already running or is hung in the debugger.Program
received signal: “SIGABRT”.
Expected Results:
Should be able to start debugger after a crash.
Actual Results:
Cannot start debugger. The only way I've discovered to make the simulator work again is to restart Mac OS.
Regression:
Notes:
Lots of people are having this problem:
iPhone - strange error when testing on simulator
Couldn't register with the bootstrap Server
Bootstrap Server Error in Xcode IPHONE
https://discussions.apple.com/message/10416765?messageID=10416765
Quitting XCode and the Simulator (& ensuring ps -Al | egrep "Xcode|Simulator" returns nothing) does not help the problem.
Running "launchtl bslist | grep MyApp" reveals that com.MyApp is still registered with the bootstrap server:
$ launchctl bslist | grep MyApp
A com.MyApp.MyApp.UIKit.migserver
A com.MyApp.MyApp
I wrote some code to find the port and invalidate it, but this too fails:
NSMachBootstrapServer *bsserver = [NSMachBootstrapServer sharedInstance];
NSMachPort *port = (NSMachPort *)[bsserver portForName:#"com.MyApp.MyApp"];
[port removeFromRunLoop:[NSRunLoop currentRunLoop] forMode:<#(NSString *)#>
NSLog(#"port = %#",port);
NSLog(#"port.isValid=%d",[port isValid]);
[port invalidate];
NSLog(#"port.isValid=%d",[port isValid]);
I got the same issue with Xcode 4. The solution was to change the scheme.
Run set to Debug,
Test set to Debug,
Profile set to Release,
Analyze set to Debug,
Archive set to Release
Restarting my computer solved my problem. This error happened when I connected my new iPod Touch to my mac and ran my project in simulator at the same time.
The easiest way its to change the target name,
Remembert to change it back next day after a restart.
To sum it all up.
Sometimes kill -9 (the process id) helps.
Sometimes (as stated) launchctl list | grep UIKitApplication | grep "(your app name/identifier)" | awk '{print $3}' | xargs launchctl remove works.
But if its a "zombie" process, only a restart will solve your problem.
A temporary solution is to just change the identifier (IOS Application Target, Summary Tab) to something else (like "com.mycompany1.myapp" from "com.mycompany.myapp") but remember to change it back after the reboot and before you submit it.
(of course this will create another app on the simulator, but I guess that's the least of your problems....)
Unfortunately, there is no "easy way to greatness"... ;-)
Here is how I think I solved this 'strange' error:
Couldn't register com.yourcompany.XXX with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.Program received signal: “SIGABRT”.
(1) Clean all the caches, targets, headers on both Xcode and the simulator.
(2) Restart your iPhone when it is not connected to the computer and make sure no versions of the program that gave you problems are left on your iPhone.
(3) Restore any previous version of your program that you know absolutely worked at one point in time.
(4) Shut down your computer/laptop. (I needed to do it 4 times.) Makes no sense to me.
(5) Restart your machine and try running a different program to see if you still get the error. If you do not get the error on another program.
(6) Compile the program that gave you the error:(1) First with an earlier version that worked. And then, the version that gave you the error. Naturally, you may have to re-add code on a step-wise basis to make sure you know what code caused the error.
This happened to me because another application was eating up the computer's resources. I quit the simulator, quit the application which was hanging my computer and restarted the simulator, and it worked then. The error means that a previously killed process couldn't reach the end of the queue, and is holding up the current one.
Lot's of good answers have been provided for fixing the problem.
I have found that I can recreate this bug by creating a breakpoint in my code so that the execution pauses. Then if I press on the Stop Button the bug will now appear when I try to run the code again. Resuming the execution before pressing the Stop Button therefore avoids this issue.
Hope this helps.
closing down xcode then starting it, and restarting my iphone solved my problem
I didn't find a better solution than mentioned above: restart the iPhone. It seems that there's a daemon that connects to the Xcode debugger not properly killed.
You can avoid this behavior ALWAYS stopping the debugging session through the "Stop" button in Xcode, and waiting for the app to exit automatically on the iPhone. I always have to reboot if I click "Start" without stopping first, or exiting with the iPhone's button, or something like that. Hope it helps
I encountered this issue myself just now while evaluating AppCode. I discovered that XCode had somehow attached itself to my application while I was attempting to attach AppCode to my application. I simply stopped the XCode debug session and it worked as expected. I hope this will help somebody.
Just rebooting the device should solve the problem. See the analogous question about the simulator: iPhone - strange error when testing on simulator
This may be caused by an instance of your app running in the background. This simplified process worked for me without even having to close xCode or shutdown my computer.
Close simulator
Stop the app from running in xCode.
Open activity monitor and search for a process running with your App NAME.
Kill this process in Activity Monitor
Rebuild your project and you should be all set
In theory Pål's command line solution should work as well. The issue definitely seems to be caused by an extra instance of the app running in the background. The app does not always seem to be getting killed properly after each test in simulator or on the device. I first noticed this when jumping between simulator and a device frequently.
As a preventive measure it is good practice to always hit the stop button in xCode after each test.
Very interesting results when trying to restart my computer. It said, and this is no joke, that 103 users where "sharing" the system. When I restarted, it back down to the usual four (I have Time Machine stuff for all of my computers going through this computer). I stopped the problem by simply setting up an app that monitors that activity, and does not allow additional users to "share" my computer without my permission. What it does is create a window every time someone wants access, and I have to press "Approve" before they can get in. This didn't work properly until I made the changes below.
I made sure it would tell me when somebody stopped sharing. Whenever Xcode has this problem, I know long before it returns the errors.
This is now useful for almost everything, but annoying during gaming of any kind.
I then wrote a script that fixed the problem by, basically, clearing the Simulator processes that might possible cause problems.
This app will be very useful to developers, so I am "polishing" it up a bit, then it is off to the App Store. When it gets to that point, I will post a link to it here (it will be free).
Okay, I've got a workaround for the hardware issue that doesn't involve rebooting the phone. I assume this will also work on the simulator but I haven't tried it.
Force Springboard to relaunch by changing the language. Settings -> General -> International -> Language.
I just changed it to Spanish, waited for Springboard to relaunch, changed it back to English, and was good to go.
This evening I got the same issue saying
"Couldn't register com.xxx.yyy with the bootstrap server. Error:
unknown error code.
This generally means that another instance of this process was already
running or is hung in the debugger.(lldb)"
and I got solved
1.Just disconnect my Device (for me its iPhone) from Xcode/ Mac machine
2.Reboot the Device (my iPhone)
3.Removed previously installed/corrupted app
4.Again connect device and started exception
It works well
Hope this will help someone there.

Detect/Redirect core dumps (when a software crashes) on Windows

For my work, I need to create a service that will detect an abnormal program termination and, instead of displaying a message to the user (default behavior), send the generated core dump to a remote server.
I'm pretty sure this can be done, but I have absolutely no clue on where to start. Is there any API/registry settings for this ?
Thank you.
One method is to install an Unhandled Exception Filter and then write a minidump from it which you can then upload to some place of your choosing. I wouldn't totally disregard Windows Error Reporting -- that's an addition to any crash reporting of your own. If your application is for public release then registering for Windows Error Reporting is well worthwhile as you get information about which crashes users are encountering in the wild and when crashes have been fixed you can add a response code to point them to a new version or other relevant information.
Another tool that may be useful depending on how your application is deployed in your organisation is to run Adplus on a user's machine which will collect together crash dumps. This is more useful for one-off crashes that seem to affect an individual user but aren't reproducible in a development environment.
Some other useful links:
http://www.debuginfo.com/articles/effminidumps.html - some useful sample code
http://www.codeproject.com/KB/debug/postmortemdebug_standalone1.aspx
It seems my question was either obvious or stupid (both ?) but anyway, i found some interesting pages after some researches.
Here are the links I found useful:
Track application crashes and disable Windows Error Reporting at the same time!
Disable error reporting

Resources