Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Notification is not working. #4340


User avatar
0
velu created

Hi,

Please check Previous Thread. #3949@be7e0623-f04f-4486-a4a3-e779663cbe32

We observed that this issue has only occurred in the development environment.

Its work fine on Hosted server.

Error Occurred on Following Code block.

[DisableAuditing]
        public async Task<GetNotificationsOutput> GetUserNotifications(GetUserNotificationsInput input)
        {
            var totalCount = await _userNotificationManager.GetUserNotificationCountAsync(
                AbpSession.ToUserIdentifier(), input.State
                );

            var unreadCount = await _userNotificationManager.GetUserNotificationCountAsync(
                AbpSession.ToUserIdentifier(), UserNotificationState.Unread
                );

            var notifications = await _userNotificationManager.GetUserNotificationsAsync(
                AbpSession.ToUserIdentifier(), input.State, input.SkipCount, input.MaxResultCount
                );

            return new GetNotificationsOutput(totalCount, unreadCount, notifications);
        }

Error Description Object Reference...

Please Help us in this.

Thanks.


7 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    Can you show the full stack trace? (Next time, just bump the other post if it's the same issue.)

  • User Avatar
    0
    velu created

    Hi,

    Please check this,

    at Abp.Notifications.TenantNotificationInfoExtensions.ToTenantNotification(TenantNotificationInfo tenantNotificationInfo)
       at Abp.Notifications.UserNotificationInfoWithNotificationInfoExtensions.ToUserNotification(UserNotificationInfoWithNotificationInfo userNotificationInfoWithNotificationInfo)
       at System.Linq.Enumerable.SelectListIterator`2.ToList()
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at Abp.Notifications.UserNotificationManager.<GetUserNotificationsAsync>d__2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at moneyguru.Notifications.NotificationAppService.&lt;GetUserNotifications&gt;d__4.MoveNext() in [Path]\aspnet-core\src\moneyguru.Application\Notifications\NotificationAppService.cs:line 48
    

    Please Check logFile. https://drive.google.com/open?id=1OiJOd ... cwanyD7ugZ

    The previous post has unanswered.

    Thanks

  • User Avatar
    0
    aaron created
    Support Team

    That doesn't look like the full stack trace.

  • User Avatar
    0
    velu created

    Hi,

    Please check:

    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at moneyguru.Notifications.NotificationAppService.<GetUserNotifications>d__4.MoveNext() in D:\02 Working\MoneyGuru Core\moneyguru\aspnet-core\src\moneyguru.Application\Notifications\NotificationAppService.cs:line 46
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunnerWithContext.RunWithCapturedContext()
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c__DisplayClass4_0.<OutputAsyncCausalityEvents>b__0()
       at System.Runtime.CompilerServices.TaskAwaiter.<>c__DisplayClass11_0.<OutputWaitEtwEvents>b__0()
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask)
       at System.Threading.Tasks.Task.FinishContinuations()
       at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result)
       at Abp.Threading.InternalAsyncHelper.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__5`1.MoveNext()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunnerWithContext.RunWithCapturedContext()
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.&lt;&gt;c__DisplayClass4_0.&lt;OutputAsyncCausalityEvents&gt;b__0()
       at System.Runtime.CompilerServices.TaskAwaiter.&lt;&gt;c__DisplayClass11_0.&lt;OutputWaitEtwEvents&gt;b__0()
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask)
       at System.Threading.Tasks.Task.FinishContinuations()
       at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result)
       at Abp.Notifications.NotificationStore.&lt;GetUserNotificationCountAsync&gt;d__21.MoveNext()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunnerWithContext.RunWithCapturedContext()
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.&lt;&gt;c__DisplayClass4_0.&lt;OutputAsyncCausalityEvents&gt;b__0()
       at System.Runtime.CompilerServices.TaskAwaiter.&lt;&gt;c__DisplayClass11_0.&lt;OutputWaitEtwEvents&gt;b__0()
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask)
       at System.Threading.Tasks.Task.FinishContinuations()
       at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result)
       at Abp.Threading.InternalAsyncHelper.&lt;AwaitTaskWithPostActionAndFinallyAndGetResult&gt;d__5`1.MoveNext()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunnerWithContext.RunWithCapturedContext()
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c__DisplayClass4_0.<OutputAsyncCausalityEvents>b__0()
       at System.Runtime.CompilerServices.TaskAwaiter.<>c__DisplayClass11_0.<OutputWaitEtwEvents>b__0()
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask)
       at System.Threading.Tasks.Task.FinishContinuations()
       at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result)
       at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase`3.&lt;CountAsync&gt;d__24.MoveNext()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunnerWithContext.RunWithCapturedContext()
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.&lt;&gt;c__DisplayClass4_0.&lt;OutputAsyncCausalityEvents&gt;b__0()
       at System.Runtime.CompilerServices.TaskAwaiter.&lt;&gt;c__DisplayClass11_0.&lt;OutputWaitEtwEvents&gt;b__0()
       at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action action, Boolean allowInlining, Task& currentTask)
       at System.Threading.Tasks.Task.FinishContinuations()
       at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
       at System.Threading.Tasks.TaskCompletionSource`1.TrySetResult(TResult result)
       at System.Threading.Tasks.TaskExt.&lt;&gt;c__DisplayClass11_0`1.<Finally>b__0(Task`1 t)
       at System.Threading.Tasks.Task.Execute()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
       at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
       at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
       at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued)
       at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection)
       at System.Threading.Tasks.Task.FinishContinuations()
       at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
       at System.Threading.Tasks.TaskCompletionSource`1.TrySetResult(TResult result)
       at System.Threading.Tasks.TaskExt.Handle[T,R](Task`1 task, TaskCompletionSource`1 tcs, Action`1 success)
       at System.Threading.Tasks.Task.Execute()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
       at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    

    If you want extra details, Please tell us that How can we obtailn that..

    Thanks

  • User Avatar
    0
    aaron created
    Support Team

    Can you check if dbo.AbpTenantNotifications table contains the corresponding TenantNotification for the user?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @velu,

    Please send your project with your local database to us via email. It will be great if you can also specify steps to reporduce this problem in your email, so we can easily identify and solve the problem.

  • User Avatar
    0
    velu created

    Hi,

    Can you help us in this:

    * How to send one notification to all users.* To subscribed users.* To unsubscribed users.* If we want to rollback notification, What can we do?.
    

    Thanks