Getting the "task was cancelled" error
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
未指定文件或测试。请从报告中显示的 FirebaseMessaging.SendAsync 调用及随后对 result.Result 的访问开始,然后将 Azure 专用计划的行为与本地环境以及可用的异常日志或网络日志进行比较。确定取消是由 SDK 还是 Azure 网络导致的,并记录可复现的诊断结果,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Environment
- Operating System version: Windows (Azure instance)
- Firebase SDK version: 2.3.0
- Firebase Product: FirebaseAdmin
- .NET version: 3.1 (net core)
Description of the problem:
I'm using FirebaseAdmin (nuget) to send some push notification inside an Azure function. In the local environment it's working perfectly, the SDK is returning the PUSH notifications IDs, but when I run it in a PRIVATE Azure plan, the SDK returns the following error:
"A task was cancelled".
That's all. There's is no other message or stack.
Steps to reproduce:
I don't know. I think this is a firewall blocking but I need more logs from the SDK to be completely sure.
Relevant Code:
try
{
logger.LogInformation("NS. Step 1. Firebase configuration credentials: " + _messageConfig);
var fcm = FirebaseAdmin.Messaging.FirebaseMessaging.GetMessaging(app);
logger.LogInformation("NS. Step 2. Firebase Messaging instance creates: " + _messageConfig);
Message message = new Message()
{
Data = new Dictionary<string, string>
{
{"OrderNbr",pushNotification.OrderNbr},
{"CdNbr", pushNotification.CdNbr.ToString()},
{"StoreNbr",pushNotification.StoreNbr.ToString()},
{"type",pushNotification.type.ToString()}
},
Notification = new FirebaseAdmin.Messaging.Notification
{
ImageUrl = "https://firebasestorage.googleapis.com/v0/b/lookapp-dev-77465.appspot.com/o/LOOK_APP_little.jpg?alt=media&token=3eadd967-f158-4ad8-8469-62a1fad91311",
Title = pushNotification.title,
Body = pushNotification.description
},
Token = String.IsNullOrEmpty(pushNotification.deviceTokenAndroid) ? pushNotification.deviceTokenIOS : pushNotification.deviceTokenAndroid
};
logger.LogInformation("NS. Step 3. Message created, sending....");
var result = fcm.SendAsync(message);
logger.LogInformation("NS. Step 4. Result from firebase (notification id):" + result.Result);
return result.Id;
}
catch (Exception ex)
{
logger.LogError(ex, $"Error sending firebase message");
throw;
}
Notes
I just want to know what kind of issue produces this error.
Should I manage the firewall to enable any URL?
Thanks in advance
- 主要语言
- C#
- 星标
- 408
- 派生
- 147
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 10
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/firebase-admin-dotnet 的其他 Issue
-
AbstractFirebaseAuth.cs has a typo (accound/account)可能重新可做 关联的 PR 已关闭且未合并。 未关闭needs-triage
难度 1/5 1 小时以内 新手友好度 72/100
firebase/firebase-admin-dotnet#334 · 1 条评论 ·
维护者通常 1 天内回复
-
GetProjectId returns null on Compute Engine / Cloud Run with application default credentials可能已有人在做 @lahirumaramba 于 1 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 78/100
firebase/firebase-admin-dotnet#588 ·
维护者通常 1 天内回复
-
Sending FCM notification with Fids Return NotRegistered可能重新可做 @yvonnep165 于 78 天前认领,目前没有进行中的 PR。 未关闭
firebase/firebase-admin-dotnet#534 · 5 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
Sending MulticastMessage does not work after replacing Tokens with Fids可能重新可做 @Doris-Ge 于 106 天前认领,目前没有进行中的 PR。 未关闭api: messaging
firebase/firebase-admin-dotnet#530 · 2 条评论 · 已指派 2 人 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
firebase/firebase-admin-dotnet#526 ·
维护者通常 1 天内回复
查看 firebase/firebase-admin-dotnet 的全部 Issue
相似的 Issue
-
bug untriaged
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
CarlosAdrianM/Nesto#610 ·
-
area/resource-registry status/triage
难度 1/5 1-3 小时 新手友好度 76/100
Altinn/altinn-auth#4821 ·
维护者通常 1 天内回复
-
a11y community:contribution
难度 2/5 1-3 小时 新手友好度 74/100
microsoft/fluentui-blazor#5590 · 1 条评论 ·
维护者通常 1 天内回复
-
bug mcp small
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复