using rabbit mq with rebus keeps publishing the events - rebus

I am using Rebus and I am subscribing to RabbitMq as explained here in the document:
https://github.com/rebus-org/Rebus/wiki/RabbitMQ-transport
Using Autofac container.
Registering handlers:
_builder.RegisterAssemblyTypes(assembly)
.Where(t => t.IsClass && !t.IsAbstract && t.GetInterfaces().Any(IsRebusHandler))
.As(GetImplementedHandlerInterfaces)
.InstancePerDependency()
.PropertiesAutowired();
Action<OptionsConfigurer> optionsConfigurer = o =>
{
o.SetNumberOfWorkers(2);
o.SetMaxParallelism(30);
};
_rebusConfig = (configurer, context) => configurer
.Routing(r => r.TypeBased().MapAssemblyOf<MyMessage>(destination))
.Transport(t=> t.UseRabbitMq(connectionString, endPointName))
.Options(OptionsConfigurer );
_builder.RegisterRebus(_rebusConfig);
And in startup code:
var bus = container.Resolve<IBus>()
bus.Start();
Where there is a subscriber:
var events = container.Resolve<IEnumerable<IAppEvent>>();
foreach (var evt in events)
{
bus.Subscribe(evt.GetType());
}
Handler code:
public async Task Handle(FundsTransfer_InitiateFundsTransferCommand message)
{
FundsTransferCompletedEvent #eventSuccess = new FundsTransferCompletedEvent
{
Desc=_packet.cmd.model.Desc
};
await bus.Publish(#eventSuccess);
}
When I execute the end point, I get continuous message as below:
It continuously publishes message without executing the handler.
Can anyone help where it might be wrong.
2019-10-22 08:40:33.183 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.190 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.193 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "d729e3f8-ced9-47e5-8c79-96c8a99b7473" to 1 handlers took 42 ms
2019-10-22 08:40:33.197 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.209 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.210 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "e1dc6be7-bc18-4c21-9ed0-422ca19b2ad5" to 1 handlers took 35 ms
2019-10-22 08:40:33.212 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.222 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.223 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.224 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.228 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.230 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.233 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.239 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "8f1fd52c-dd87-4cdb-9341-c71e4ac0801b" to 1 handlers took 30 ms
2019-10-22 08:40:33.242 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "ee1e2ccb-eeec-4802-9f5e-7767efcab678" to 1 handlers took 19 ms
2019-10-22 08:40:33.246 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.253 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.253 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.255 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.256 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.260 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.263 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.267 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.271 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "e8a6c158-13e1-4ca6-a351-c1e6df37ac61" to 1 handlers took 17 ms
2019-10-22 08:40:33.273 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "95ac2bac-a947-4757-9b24-c693909f2224" to 1 handlers took 27 ms
2019-10-22 08:40:33.285 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.285 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.286 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.289 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.291 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.293 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.300 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.302 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.304 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "4af26345-73fd-44b1-9127-514769337c3c" to 1 handlers took 19 ms
2019-10-22 08:40:33.306 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "49825f15-c7a0-4dde-a8e4-fa249b8d38d5" to 1 handlers took 21 ms
2019-10-22 08:40:33.318 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.318 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.320 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.322 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.324 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.329 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.332 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.333 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.336 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "92803028-5c0f-47d0-bb52-5765377b03c0" to 1 handlers took 18 ms
2019-10-22 08:40:33.339 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "0fac55d6-653b-462f-bc9b-26ba86a8d069" to 1 handlers took 21 ms
2019-10-22 08:40:33.348 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.348 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.350 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.352 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.354 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.356 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.361 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.366 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.384 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "5c7e1870-7746-4053-bb1d-e4b6d1f519eb" to 1 handlers took 35 ms
2019-10-22 08:40:33.385 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "1ac9d320-b026-449d-9c05-4aead10250d7" to 1 handlers took 36 ms
2019-10-22 08:40:33.405 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.409 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.410 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.412 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.416 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.420 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.422 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.426 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "a7090778-3c3a-41ca-bd88-fa5819f7af29" to 1 handlers took 20 ms
2019-10-22 08:40:33.429 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.437 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.438 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "aa267f55-27d0-48da-918d-6cc6c90f0be6" to 1 handlers took 28 ms
2019-10-22 08:40:33.440 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.447 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.449 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.454 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.456 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.459 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.462 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "7cfd754c-4a3c-48a3-9d9d-6ffe625e1187" to 1 handlers took 25 ms
2019-10-22 08:40:33.465 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.473 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.474 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "c161e531-51e1-498c-88a1-98a63f9c846e" to 1 handlers took 27 ms
2019-10-22 08:40:33.476 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.483 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.483 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.485 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.486 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.493 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "914705dc-dd7c-4ed6-8b54-bc29a96a4d5d" to 1 handlers took 19 ms
2019-10-22 08:40:33.495 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.503 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.503 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.505 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.508 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "6aab45ca-f875-47ec-985c-76ab26a3b2a8" to 1 handlers took 24 ms
2019-10-22 08:40:33.510 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.518 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.518 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.524 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "c8dba472-27f3-46cb-8ee0-abfae49a222d" to 1 handlers took 21 ms
2019-10-22 08:40:33.526 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.533 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.534 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.537 +05:30 [Debug] Bus Context: FlexBusOmegaContext
2019-10-22 08:40:33.539 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.540 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 08:40:33.544 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "4f4d5bbe-a700-4562-a41e-09d2ce4e8999" to 1 handlers took 26 ms
2019-10-22 08:40:33.546 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 08:40:33.556 +05:30 [Debug] Publishing message via Bus
2019-10-22 08:40:33.557 +05:30 [Debug] Dispatching "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages" "40847a7a-b789-4202-bc90-32fef097f01d" to 1 handlers took 23 ms
2
And in my handler end point, I get this message even if the handler is getting executed and publishing the event (using RabbitMq transport) :
2019-10-22 10:15:37.962 +05:30 [Debug] Bus Instance: RebusBus
2019-10-22 10:15:38.079 +05:30 [Debug] Sending NewStructure4.FundsTransferCompletedEvent -> "NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages#RebusTopics"
2019-10-22 10:15:40.146 +05:30 [Information] awaiting task
2019-10-22 10:15:44.268 +05:30 [Debug] Dispatching "NewStructure4.FundsTransfer_InitiateFundsTransferCommand, NewStructure4.Messages" "c38dea6e-e77f-4900-bdd0-ebaff4cedecc" to 1 handlers took 18803 ms
2019-10-22 10:15:47.112 +05:30 [Warning] Unhandled exception 1 (FINAL) while handling message with ID "e717b3a9-02b3-47f5-b519-2f8e1fdbaf2e"
Rebus.Exceptions.MessageCouldNotBeDispatchedToAnyHandlersException: Message with ID e717b3a9-02b3-47f5-b519-2f8e1fdbaf2e and type NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages could not be dispatched to any handlers (and will not be retried under the default fail-fast settings)
at Rebus.Pipeline.Receive.DispatchIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Sagas.LoadSagaDataStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.ActivateHandlersStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.HandleRoutingSlipsStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.DeserializeIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.HandleDeferredMessagesStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Retry.FailFast.FailFastStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Retry.Simple.SimpleRetryStrategyStep.DispatchWithTrackerIdentifier(Func`1 next, String identifierToTrackMessageBy, ITransactionContext transactionContext, String messageId, String secondLevelMessageId)
2019-10-22 10:15:47.225 +05:30 [Error] Moving message with ID "e717b3a9-02b3-47f5-b519-2f8e1fdbaf2e" to error queue "error"
System.AggregateException: 1 unhandled exceptions (Message with ID e717b3a9-02b3-47f5-b519-2f8e1fdbaf2e and type NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages could not be dispatched to any handlers (and will not be retried under the default fail-fast settings)) ---> Rebus.Exceptions.MessageCouldNotBeDispatchedToAnyHandlersException: Message with ID e717b3a9-02b3-47f5-b519-2f8e1fdbaf2e and type NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages could not be dispatched to any handlers (and will not be retried under the default fail-fast settings)
at Rebus.Pipeline.Receive.DispatchIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Sagas.LoadSagaDataStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.ActivateHandlersStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.HandleRoutingSlipsStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.DeserializeIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.HandleDeferredMessagesStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Retry.FailFast.FailFastStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Retry.Simple.SimpleRetryStrategyStep.DispatchWithTrackerIdentifier(Func`1 next, String identifierToTrackMessageBy, ITransactionContext transactionContext, String messageId, String secondLevelMessageId)
--- End of inner exception stack trace ---
---> (Inner Exception #0) Rebus.Exceptions.MessageCouldNotBeDispatchedToAnyHandlersException: Message with ID e717b3a9-02b3-47f5-b519-2f8e1fdbaf2e and type NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages could not be dispatched to any handlers (and will not be retried under the default fail-fast settings)
at Rebus.Pipeline.Receive.DispatchIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Sagas.LoadSagaDataStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.ActivateHandlersStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.HandleRoutingSlipsStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.DeserializeIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Pipeline.Receive.HandleDeferredMessagesStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Retry.FailFast.FailFastStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Retry.Simple.SimpleRetryStrategyStep.DispatchWithTrackerIdentifier(Func`1 next, String identifierToTrackMessageBy, ITransactionContext transactionContext, String messageId, String secondLevelMessageId)<---

Could you include the (gist of the) code that publishes the event? I suspect there's a logic problem hiding in there somehow. 🙂
The error message
2019-10-22 10:15:47.225 +05:30 [Error] Moving message with ID "e717b3a9-02b3-47f5-b519-2f8e1fdbaf2e" to error queue "error"
System.AggregateException: 1 unhandled exceptions (Message with ID e717b3a9-02b3-47f5-b519-2f8e1fdbaf2e and type NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages could not be dispatched to any handlers (and will not be retried under the default fail-fast settings)) ---> Rebus.Exceptions.MessageCouldNotBeDispatchedToAnyHandlersException: Message with ID e717b3a9-02b3-47f5-b519-2f8e1fdbaf2e and type NewStructure4.FundsTransferCompletedEvent, NewStructure4.Messages could not be dispatched to any handlers (and will not be retried under the default fail-fast settings)
at Rebus.Pipeline.Receive.DispatchIncomingMessageStep.Process(IncomingStepContext context, Func`1 next)
at Rebus.Sagas.LoadSagaDataStep.Process(IncomingStepContext context, Func`1 next)
(...)
indicates that Rebus could not handle a received message, in this case a FundsTransferCompletedEvent. You need to add a message handler to this bus instance, thus making it capable of handling this particular event.
If you're using the built-in handler activator, it could be something like
activator.Handle<FundsTransferCompletedEvent>(async message => {
// handle message in here
});
or, if you're using an IoC container, it would look different, depending on which container you're using. With Castle Windsor, Rebus provides a registration extension, which makes it possible to do this:
container.RegisterHandler<FundsTransferCompletedEventHandler>();
where FundsTransferCompletedEventHandler would then be a message handler:
public class FundsTransferCompletedEventHandler : IHandleMessages<FundsTransferCompletedEvent>
{
public async Task Handle(FundsTransferCompletedEvent message)
{
// handle message in here
}
}
I hope that makes sense. 🙂
I'll update the answer as more detailes are added to the question.

Found the mistake. Was calling the bus.Subscribe from a common library in all end points.
foreach (var evt in events)
{
bus.Subscribe(evt.GetType());
}
Need to be configured for the subscriber end point only. By default, it does not ignore configuration in the absence of any event handlers present in the end point.
To get the correct behaviour, I deleted the queues and recreated those in RabbitMq.

Related

trying to host my website on firebase gives error - An unexpected error has occured - Error log files included

I tried this command to host my app on firebase :
node_modules/.bin/firebase deploy --only hosting
And i get this error : "Error: An unexpected error has occurred"
These are the log files :
[error] Error: An unexpected error has occurred.
[debug] [2023-02-06T11:29:18.454Z] ----------------------------------------------------------------------
[debug] [2023-02-06T11:29:18.456Z] Command: D:\Program Files (x86)\node.exe C:\Users\JustDankas\Desktop\NextJS\books-app\node_modules\firebase-tools\lib\bin\firebase.js deploy --only hosting
[debug] [2023-02-06T11:29:18.456Z] CLI Version: 11.22.0
[debug] [2023-02-06T11:29:18.456Z] Platform: win32
[debug] [2023-02-06T11:29:18.457Z] Node Version: v17.8.0
[debug] [2023-02-06T11:29:18.458Z] Time: Mon Feb 06 2023 13:29:18 GMT+0200 (Eastern European Standard Time)
[debug] [2023-02-06T11:29:18.458Z] ----------------------------------------------------------------------
[debug]
[debug] [2023-02-06T11:29:18.539Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2023-02-06T11:29:18.540Z] > authorizing via signed-in user
[debug] [2023-02-06T11:29:18.540Z] [iam] checking project my-example-project for permissions ["firebase.projects.get","firebasehosting.sites.update"]
[debug] [2023-02-06T11:29:18.543Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-example-project:testIamPermissions [none]
[debug] [2023-02-06T11:29:18.543Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-example-project:testIamPermissions x-goog-quota-user=projects/example
[debug] [2023-02-06T11:29:18.543Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-example-project:testIamPermissions {"permissions":["firebase.projects.get","firebasehosting.sites.update"]}
[debug] [2023-02-06T11:29:19.588Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-example-project:testIamPermissions 200
[debug] [2023-02-06T11:29:19.589Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-example-project:testIamPermissions {"permissions":["firebase.projects.get","firebasehosting.sites.update"]}
[debug] [2023-02-06T11:29:19.590Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/my-example-project [none]
[debug] [2023-02-06T11:29:20.083Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/my-example-project 200
[debug] [2023-02-06T11:29:20.083Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/my-example-project {"projectId":"my-example-project","projectNumber":"xxxxxxxxxxx","displayName":"Books-app","name":"projects/my-example-project","resources":{"hostingSite":"my-example-project","storageBucket":"my-example-project.appspot.com","locationId":"europe-west"},"state":"ACTIVE","etag":"adsaas"}
[debug] [2023-02-06T11:29:42.446Z] TypeError: Cannot read properties of null (reading 'toString')
at ɵcodegenFunctionsDirectory (C:\Users\JustDankas\Desktop\NextJS\books-app\node_modules\firebase-tools\lib\frameworks\next\index.js:222:18)
at async prepareFrameworks (C:\Users\JustDankas\Desktop\NextJS\books-app\node_modules\firebase-tools\lib\frameworks\index.js:306:84)
at async deploy (C:\Users\JustDankas\Desktop\NextJS\books-app\node_modules\firebase-tools\lib\deploy\index.js:53:13)
[error]
[error] Error: An unexpected error has occurred.
it builds fine locally , also firebase emulator hosts it properly on my local machine, but actual hosting don't work.
Tried to find toString() in my code, didn't find any, prob its not that

Firebase crashlytics mapping file is not uploading on a Ubuntu AWS container

I recently migrated to firebase-crashlytics-gradle from the deprecated Fabric library. It works properly on the local machine with these commands:
chmod +x ./gradlew
./gradlew clean
./gradlew assembleApplicationQa appDistributionUploadApplicationQa --debug
however, this is not working on the ubuntu container in the code build pipeline on AWS. The error that is showing is this one:
* What went wrong:
00:32:26.407 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution
failed for task ':app:uploadCrashlyticsMappingFileApplicationQa'.
00:32:26.407 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] >
java.io.FileNotFoundException:
/codebuild/output/src160981101/src/application/app/build/outputs/mapping/application/qa/mapping.txt
(No such file or directory)
00:32:26.407 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
I found that on the local there is a process in that task that is not happening con the ubuntu container: that is this one which seems like is reaching the Crashlytics server and uploads the file properly:
18:58:46.217 [DEBUG] [com.google.firebase.crashlytics] Uploading Mapping File [mappingFile: /Users/carlos/Desktop/Repo/Applicationandroid/Application/app/build/outputs/mapping/Application/qa/mapping.txt; mappingFileId: 764dc9b417f249f08823552e8e240186;packageName: com.Application.android.qa; googleAppId: 1:775166595613:android:604478ccade98840]
18:58:46.218 [DEBUG] [com.google.firebase.crashlytics] Zipping mapping file: /Users/carlos/Desktop/Repo/Applicationandroid/Application/app/build/outputs/mapping/Application/qa/mapping.txt -> /Users/carlos/Desktop/Repo/Applicationandroid/Application/app/build/crashlytics/ApplicationQa/mappings/764dc9b417f249f08823552e8e240186.gz
18:58:46.697 [DEBUG] [com.google.firebase.crashlytics] PUT file: /Users/carlos/Desktop/Repo/Applicationandroid/Application/app/build/crashlytics/ApplicationQa/mappings/764dc9b417f249f08823552e8e240186.gz to URL: https://firebasecrashlyticssymbols.googleapis.com/v1/project/-/app/1:775166595613:android:604478ccade98840/upload/java/764dc9b417f249f08823552e8e240186
18:58:46.698 [DEBUG] [com.google.firebase.crashlytics] PUT headers:
18:58:46.698 [DEBUG] [com.google.firebase.crashlytics] User-Agent = crashlytics-gradle/2.0.0
18:58:46.698 [DEBUG] [com.google.firebase.crashlytics] X-CRASHLYTICS-API-CLIENT-TYPE = crashlytics-gradle
18:58:46.698 [DEBUG] [com.google.firebase.crashlytics] X-CRASHLYTICS-API-CLIENT-VERSION = 2.0.0
18:58:46.698 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: default
18:58:46.698 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context
18:58:46.699 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection request: [route: {s}->https://firebasecrashlyticssymbols.googleapis.com:443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
18:58:46.699 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection leased: [id: 8][route: {s}->https://firebasecrashlyticssymbols.googleapis.com:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
18:58:46.699 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Opening connection {s}->https://firebasecrashlyticssymbols.googleapis.com:443
18:58:46.759 [DEBUG] [org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connecting to firebasecrashlyticssymbols.googleapis.com/142.250.113.95:443
18:58:46.759 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Connecting socket to firebasecrashlyticssymbols.googleapis.com/142.250.113.95:443 with timeout 0
18:58:46.811 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Enabled protocols: [TLSv1.2, TLSv1.1, TLSv1]
18:58:46.811 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
18:58:46.811 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Starting handshake
18:58:46.870 [DEBUG] [jdk.event.security] ValidationChain: 7087067, 1544128074,234213421
18:58:46.925 [DEBUG] [jdk.event.security] TLSHandshake: firebasecrashlyticssymbols.googleapis.com:443, TLSv1.2, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 1528437816
18:58:46.925 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Secure session established
18:58:46.925 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] negotiated protocol: TLSv1.2
18:58:46.925 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] negotiated cipher suite: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
18:58:46.926 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] peer principal: CN=upload.video.google.com, O=Google LLC, L=Mountain View, ST=California, C=US
18:58:46.926 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] peer alternative names: [upload.video.google.com, *.clients.google.com, *.docs.google.com, *.drive.google.com, *.gdata.youtube.com, *.googleapis.com, *.photos.google.com, *.upload.google.com, *.upload.youtube.com, *.youtube-3rd-party.com, upload.google.com, upload.youtube.com, uploads.stage.gdata.youtube.com]
18:58:46.926 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] issuer principal: CN=GTS CA 1O1, O=Google Trust Services, C=US
18:58:46.926 [DEBUG] [org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connection established 192.168.0.9:61946<->142.250.113.95:443
18:58:46.926 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Executing request PUT /v1/project/-/app/1:775166595613:android:604478ccade98840/upload/java/764dc9b417f249f08823552e8e240186 HTTP/1.1
18:58:46.926 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Target auth state: UNCHALLENGED
18:58:46.926 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Proxy auth state: UNCHALLENGED
18:58:51.688 [LIFECYCLE] [org.gradle.process.internal.health.memory.MemoryManager]
18:58:51.688 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting OS memory status event {Total: 17179869184, Free: 6186242048}
18:58:51.688 [DEBUG] [org.gradle.launcher.daemon.server.health.LowMemoryDaemonExpirationStrategy] Received memory status update: {Total: 17179869184, Free: 6186242048}
18:58:51.688 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting JVM memory status event {Maximum: 3817865216, Committed: 3571974144}
18:58:48.233 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger]
18:58:48.233 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :app:uploadCrashlyticsMappingFileAppicationQa
18:58:53.416 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Connection can be kept alive indefinitely
18:58:53.416 [DEBUG] [com.google.firebase.crashlytics] PUT response: [reqId=null] 200
18:58:53.416 [INFO] [com.google.firebase.crashlytics] Mapping file uploaded: /Users/hernandez/Desktop/Repo/Appicationandroid/Appication/app/build/outputs/mapping/Appication/qa/mapping.txt
18:58:53.416 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute uploadMappingFile for :app:uploadCrashlyticsMappingFileApplicationQa'
18:58:53.417 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute uploadMappingFile for :app:uploadCrashlyticsMappingFileApplicationQa' completed
18:58:53.417 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
18:58:53.417 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:uploadCrashlyticsMappingFileApplicationQa'
18:58:53.417 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :app:uploadCrashlyticsMappingFileApplicationQa'
18:58:53.417 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :app:uploadCrashlyticsMappingFileApplicationQa' completed
18:58:53.417 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :app:uploadCrashlyticsMappingFileApplicationQa (Thread[Task worker for ':',5,main]) completed. Took 7.201 secs.
':': acquired lock on root.1.26
As you can see the process uploads the file and then completes, however in the ubuntu container it doesn't happen:
00:32:25.697 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :app:uploadCrashlyticsMappingFileApplicationQa (Thread[Task worker for ':' Thread 7,5,main]) started.
00:32:25.697 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger]
00:32:25.697 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :app:uploadCrashlyticsMappingFileApplicationQa FAILED
00:32:25.697 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :app:uploadCrashlyticsMappingFileApplicationQa' started
00:32:25.697 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':app:uploadCrashlyticsMappingFileApplicationQa'
00:32:25.697 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Putting task artifact state for task ':app:uploadCrashlyticsMappingFileApplicationQa' into context took 0.0 secs.
00:32:25.697 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':app:uploadCrashlyticsMappingFileApplicationQa' is up-to-date
00:32:25.697 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Task ':app:uploadCrashlyticsMappingFileApplicationQa' is not up-to-date because:
Task has not declared any outputs despite executing actions.
00:32:25.697 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':app:uploadCrashlyticsMappingFileApplicationQa'.
00:32:25.697 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute uploadMappingFile for :app:uploadCrashlyticsMappingFileApplicationQa' started
00:32:25.701 [DEBUG] [com.google.firebase.crashlytics] Getting appId from output of the Google Services plugin at /codebuild/output/src160981101/src/Application/app/build/generated/res/google-services/Application/qa/values/values.xml
00:32:25.733 [DEBUG] [com.google.firebase.crashlytics] Found Google appId: 1:775166595613:android:604478ccade232432
00:32:25.741 [DEBUG] [com.google.firebase.crashlytics] Uploading Mapping File [mappingFile: /codebuild/output/src160981101/src/Application/app/build/outputs/mapping/Application/qa/mapping.txt; mappingFileId: 140f7e5865d146cdb1c49d4eae9d82b7;packageName: com.Application.android.qa; googleAppId: 1:775166595613:android:604478ccade232432]
00:32:25.742 [DEBUG] [com.google.firebase.crashlytics] Zipping mapping file: /codebuild/output/src160981101/src/Application/app/build/outputs/mapping/Application/qa/mapping.txt -> /codebuild/output/src160981101/src/Application/app/build/crashlytics/ApplicationQa/mappings/140f7e5865d146cdb1c49d4eae9d82b7.gz
00:32:25.742 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute uploadMappingFile for :app:uploadCrashlyticsMappingFileApplicationQa'
00:32:25.742 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute uploadMappingFile for :app:uploadCrashlyticsMappingFileApplicationQa' completed
00:32:25.743 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
00:32:25.743 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:uploadCrashlyticsMappingFileApplicationQa'
00:32:25.743 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :app:uploadCrashlyticsMappingFileApplicationQa'
00:32:25.743 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :app:uploadCrashlyticsMappingFileApplicationQa' completed
00:32:25.743 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :app:uploadCrashlyticsMappingFileApplicationQa (Thread[Task worker for ':' Thread 7,5,main]) completed. Took 0.045 secs.
So I really don't know what if going on, but this is breaking the pipeline because is not compiling, if I set the flag on the Gradle file of mappingFileUploadEnabled to false:
mappingFileUploadEnabled false
the project is compiling successfully but, when it is set to true it is not.
So seems like the problem is firebase is not reaching its server but I don't know why, the container doesn't have any IP restriction to firebase
Thank you for your help I really appreciate it!
After several days of doing this, I discovered that the problem is related to Crashlytics and the Gradle version if you use this configuration:
Docker Image for building the project: standard/ubuntu4:0 from this place
Gradle version: 4.10.3 and android Gradle plugin 3.3.3
Any version of Crashlytics from 17.0.0 and up
Progurad must be enabled and the flag to upload the mapping file to Crashlycts must be true
Then run the project and the project will crash.
The solution is to upgrade the Gradle version to 5.1.1 and the project will run properly, a code example is here
You can see through the comments, how the project evolved.

Why does large file upload fail on nginx?

I have a 140MB file that fails to upload on my nginx.
I have the following directives set in nginx.conf inside the 'server{}` block.
send_timeout 30m;
proxy_read_timeout 30m;
client_max_body_size 10g;
keepalive_timeout 0;
lingering_timeout 3m;
Smaller files are uploading. When I turned debug logs on, I see these lines in the last few statements:
[debug] 5291#0: epoll timer: -1
[debug] 4714#0: child: 3 5292 e:0 t:0 d:0 r:1 j:0
[debug] 4714#0: sigsuspend
[debug] 5292#0: epoll: fd:15 ev:0001 d:00007F9F294E72C8
[debug] 5292#0: channel: 32
[debug] 5292#0: channel command: 2
[debug] 5292#0: close channel s:0 pid:4990 our:4990 fd:10
[debug] 5292#0: channel: 32
[debug] 5292#0: channel command: 2
[debug] 5292#0: close channel s:1 pid:4991 our:4991 fd:12
[debug] 5292#0: channel: -2
[debug] 5292#0: timer delta: 141
[debug] 5292#0: worker cycle
[debug] 5292#0: epoll timer: -1
[debug] 5292#0: worker cycle
[debug] 5292#0: epoll timer: -1
Fix was to set this directive:
http2_recv_timeout 3m;
My client connection was slow which is why the file was not getting uploaded to the server.
I'm using nginx version 1.22.2
In my case it was not about the client or server configurations. It was about cloudflare not allowing uploads more than 100MB in their free plan.

Firebase Deploy "An unexpected error has occurred"

Trying to deploy a new site to Firebase (as I've done a dozen times, though haven't for a few months). Everything is going fine, but then when I get to "Firebase Deploy", I get "Error: An unexpected error has occurred". I've tried the suggestions given where a similar question was asked earlier ("An unexpected error has occurred" after firebase deploy) but none of them have done any good (keep getting the same error). Firebase is updated. Running on a Linux 64-bit (if it matters). I ran a debug on the deploy, and got the following log:
[debug] [2018-12-11T21:45:26.441Z] ----------------------------------------------------------------------
[debug] [2018-12-11T21:45:26.443Z] Command: /home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/node/bin/node /home/myName/.nvm/versions/node/v8.9.4/bin/firebase deploy
[debug] [2018-12-11T21:45:26.443Z] CLI Version: 3.18.5
[debug] [2018-12-11T21:45:26.443Z] Platform: linux
[debug] [2018-12-11T21:45:26.443Z] Node Version: v10.3.0
[debug] [2018-12-11T21:45:26.443Z] Time: Tue Dec 11 2018 14:45:26 GMT-0700 (MST)
[debug] [2018-12-11T21:45:26.443Z] ----------------------------------------------------------------------
[debug]
[debug] [2018-12-11T21:45:26.448Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2018-12-11T21:45:26.448Z] > authorizing via signed-in user
[debug] [2018-12-11T21:45:26.449Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","open
[debug] [2018-12-11T21:45:26.450Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token
{ refresh_token: '1/9RM51tbmmz5VrjkpAxad-5CElD29bDNC-Dyu-L6-9hw',
client_id:
'563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com',
client_secret: 'j9iVZfS8kkCEFUPaAeJV0sAi',
grant_type: 'refresh_token',
scope:
'email https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/firebase openid' }
Tue Dec 11 2018 14:45:26 GMT-0700 (MST)
[debug] [2018-12-11T21:45:26.674Z] <<< HTTP RESPONSE 200
[debug] [2018-12-11T21:45:27.581Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/my-home-page-ed336
Tue Dec 11 2018 14:45:27 GMT-0700 (MST)
[debug] [2018-12-11T21:45:27.871Z] <<< HTTP RESPONSE 200
[debug] [2018-12-11T21:45:27.873Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/my-home-page-ed336/tokens
Tue Dec 11 2018 14:45:27 GMT-0700 (MST)
[debug] [2018-12-11T21:45:28.270Z] <<< HTTP RESPONSE 200
[info]
[info] === Deploying to 'my-home-page-ed336'...
[info]
[info] i deploying hosting
[info] i hosting: preparing . directory for upload...
[debug] [2018-12-11T21:45:28.733Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/my-home-page-ed336/uploads/-LTUDqAhHObNxZ0HsRuG?fileCount=114&message=
Tue Dec 11 2018 14:45:28 GMT-0700 (MST)
[debug] [2018-12-11T21:45:36.863Z] <<< HTTP RESPONSE 410
[debug] [2018-12-11T21:45:36.864Z] <<< HTTP RESPONSE BODY undefined
[debug] [2018-12-11T21:45:36.867Z] TypeError: Cannot read property 'error' of undefined
at module.exports (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/lib/responseToError.js:10:13)
at Request._callback (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/lib/api.js:47:25)
at Request.self.callback (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at Request.<anonymous> (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/node_modules/request/request.js:1157:10)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at IncomingMessage.<anonymous> (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/node_modules/request/request.js:1079:12)
at Object.onceWrapper (events.js:273:13)
[error]
[error] Error: An unexpected error has occurred.
[debug] [2018-12-11T21:45:49.697Z] ----------------------------------------------------------------------
[debug] [2018-12-11T21:45:49.699Z] Command: /home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/node/bin/node /home/myName/.nvm/versions/node/v8.9.4/bin/firebase deploy --debug
[debug] [2018-12-11T21:45:49.700Z] CLI Version: 3.18.5
[debug] [2018-12-11T21:45:49.700Z] Platform: linux
[debug] [2018-12-11T21:45:49.700Z] Node Version: v10.3.0
[debug] [2018-12-11T21:45:49.700Z] Time: Tue Dec 11 2018 14:45:49 GMT-0700 (MST)
[debug] [2018-12-11T21:45:49.700Z] ----------------------------------------------------------------------
[debug]
[debug] [2018-12-11T21:45:49.705Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2018-12-11T21:45:49.705Z] > authorizing via signed-in user
[debug] [2018-12-11T21:45:49.707Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/my-home-page-ed336
Tue Dec 11 2018 14:45:49 GMT-0700 (MST)
[debug] [2018-12-11T21:45:50.018Z] <<< HTTP RESPONSE 200
[debug] [2018-12-11T21:45:50.021Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/my-home-page-ed336/tokens
Tue Dec 11 2018 14:45:50 GMT-0700 (MST)
[debug] [2018-12-11T21:45:50.315Z] <<< HTTP RESPONSE 200
[info]
[info] === Deploying to 'my-home-page-ed336'...
[info]
[info] i deploying hosting
[info] i hosting: preparing . directory for upload...
[debug] [2018-12-11T21:45:50.768Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/my-home-page-ed336/uploads/-LTUDvYyTmVMnTOVgYO3?fileCount=114&message=
Tue Dec 11 2018 14:45:50 GMT-0700 (MST)
[debug] [2018-12-11T21:45:57.867Z] <<< HTTP RESPONSE 410
[debug] [2018-12-11T21:45:57.868Z] <<< HTTP RESPONSE BODY undefined
[debug] [2018-12-11T21:45:57.871Z] TypeError: Cannot read property 'error' of undefined
at module.exports (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/lib/responseToError.js:10:13)
at Request._callback (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/lib/api.js:47:25)
at Request.self.callback (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at Request.<anonymous> (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/node_modules/request/request.js:1157:10)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at IncomingMessage.<anonymous> (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/node_modules/request/request.js:1079:12)
at Object.onceWrapper (events.js:273:13)
[error]
[error] Error: An unexpected error has occurred.
Thanks for everyone's help!
Your Firebase CLI is very old. Update it with npm install -g firebase-tools. Latest version at this moment is 6.1.2.
update your firebase CLI with this command
npm install -g firebase-tools
then initialize your firebase with
firebase init
Now its time to deploy the project
firebase deploy

Firebase deploy command just hangs

I'm new to Firebase and this is my first attempt to deploy a Vue app.
What I'm doing is
'firebase init' in my project directory, with the dist folder chosen as default (instead of public recommended in documentation)
'firebase deploy' in my project directory
So, nothing happens. In the firebase-debug.log I see there are some successful connections but then the process just hangs
[debug] [2018-04-23T08:02:20.680Z] ----------------------------------------------------------------------
[debug] [2018-04-23T08:02:20.683Z] Command: C:\Users\---\scoop\apps\nodejs\current\node.exe C:\Users\---\scoop\apps\nodejs\current\bin\node_modules\firebase-tools\bin\firebase deploy
[debug] [2018-04-23T08:02:20.683Z] CLI Version: 3.18.4
[debug] [2018-04-23T08:02:20.683Z] Platform: win32
[debug] [2018-04-23T08:02:20.683Z] Node Version: v9.3.0
[debug] [2018-04-23T08:02:20.684Z] Time: Mon Apr 23 2018 11:02:20 GMT+0300 (RTZ 2 (╨╖╨╕╨╝╨░))
[debug] [2018-04-23T08:02:20.684Z] ----------------------------------------------------------------------
[debug]
[debug] [2018-04-23T08:02:20.694Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2018-04-23T08:02:20.694Z] > authorizing via signed-in user
[debug] [2018-04-23T08:02:20.696Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/my-project some - id
Mon Apr 23 2018 11:02:20 GMT+0300 (RTZ 2 (╨╖╨╕╨╝╨░))
[debug] [2018-04-23T08:02:21.666Z] <<< HTTP RESPONSE 200
[debug] [2018-04-23T08:02:21.667Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/my-project some - id/tokens
Mon Apr 23 2018 11:02:21 GMT+0300 (RTZ 2 (╨╖╨╕╨╝╨░))
[debug] [2018-04-23T08:02:22.906Z] <<< HTTP RESPONSE 200

Resources