Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/101.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 排毒问题:生成失败Ld BUILD/BUILD/Products/Debug iphonesimulator_Javascript_Ios_Iphone_React Native_Detox - Fatal编程技术网

Javascript 排毒问题:生成失败Ld BUILD/BUILD/Products/Debug iphonesimulator

Javascript 排毒问题:生成失败Ld BUILD/BUILD/Products/Debug iphonesimulator,javascript,ios,iphone,react-native,detox,Javascript,Ios,Iphone,React Native,Detox,我正在尝试使用Wix/Detox测试我的react原生应用程序(iOS版本)。我已在 但是,在我的项目目录中运行“解毒构建”时,我遇到以下错误: ** BUILD FAILED ** The following commands produced analyzer issues: Analyze RNFIRMessaging.m (1 command with analyzer issues) The following build commands failed: Ld b

我正在尝试使用Wix/Detox测试我的react原生应用程序(iOS版本)。我已在

但是,在我的项目目录中运行“解毒构建”时,我遇到以下错误:

** BUILD FAILED **

The following commands produced analyzer issues:
    Analyze RNFIRMessaging.m
(1 command with analyzer issues)

The following build commands failed:
    Ld build/Build/Products/Debug-iphonesimulator/<myAppName>.app/<myAppName> normal x86_64
(1 failure)
child_process.js:524
    throw err;
    ^

Error: Command failed: xcodebuild -project ios/<myAppName>.xcodeproj -scheme <myAppName> -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build
    at checkExecSyncError (child_process.js:481:13)
    at Object.execSync (child_process.js:521:13)
    at Object.<anonymous> (/Users/<myUserName>/Documents/react-native-projects/<myAppName>/node_modules/detox/local-cli/detox-build.js:26:6)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
node_modules/.bin/mocha e2e --opts e2e/mocha.opts      


detox info 09:31:22: server listening on localhost:50342...
detox info 1: Listing devices... 
  1) "before all" hook

  0 passing (376ms)
  1 failing

  1)  "before all" hook:
     Error: field CFBundleIdentifier not found inside Info.plist of app binary at /Users/<myUserName>/Documents/react-native-projects/<myAppName>/ios/build/Build/Products/Debug-iphonesimulator/<myAppName>.app
      at SimulatorDriver._callee2$ (node_modules/detox/lib/devices/SimulatorDriver.js:28:19)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:64:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:299:22)
      at Generator.prototype.(anonymous function) [as throw] (node_modules/regenerator-runtime/runtime.js:116:21)
      at step (node_modules/detox/lib/devices/SimulatorDriver.js:1:809)
      at node_modules/detox/lib/devices/SimulatorDriver.js:1:1008



child_process.js:524
    throw err;
    ^

Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts      
    at checkExecSyncError (child_process.js:481:13)
    at Object.execSync (child_process.js:521:13)
    at Object.<anonymous> (/Users/<myUserName>/Documents/react-native-projects/<myAppName>/node_modules/detox/local-cli/detox-test.js:46:4)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
/* eslint-env node, mocha */
/* global element, expect, device, by */

describe('FiestTest', () => {
  beforeEach(async () => {
    await device.reloadReactNative()
  })

  it('Shoudl find the phoneInput field and the init value as "09"', async () => {
    await expect(element(by.id('LoginPage-phoneInput'))).toBeVisible()
    await element(by.id('LoginPage-phoneInput')).typeText('09991234567')
    await expect(element(by.id('LoginPage-loginGuideTxt'))).toBeVisible()
    await element(by.id('LoginPage-loginBtn')).tap()
  })
  it('Dummy1"', async () => {
    await device.reloadReactNative()
  })
  it('Dummy2', async () => {
    await device.reloadReactNative()
  })
  it('Dummy3', async () => {
    await device.reloadReactNative()
  })
})
/* eslint-env node, mocha */

require('babel-polyfill')
const detox = require('detox')
const config = require('../package.json').detox

before(async () => {
  await detox.init(config)
})

after(async () => {
  await detox.cleanup()
})
--recursive --timeout 120000 --bail
init.js如下所示:

** BUILD FAILED **

The following commands produced analyzer issues:
    Analyze RNFIRMessaging.m
(1 command with analyzer issues)

The following build commands failed:
    Ld build/Build/Products/Debug-iphonesimulator/<myAppName>.app/<myAppName> normal x86_64
(1 failure)
child_process.js:524
    throw err;
    ^

Error: Command failed: xcodebuild -project ios/<myAppName>.xcodeproj -scheme <myAppName> -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build
    at checkExecSyncError (child_process.js:481:13)
    at Object.execSync (child_process.js:521:13)
    at Object.<anonymous> (/Users/<myUserName>/Documents/react-native-projects/<myAppName>/node_modules/detox/local-cli/detox-build.js:26:6)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
node_modules/.bin/mocha e2e --opts e2e/mocha.opts      


detox info 09:31:22: server listening on localhost:50342...
detox info 1: Listing devices... 
  1) "before all" hook

  0 passing (376ms)
  1 failing

  1)  "before all" hook:
     Error: field CFBundleIdentifier not found inside Info.plist of app binary at /Users/<myUserName>/Documents/react-native-projects/<myAppName>/ios/build/Build/Products/Debug-iphonesimulator/<myAppName>.app
      at SimulatorDriver._callee2$ (node_modules/detox/lib/devices/SimulatorDriver.js:28:19)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:64:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:299:22)
      at Generator.prototype.(anonymous function) [as throw] (node_modules/regenerator-runtime/runtime.js:116:21)
      at step (node_modules/detox/lib/devices/SimulatorDriver.js:1:809)
      at node_modules/detox/lib/devices/SimulatorDriver.js:1:1008



child_process.js:524
    throw err;
    ^

Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts      
    at checkExecSyncError (child_process.js:481:13)
    at Object.execSync (child_process.js:521:13)
    at Object.<anonymous> (/Users/<myUserName>/Documents/react-native-projects/<myAppName>/node_modules/detox/local-cli/detox-test.js:46:4)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
/* eslint-env node, mocha */
/* global element, expect, device, by */

describe('FiestTest', () => {
  beforeEach(async () => {
    await device.reloadReactNative()
  })

  it('Shoudl find the phoneInput field and the init value as "09"', async () => {
    await expect(element(by.id('LoginPage-phoneInput'))).toBeVisible()
    await element(by.id('LoginPage-phoneInput')).typeText('09991234567')
    await expect(element(by.id('LoginPage-loginGuideTxt'))).toBeVisible()
    await element(by.id('LoginPage-loginBtn')).tap()
  })
  it('Dummy1"', async () => {
    await device.reloadReactNative()
  })
  it('Dummy2', async () => {
    await device.reloadReactNative()
  })
  it('Dummy3', async () => {
    await device.reloadReactNative()
  })
})
/* eslint-env node, mocha */

require('babel-polyfill')
const detox = require('detox')
const config = require('../package.json').detox

before(async () => {
  await detox.init(config)
})

after(async () => {
  await detox.cleanup()
})
--recursive --timeout 120000 --bail
而mocha.opts看起来是这样的:

** BUILD FAILED **

The following commands produced analyzer issues:
    Analyze RNFIRMessaging.m
(1 command with analyzer issues)

The following build commands failed:
    Ld build/Build/Products/Debug-iphonesimulator/<myAppName>.app/<myAppName> normal x86_64
(1 failure)
child_process.js:524
    throw err;
    ^

Error: Command failed: xcodebuild -project ios/<myAppName>.xcodeproj -scheme <myAppName> -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build
    at checkExecSyncError (child_process.js:481:13)
    at Object.execSync (child_process.js:521:13)
    at Object.<anonymous> (/Users/<myUserName>/Documents/react-native-projects/<myAppName>/node_modules/detox/local-cli/detox-build.js:26:6)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
node_modules/.bin/mocha e2e --opts e2e/mocha.opts      


detox info 09:31:22: server listening on localhost:50342...
detox info 1: Listing devices... 
  1) "before all" hook

  0 passing (376ms)
  1 failing

  1)  "before all" hook:
     Error: field CFBundleIdentifier not found inside Info.plist of app binary at /Users/<myUserName>/Documents/react-native-projects/<myAppName>/ios/build/Build/Products/Debug-iphonesimulator/<myAppName>.app
      at SimulatorDriver._callee2$ (node_modules/detox/lib/devices/SimulatorDriver.js:28:19)
      at tryCatch (node_modules/regenerator-runtime/runtime.js:64:40)
      at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:299:22)
      at Generator.prototype.(anonymous function) [as throw] (node_modules/regenerator-runtime/runtime.js:116:21)
      at step (node_modules/detox/lib/devices/SimulatorDriver.js:1:809)
      at node_modules/detox/lib/devices/SimulatorDriver.js:1:1008



child_process.js:524
    throw err;
    ^

Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts      
    at checkExecSyncError (child_process.js:481:13)
    at Object.execSync (child_process.js:521:13)
    at Object.<anonymous> (/Users/<myUserName>/Documents/react-native-projects/<myAppName>/node_modules/detox/local-cli/detox-test.js:46:4)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
/* eslint-env node, mocha */
/* global element, expect, device, by */

describe('FiestTest', () => {
  beforeEach(async () => {
    await device.reloadReactNative()
  })

  it('Shoudl find the phoneInput field and the init value as "09"', async () => {
    await expect(element(by.id('LoginPage-phoneInput'))).toBeVisible()
    await element(by.id('LoginPage-phoneInput')).typeText('09991234567')
    await expect(element(by.id('LoginPage-loginGuideTxt'))).toBeVisible()
    await element(by.id('LoginPage-loginBtn')).tap()
  })
  it('Dummy1"', async () => {
    await device.reloadReactNative()
  })
  it('Dummy2', async () => {
    await device.reloadReactNative()
  })
  it('Dummy3', async () => {
    await device.reloadReactNative()
  })
})
/* eslint-env node, mocha */

require('babel-polyfill')
const detox = require('detox')
const config = require('../package.json').detox

before(async () => {
  await detox.init(config)
})

after(async () => {
  await detox.cleanup()
})
--recursive --timeout 120000 --bail

非常感谢您的帮助

我运行了以下命令,它解决了构建问题:

watchman watch-del-all; npm start -- --reset-cache

我在react native项目中实施解毒时遇到了这个问题。 我已经通过使用最新的project.pbxproj文件修复了它
基本上修复了许可证配置。

这为我解决了问题:

detox clean-framework-cache && detox build-framework-cache