首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >排毒不起作用[Info.plist不包含CFBundleShortVersionString]

排毒不起作用[Info.plist不包含CFBundleShortVersionString]
EN

Stack Overflow用户
提问于 2020-01-18 10:49:05
回答 1查看 254关注 0票数 0

package.json

代码语言:javascript
复制
  "detox": {
    "test-runner": "jest",
        "configurations": {
            "ios.sim": {
            "build": "xcodebuild -workspace ios/lamunchies.xcworkspace -scheme lamunchies -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
            "binaryPath": "ios/build/lamunchies/Build/Products/Debug-iphonesimulator/lamunchies.app",
           "type": "ios.simulator",
          "name": "iPhone 8"
          }
        }
  }

firstTestSpecs.js

代码语言:javascript
复制
describe('Example', () => {
  beforeEach(async () => {
    await device.reloadReactNative()
  })

  it('should have welcome screen', async () => {
    await expect(element(by.id('Settings'))).toBeVisible()
  })
})

日志

代码语言:javascript
复制
detox[38188] ERROR: [exec.js/EXEC_FAIL, #3] An error was encountered processing the command (domain=NSPOSIXErrorDo
main, code=22):
Failed to install the requested application
The application's Info.plist does not contain CFBundleShortVersionString.
Ensure your bundle contains a CFBundleShortVersionString.

detox[38188] ERROR: [DetoxExportWrapper.js/DETOX_INIT_ERROR] 
 { ChildProcessError: Command failed: /usr/bin/xcrun simctl install 7FB82147-C9FD-4746-B144-324E07C64D2F "/Users/j
ordeguevara/Desktop/LAMunchies/ios/build/lamunchies/Build/Products/Debug-iphonesimulator/lamunchies.app"
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The application's Info.plist does not contain CFBundleShortVersionString.
Ensure your bundle contains a CFBundleShortVersionString.
 `/usr/bin/xcrun simctl install 7FB82147-C9FD-4746-B144-324E07C64D2F "/Users/jordeguevara/Desktop/LAMunchies/ios/build/lamunchies/Build/Products/Debug-iphonesimulator/lamunchies.app"` (exited with error code 22)
    at callback (/Users/jordeguevara/Desktop/LAMunchies/node_modules/child-process-promise/lib/index.js:33:27)
    at ChildProcess.exithandler (child_process.js:301:5)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
  name: 'ChildProcessError',
  code: 22,
  childProcess:
   { ChildProcess: { [Function: ChildProcess] super_: [Function] },
     fork: [Function: fork],
     _forkChild: [Function: _forkChild],
     exec: [Function: exec],
     execFile: [Function: execFile],
     spawn: [Function: spawn],
     spawnSync: [Function: spawnSync],
     execFileSync: [Function: execFileSync],
     execSync: [Function: execSync] },
  stdout: '',
  stderr:
   'An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):\nFailed to install the requested application\nThe application\'s Info.plist does not contain CFBundleShortVersionString.\nEnsure your bundle contains a CFBundleShortVersionString.\n' }
Example: should have welcome screen
Example: should have welcome screen [FAIL]

 FAIL  e2e/firstTest.spec.js (6.516s)
  Example
    ✕ should have welcome screen (4ms)

  ● Example › should have welcome screen

    ChildProcessError: Command failed: /usr/bin/xcrun simctl install 7FB82147-C9FD-4746-B144-324E07C64D2F "/......../ios/build/lamunchies/Build/Products/Debug-iphonesimulator/lamunchies.app"
    An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
    Failed to install the requested application
    The application's Info.plist does not contain CFBundleShortVersionString.
    Ensure your bundle contains a CFBundleShortVersionString.
     `/usr/bin/xcrun simctl install 7FB82147-C9FD-4746-B144-324E07C64D2F "/...../ios/build/lamunchies/Build/Products/Debug-iphonesimulator/lamunchies.app"` (exited with error code 22)

      at callback (../node_modules/child-process-promise/lib/index.js:33:27)

  ● Example › should have welcome screen

    ReferenceError: device is not defined

      1 | describe('Example', () => {
      2 |   beforeEach(async () => {
    > 3 |     await device.reloadReactNative()
        |           ^
      4 |   })
      5 | 
      6 |   it('should have welcome screen', async () => {

      at _callee$ (firstTest.spec.js:3:11)
      at tryCatch (../node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (../node_modules/regenerator-runtime/runtime.js:271:22)
      at Generator.prototype.(anonymous function) [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
      at tryCatch (../node_modules/regenerator-runtime/runtime.js:45:40)
      at invoke (../node_modules/regenerator-runtime/runtime.js:135:20)
      at ../node_modules/regenerator-runtime/runtime.js:170:11
      at callInvokeWithMethodAndArg (../node_modules/regenerator-runtime/runtime.js:169:16)
      at AsyncIterator.enqueue (../node_modules/regenerator-runtime/runtime.js:192:13)
      at AsyncIterator.prototype.(anonymous function) [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
      at Object.<anonymous>.exports.async (../node_modules/regenerator-runtime/runtime.js:216:14)
      at Object._callee (firstTest.spec.js:2:14)

  ● Example › should have welcome screen

    ReferenceError: element is not defined

      4 |   })
      5 | 
    > 6 |   it('should have welcome screen', async () => {
        |                                    ^
      7 |     await expect(element(by.id('Settings'))).toBeVisible()
      8 |   })
      9 | })

      at _callee2$ (firstTest.spec.js:6:36)
      at tryCatch (../node_modules/regenerator-runtime/runtime.js:45:40)
      at Generator.invoke [as _invoke] (../node_modules/regenerator-runtime/runtime.js:271:22)
      at Generator.prototype.(anonymous function) [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
      at tryCatch (../node_modules/regenerator-runtime/runtime.js:45:40)
      at invoke (../node_modules/regenerator-runtime/runtime.js:135:20)
      at ../node_modules/regenerator-runtime/runtime.js:170:11
      at callInvokeWithMethodAndArg (../node_modules/regenerator-runtime/runtime.js:169:16)
      at AsyncIterator.enqueue (../node_modules/regenerator-runtime/runtime.js:192:13)
      at AsyncIterator.prototype.(anonymous function) [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
      at Object.<anonymous>.exports.async (../node_modules/regenerator-runtime/runtime.js:216:14)
      at Object._callee2 (firstTest.spec.js:6:36)

detox[38187] ERROR: [cli.js] Error: Command failed: node_modules/.bin/jest --config e2e/config.json '--testNamePat
tern=^((?!:android:).)*$' --maxWorkers 1 "e2e"

The application's Info.plist does not contain CFBundleShortVersionString.
    Ensure your bundle contains a CFBundleShortVersionString.
     `/usr/bin/xcrun simctl install 62BBE686-316C-4D6E-9625-E8D21F60CE97 "/Users/jordeguevara/Desktop/LAMunchies/ios/build/lamunchies/Build/Products/Debug-iphonesimulator/lamunchies.app"` (exited with error code 22)

      at callback (../node_modules/child-process-promise/lib/index.js:33:27)

detox[37766] ERROR: [cli.js] Error: Command failed: node_modules/.bin/jest --config e2e/config.json '--testNamePat
tern=^((?!:android:).)*$' --maxWorkers 1 "e2e"

MacBook-Pro-9:LAMunchies jordeguevara$ detox test
detox[37982] INFO:  [test.js] configuration="ios.sim" reportSpecs=true DETOX_START_TIMESTAMP=1579315003125 node_modules/.bin/jest --config e2e/config.json '--testNamePattern=^((?!:android:).)*$' --maxWorkers 1 "e2e"
detox[37983] INFO:  [DetoxServer.js] server listening on localhost:55101...
detox[37983] ERROR: [exec.js/EXEC_FAIL, #6] "/usr/bin/xcrun simctl install 7FB82147-C9FD-4746-B144-324E07C64D2F "/
Users/jordeguevara/Desktop/LAMunchies/ios/build/lamunchies/Build/Products/Debug-iphonesimulator/lamunchies.app"" f
ailed with code = 22, stdout and stderr:

detox[37983] ERROR: [exec.js/EXEC_FAIL, #6] 
detox[37983] ERROR: [exec.js/EXEC_FAIL, #6] An error was encountered processing the command (domain=NSPOSIXErrorDo
main, code=22):
Failed to install the requested application
The application's Info.plist does not contain CFBundleShortVersionString.
Ensure your bundle contains a CFBundleShortVersionString.

detox[37983] ERROR: [DetoxExportWrapper.js/DETOX_INIT_ERROR] 
 { ChildProcessError: Command failed: /usr/bin/xcrun simctl install 7FB82147-C9FD-4746-B144-324E07C64D2F "/Users/j
ordeguevara/Desktop/LAMunchies/ios/build/lamunchies/Build/Products/Debug-iphonesimulator/lamunchies.app"
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The application's Info.plist does not contain CFBundleShortVersionString.
Ensure your bundle contains a CFBundleShortVersionString.
 `/usr/bin/xcrun simctl install 7FB82147-C9FD-4746-B144-324E07C64D2F "/Users/jordeguevara/Desktop/LAMunchies/ios/build/lamunchies/Build/Products/Debug-iphonesimulator/lamunchies.app"` (exited with error code 22)
    at callback (/Users/jordeguevara/Desktop/LAMunchies/node_modules/child-process-promise/lib/index.js:33:27)
    at ChildProcess.exithandler (child_process.js:301:5)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
  name: 'ChildProcessError',
  code: 22,
  childProcess:
   { ChildProcess: { [Function: ChildProcess] super_: [Function] },
     fork: [Function: fork],
     _forkChild: [Function: _forkChild],
     exec: [Function: exec],
     execFile: [Function: execFile],
     spawn: [Function: spawn],
     spawnSync: [Function: spawnSync],
     execFileSync: [Function: execFileSync],
     execSync: [Function: execSync] },
  stdout: '',
  stderr:
   'An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):\nFailed to install the requested application\nThe application\'s Info.plist does not contain CFBundleShortVersionString.\nEnsure your bundle contains a CFBundleShortVersionString.\n' }

我试图通过CLI在我的reat原生项目上设置Detox,但遇到了一些麻烦。

我尝试在InfoList中添加CFBundleShortVersionString,但它已经在那里了。

我遵循了本文中设置排毒的步骤:https://blog.expo.io/testing-expo-apps-with-detox-and-react-native-testing-library-7fbdbb82ac87

任何帮助都将不胜感激

EN

回答 1

Stack Overflow用户

发布于 2020-01-30 10:38:42

所以希望这能帮助到一些人

代码语言:javascript
复制
Failed to install the requested application
The application's Info.plist does not contain CFBundleShortVersionString.

它告诉我,我的CFBundleShortVersionString已经存在了,但我只是在我的Info.plist中把它换成了一个不同的数字,然后它就能正常工作了

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59797132

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档