世博会更新已下载,但尚未应用

问题描述 投票:0回答:1

我正在使用 expo 50,“expo-updates”:~0.24.12,Hermes 引擎。

我很确定这不是配置问题。我查了一下:

  • 分支+渠道(正确)
  • 有新的更新可用,并显示在正确的分支上。
  • 运行时版本正确。 (我刚刚升级到 sdk 50 并使用值为 1.0.0 的 appVersion 策略,非常确定自从升级后我没有安装任何新的本机依赖项)
  • 我有一个 .env 文件,其中包含所有必需的环境变量。事实上,我可以使用这个 .env 文件来创建开发版本,没有任何问题。

在检查logcat时,我发现这些日志表明更新已成功下载,但没有生效:

{"timestamp":1714912838139,"message":"Updates state change: CheckCompleteAvailable, context = {isUpdateAvailable=true, isUpdatePending=false, isChecking=false, isDownloading=false, isRestarting=false,

{"timestamp":1714912838140,"message":"Updates state change: Download, context = {isUpdateAvailable=true, isUpdatePending=false, isChecking=false, isDownloading=true, isRestarting=false,

{"timestamp":1714912838153,"message":"UpdatesController onBackgroundUpdateFinished: Update available","code":"None","level":"info"}
{"timestamp":1714912838155,"message":"Updates state change: DownloadComplete, context = {isUpdateAvailable=true, isUpdatePending=true, isChecking=false, isDownloading=false, isRestarting=false
{"timestamp":1714912838156,"message":"ErrorRecovery: remote load status changed: NEW_UPDATE_LOADED","code":"None","level":"info"}
{"timestamp":1714912838288,"message":"Emitted event: name = Expo.nativeUpdatesStateChangeEvent, type = check","code":"None","level":"info"}
{"timestamp":1714912838289,"message":"Emitted event: name = Expo.nativeUpdatesStateChangeEvent, type = checkCompleteAvailable","code":"None","level":"info"}
 {"timestamp":1714912838290,"message":"Emitted event: name = Expo.nativeUpdatesStateChangeEvent, type = download","code":"None","level":"info"}
{"timestamp":1714912838290,"message":"Emitted event: name = Expo.nativeUpdatesEvent, type = updateAvailable","code":"None","level":"info"}
{"timestamp":1714912838290,"message":"Emitted event: name = Expo.nativeUpdatesStateChangeEvent, type = downloadComplete","code":"None","level":"info"}

我已遵循基本和高级故障排除文档,但无济于事。

我的app.json有这个配置:

    "updates": {
      "fallbackToCacheTimeout": 0,
      "enabled": true,
      "requestHeaders": {
        "expo-channel-name": "preview" -- set a specific channel for a local debug build
      },
      "url": "https://u.expo.dev/<my-id>"
    },
react-native expo expo-updates
1个回答
0
投票

关于此事有任何更新吗?

我尝试添加这个:

runtimeVersion: {
  policy: 'appVersion',
},

致我的

app.config.js
,现在正在等待构建。我在某处读到,在更改后它应该可以工作,如果可以的话,我会更新这个答案。

© www.soinside.com 2019 - 2024. All rights reserved.