This error constantly appearing in the system.log:
DEPRECATED USE in libdispatch client: dispatch source activated with no event handler set; set a breakpoint on _dispatch_bug_deprecated to debug
The code in question is given bellow:
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[self doItInTheBackground];
dispatch_async(dispatch_get_main_queue(), ^{
[self.loadingSpinner stopAnimation:self];
[self.loadingPanel close];
});
});
EDIT:
Any program using GCD library seems to be getting this error, including systems apps like Terminal, Console, AppStore, etc.
EDIT 2:
As of 10.14.4, I can see several other messages as well, e.g.:
DEPRECATED USE in libdispatch client: Setting timer interval to 0 requests a 1ns timer, did you mean FOREVER (a one-shot timer)?; set a breakpoint on _dispatch_bug_deprecated to debug
And
BUG in libdispatch client: mach_recv, monitored resource vanished before the source cancel handler was invoked { 0xXXXXXXXXXXXX[source], ident: XX / 0xXX, handler: 0xXXXXXXXXXXXX }
Related
I'm using rabbitmq/rabbitmq-objc-client. Is there a way how to check if connection was opened successfully? I see there is RMQConnectionDelegate but there are only methods that are called when an error appears. I'm looking for something like
RMQConnection *conn = [[RMQConnection alloc] /*...*/];
if ([conn isOpen]) {
/* ... */
}
You can do this:
[conn start:^{ // code to execute when connection established }];
But note that the client is async and all channel operations are placed onto a queue for execution after the connection is established.
I've added a note to the issue Michael opened: https://github.com/rabbitmq/rabbitmq-objc-client/issues/101
While using the NServiceBus Scheduler I have been unsuccessful in triggering the delegate defined. I used the documentation at the link below to setup the EndpointScheduler class.
The endpoints corresponding timeout queue is created and a message successfully enters the queue. No errors are encountered during execution, but the scheduler does not trigger the delegate. I am currently using NServiceBus 5.2.14, a similar test works using NServiceBus 3.2.7. Any ideas why the Scheduler isn't triggering the delegate?
http://docs.particular.net/nservicebus/scheduling/
public class EndpointScheduler : IWantToRunWhenBusStartsAndStops, ILoggable
{
public EndpointScheduler(Schedule schedule)
{
this.schedule = schedule;
}
public void Start()
{
schedule.Every(
TimeSpan.FromMinutes(1),
"Test",
() =>
{
Debug.WriteLine("I'm testing the scheduler");
}
);
}
public void Stop()
{
}
}
Thanks to #DavidBoike for pointing out a few potential setup issues.
The endpoint configuration contained:
configuration.DisableFeature<TimeoutManager>()
Removing it corrected the issue I encountered.
The reason for this is that the scheduler is dependent upon the TimeoutManager. It works by deferring a message to be processed later (using the TimeoutManager) and when that message is received, the delegate is invoked. Without the TimeoutManager activated, this can't work.
I am trying to send the message by using pubnub.
But it gives me error for : PNAccessDeniedCategory
I am not finding any solution how to solve this.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
PNConfiguration *configuration = [PNConfiguration configurationWithPublishKey:#"pub-c-..."subscribeKey:#"sub-c-..."];
self.client = [PubNub clientWithConfiguration:configuration];
//Subscription process results arrive to listener which should adopt to PNObjectEventListener protocol and registered using:
[self.client addListener:self];
//Listeners callbacks:
[self.client subscribeToChannels: #[#"test123"] withPresence:YES];
NSLog(#"channel-->%#",self.client.channels);
configuration.uuid = #"test123";
}
- (void)client:(PubNub *)client didReceiveStatus:(PNSubscribeStatus *)status {
if (status.category == PNUnexpectedDisconnectCategory) {
// This event happens when radio / connectivity is lost
}
else if (status.category == PNConnectedCategory) {
// Connect event. You can do stuff like publish, and know you'll get it.
// Or just use the connected event to confirm you are subscribed for
// UI / internal notifications, etc
}
else if (status.category == PNReconnectedCategory) {
// Happens as part of our regular operation. This event happens when
// radio / connectivity is lost, then regained.
}
else if (status.category == PNDecryptionErrorCategory) {
// Handle messsage decryption error. Probably client configured to
// encrypt messages and on live data feed it received plain text.
}else if (status.category == PNAccessDeniedCategory) {
Nslog(#"It gives me this error");
}
}
Please advice. Whether this error is because my account is expired and that is the reason it is not allowing me to access ?
Do i have to create another free account ? or have to create new key ?
Please help.
PubNub Access Manager
You have Access Manager add-on enabled on your keys and so it is just doing its job - denying un-granted access to your keys. You must grant all access to use your keys once this is enabled. When you enable Access Manager a dialog pops up with a warning:
Warning: This action will enable Access Manager on your keyset. If you
are already using this keyset in a production application, please be
aware you will need to grant access to all existing channels in order
to continue use without interruptions.
Here is a snapshot of that dialog:
You can disable Access Manager until you are ready to implement the proper granting logic on your server and you will no longer get this error.
Before you go live with your app, you should implement the necessary granting logic and enable Access Manager to protect your keys from being wrongfully used.
I'm using MBassador 1.2.1 message/event bus. Works well. Except that I am getting this error message in my logs, repeated for each of my instantiated bus objects:
WARN: No error handler configured to handle exceptions during publication.
Error handlers can be added to any instance of AbstractPubSubSupport or via BusConfiguration.
Falling back to console logger.
The main project page shows this example line on a BusConfiguration object:
.addPublicationErrorHandler( new IPublicationErrorHandler{...} )
…yet neither my IDE nor I see any such method on the BusConfiguration class.
How should I go about installing an error handler for Mbassador?
Add it as another property when building the configuration bus:
IBusConfiguration config = new BusConfiguration()
.addFeature(Feature.SyncPubSub.Default())
.addFeature(Feature.AsynchronousHandlerInvocation.Default())
.addFeature(Feature.AsynchronousMessageDispatch.Default())
.setProperty(Properties.Common.Id, "Command Channel Bus")
.setProperty(Properties.Handler.PublicationError, new IPublicationErrorHandler() {
#Override
public void handleError(PublicationError error) {
}
});
I had the exact same issue as you and this solved my problem.
On iOS (but I think this would be just the same on OSX) I'm using STTWitter.
Among other things, I want to use it to stream the main public timeline.
I've successfully used getStatusesSampleDelimited:stallWarnings:progressBlock:stallWarningBlock:errorBlock: to start streaming tweets.
How can I stop the stream once I've got enough, or want to switch to a different stream (e.g. streaming a search)?
I've tried destroying the STTWitterAPI object - with no effect. I can't see a method on the object to stop streaming, and I've traced the source code through and don't see any way I can stop a stream once it's started.
What have I missed?
The library didn't support cancelling request, so I just added this feature:
id request = [twitter getStatusesSampleDelimited:nil
stallWarnings:nil
progressBlock:^(id response) {
// ...
} stallWarningBlock:nil
errorBlock:^(NSError *error) {
// ...
}];
// ...
[request cancel]; // when you're done with it
After request cancellation, the error block is called once with a cancellation error.
Let me know if it doesn't fulfil your needs.