android - 构建时出错:没有源地图参考 + 删除哨兵科尔多瓦退出,退出代码为 1
问题描述
我正在尝试为 android 构建我的 ionic 应用程序,大多数用户在启动画面后都有一个白屏。我过去一周试图确定它可能会出现在哪里,但不知道......所以我试图摆脱我在构建时遇到的所有错误。(它仍然成功构建错误并在几乎一半的手机上工作)。
第一个在这里:
Building for Android...
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd plugin remove sentry-cordova exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
> cordova.cmd plugin remove sentry-cordova Sentry: running before_plugin_rm - set SENTRY_SKIP_WIZARD=true to skip this angular.json build.json build_android.sh build-extras.gradle CertificateSigningRequest.certSigningRequest
...
tslint.json www Uninstalling sentry-cordova from android Subproject Path: CordovaLib Subproject Path: app Uninstalling sentry-cordova from browser js-module uninstall called : plugins\sentry-cordova\dist\js\sentry-cordova.bundle.js Uninstalling sentry-cordova from ios Removing "sentry-cordova" Removing sentry-cordova from package.json doc.find is not a function
第二个是之后,有这样的多行:
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/1-es5.1922
我很确定我错过了一些信息。如有必要,请不要犹豫,但我确定我忘记做某事,但我现在有点绝望......
编辑:这是我用于构建的脚本的开头:
echo "Building for Android..."
#npm run android:build:prod
sentryRemove=$(ionic cordova plugin remove sentry-cordova)
echo $sentryRemove
sentryAdd=$(cordova plugin add sentry-cordova)
echo $sentryAdd
echo "successfully added the sentry. \n Performing build now."
appBuildOut=$(ionic cordova build android --prod --release --source-map)
echo $appBuildOut
BUILD_MESSAGE='BUILD SUCCESSFUL'
谢谢你的帮助
解决方案
第一个问题是,如果我理解正确,您为什么在构建应用程序时运行插件删除命令。我会检查调用此命令的内容,因为before_plugin_rm
只有在删除插件时才应调用出错的脚本。
要使此脚本正常工作,请尝试使用环境变量运行SENTRY_SKIP_WIZARD=true
并查看构建是否有效。我认为白屏的原因与 Sentry 无关,因为失败的步骤看起来与源地图上传有关。
推荐阅读
- popper.js - Popper-react 离开容器边界
- javascript - HTML 正在显示 [对象,对象]
- c - 第二次调用函数导致分段错误
- python - 结合使用多处理和请求时,是否有更好的方法来避免内存泄漏?
- node.js - 访问与 IntelliJ 2019.2 捆绑的 Node.JS 和 npm
- .net-core - 使用角色 ARN 从 EKS 连接到 SQS
- firebase - 如何在保持原始文件颤动的同时将图像文件更改为缩略图
- ruby-on-rails - 无法保存谷歌个人资料图片
- c# - 如何从客户端保护密码?是否需要或 HTTPS/SSL 就足够了?
- python - 套接字编程 - 需要一个类似字节的对象,而不是“str”