Teams开发者门户上传应用包报错Package Loading Failure,求助排查
Teams应用包上传失败:"Package Loading Failure" 问题修复
问题重现
上传Teams应用包到开发者门户时,触发错误:
Package Loading Failure Provided add-in package was not understood. Please, make sure that the file being submitted is a valid Office add-in package
用户声称使用Manifest版本1.16,但提供的配置代码中manifestVersion为1.19,schema对应v1.19。
核心问题分析
Manifest版本不一致
声明使用1.16版本,但配置里manifestVersion设为1.19,且schema指向v1.19的地址,版本不匹配会导致门户校验逻辑混乱。应用包格式错误
Teams要求应用包必须是根目录包含manifest.json和图标文件的ZIP压缩包:- 不能直接上传单独的json文件
- 不能将文件嵌套在子文件夹中
- 压缩格式必须是ZIP,不能用RAR或其他格式
配置字段无效/缺失
id和webApplicationInfo.id用了占位符"id"、"app-id",必须替换为Azure AD应用的有效GUIDwebApplicationInfo.resource字段值"iddd"无效,需改为正确的应用资源URI(如https://your-app-domain.com或Azure AD应用的ID URI)- 图标文件需确保存在且尺寸符合要求:outline图标32x32px,color图标192x192px,格式为PNG
上下文与版本不兼容
配置中configurableTabs.context使用了meetingDetailsTab,这个字段仅在Manifest 1.18及以上版本支持。如果实际要使用1.16版本,必须移除该上下文值。
修复步骤
统一Manifest版本
- 若坚持用1.16:将
manifestVersion改为1.16,schema地址改为https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json,同时移除meetingDetailsTab上下文 - 若升级到1.19:保持
manifestVersion和schema一致,当前开发者门户已支持该版本
- 若坚持用1.16:将
修正无效字段
替换所有占位符为实际值:{ "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.19/MicrosoftTeams.schema.json", "version": "1.0.2", "manifestVersion": "1.19", "id": "你的Azure AD应用GUID", "name": {"short": "ProjectTime DEV", "full": "Project Time tab DEV"}, "developer": {"name": "AAMC", "mpnId": "", "websiteUrl": "https://example.com/", "privacyUrl": "https://example.com/", "termsOfUseUrl": "https://example.com/"}, "description": {"short": "ProjectTime DEV", "full": "Project Time tab (dev version). Allows you to submit time to workday using your Calendar events from Outlook"}, "icons": {"outline": "outline-dev.png", "color": "color-dev.png"}, "accentColor": "#005cb9", "validDomains": ["localhost:3000"], "webApplicationInfo": {"id": "你的Azure AD应用GUID", "resource": "https://your-app-resource-uri.com"}, "bots": [], "composeExtensions": [], "staticTabs": [{"entityId": "index0", "name": "ProjectTime DEV", "contentUrl": "https://localhost:3000/review.html", "websiteUrl": "https://localhost:3000/review.html", "scopes": ["personal"]}], "configurableTabs": [{"configurationUrl": "https://localhost:3000/taskpane-teams-config.html", "canUpdateConfiguration": false, "scopes": ["groupChat"], "context": ["meetingDetailsTab"]}], "permissions": ["identity"] }重新打包应用
- 将修正后的
manifest.json和图标文件放在同一目录下 - 选中所有文件,直接压缩为ZIP包(不要压缩整个文件夹)
- 将修正后的
校验配置
使用Teams Manifest Validator工具(可通过Teams Toolkit或本地脚本)检查配置是否符合对应版本的schema规则,提前排除语法错误。
内容的提问来源于stack exchange,提问作者Rostyslav Bezverkhnii
相关产品推荐
相关产品推荐

