当我运行我的应用程序进行测试时,由于代码库中当前正在运行的错误,Expo 构建失败
2022-09-27
2516
我正在开发一个 React 应用程序。我完成了它,现在我想构建它并通过 expo 将其部署到应用商店。问题是,当我使用代码
eas build --platform ios
构建它时。它开始构建,然后我不断遇到破坏构建的相同错误。当我运行应用程序并确保代码没有问题时。一切都运行正常。我不知道它为什么会破坏我的构建。
这是构建代码日志:
Creating Gymfile
Gymfile created
Successfully loaded '/Users/expo/workingdir/build/Reipp/ios/Gymfile' 📄
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| Detected Values from './Gymfile' |
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| suppress_xcode_output | true |
| clean | false |
| scheme | Reipp |
| configuration | Release |
| export_options | |
| export_xcargs | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/h2/gp9wlkv11lg0qj6y2mnqgc_40000gn/T/turtle-v2-325ee6f1-7430-4748-9596-72fa4e6c97eb.keychain" |
| disable_xcpretty | true |
| buildlog_path | /Users/expo/workingdir/logs |
| output_directory | ./build |
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
Resolving Swift Package Manager dependencies...
$ xcodebuild -resolvePackageDependencies -workspace ./Reipp.xcworkspace -scheme Reipp -configuration Release
▸ 2022-09-26 22:53:03.057 xcodebuild[4079:11434] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
▸ 2022-09-26 22:53:03.058 xcodebuild[4079:11434] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
[stderr] { platform:iOS Simulator, id:DB03CB85-009E-4017-8EBE-14EC01AE8FD2, OS:15.5, name:iPhone SE (3rd generation) }
[stderr] { platform:iOS Simulator, id:A147CC3C-E896-4D76-9012-878356117872, OS:15.5, name:iPod touch (7th generation) }
Detected provisioning profile mapping: {:"com.reipp.app"=>"4371396b-94ba-4104-abe9-ae092e530330"}
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| Summary for gym 2.206.1 |
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| workspace | ./Reipp.xcworkspace |
| scheme | Reipp |
| clean | false |
| output_directory | ./build |
| output_name | Reipp |
| configuration | Release |
| silent | false |
| skip_package_ipa | false |
| skip_package_pkg | false |
| export_options.method | app-store |
| export_options.provisioningProfiles.com.reipp.app | 4371396b-94ba-4104-abe9-ae092e530330 |
| export_xcargs | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/h2/gp9wlkv11lg0qj6y2mnqgc_40000gn/T/turtle-v2-325ee6f1-7430-4748-9596-72fa4e6c97eb.keychain" |
| build_path | /Users/expo/Library/Developer/Xcode/Archives/2022-09-26 |
| result_bundle | false |
| buildlog_path | /Users/expo/workingdir/logs |
| destination | generic/platform=iOS |
| suppress_xcode_output | true |
| xcodebuild_formatter | xcpretty |
| disable_xcpretty | true |
| skip_profile_detection | false |
| xcodebuild_command | xcodebuild |
| skip_package_dependencies_resolution | false |
| disable_package_automatic_updates | false |
| use_system_scm | false |
| xcode_path | /Applications/Xcode.app |
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
$ set -o pipefail && xcodebuild -workspace ./Reipp.xcworkspace -scheme Reipp -configuration Release -destination 'generic/platform=iOS' -archivePath /Users/expo/Library/Developer/Xcode/Archives/2022-09-26/Reipp\ 2022-09-26\ 22.53.11.xcarchive archive | tee /Users/expo/workingdir/logs/Reipp-Reipp.log > /dev/null
▸ 2022-09-26 22:53:12.081 xcodebuild[4133:11735] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
▸ 2022-09-26 22:53:12.082 xcodebuild[4133:11735] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
▸ 2022-09-26 22:53:12.142 xcodebuild[4133:11735] XType: failed to connect - Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process.}
▸ 2022-09-26 22:53:12.142 xcodebuild[4133:11735] Font server protocol version mismatch (expected:5 got:0), falling back to local fonts
▸ 2022-09-26 22:53:12.142 xcodebuild[4133:11735] XType: unable to make a connection to the font daemon!
▸ 2022-09-26 22:53:12.142 xcodebuild[4133:11735] XType: XTFontStaticRegistry is enabled as fontd is not available.
› Compiling react-native Pods/Yoga » Yoga.cpp
› Compiling react-native Pods/glog » vlog_is_on.cc
› Packaging expo Pods/Expo » libExpo.a
› Compiling expo-font Pods/EXFont » EXFontLoader.m
› Compiling expo-font Pods/EXFont » EXFont.m
› Compiling expo-font Pods/EXFont » EXFont-dummy.m
› Executing expo-file-system Pods/EXFileSystem » [CP] Copy XCFrameworks
› Compiling expo-keep-awake Pods/ExpoKeepAwake » ExpoKeepAwake-dummy.m
› Packaging expo-font Pods/EXFont » libEXFont.a
› Compiling expo-error-recovery Pods/EXErrorRecovery » EXErrorRecoveryModule.m
› Compiling expo-error-recovery Pods/EXErrorRecovery » EXErrorRecovery-dummy.m
› Packaging expo-keep-awake Pods/ExpoKeepAwake » libExpoKeepAwake.a
› Executing expo-keep-awake Pods/ExpoKeepAwake » Copy generated compatibility header
› Executing expo-constants Pods/EXConstants » [CP-User] Generate app.config for prebuilt Constants.manifest
› Compiling expo-application Pods/EXApplication » EXProvisioningProfile.m
› Compiling expo-application Pods/EXApplication » EXApplication.m
› Packaging expo-error-recovery Pods/EXErrorRecovery » libEXErrorRecovery.a
› Compiling expo-application Pods/EXApplication » EXApplication-dummy.m
› Packaging expo-application Pods/EXApplication » libEXApplication.a
› Compiling expo-constants Pods/EXConstants » EXConstantsService.m
› Compiling expo-constants Pods/EXConstants » EXConstantsInstallationIdProvider.m
› Compiling EXConstants-dummy.m
› Packaging expo-constants Pods/EXConstants » libEXConstants.a
› Compiling Pods/Pods-Reipp » Pods-Reipp-dummy.m
› Packaging Pods/Pods-Reipp » libPods-Reipp.a
› Executing Reipp » [CP] Check Pods Manifest.lock
› Executing Reipp » Start Packager on http://localhost:8081
› Compiling Reipp » ExpoModulesProvider.swift
› Compiling Reipp » noop-file.swift
› Compiling Reipp » main.m
› Compiling Reipp » AppDelegate.mm
› Compiling Reipp » Reipp_vers.c
› Linking Reipp » Reipp
› Copying ios/Reipp/Supporting/Expo.plist ➜ ./Expo.plist
› Compiling Reipp » SplashScreen.storyboard
› Preparing Reipp » Info.plist
› Generating debug Reipp » Reipp.app.dSYM
› Executing Reipp » Bundle React Native code and images
the transform cache was reset.
▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸ PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/Reipp-gorbnnjknomygnfxwixidlmwggov/Build/Intermediates.noindex/ArchiveIntermediates/Reipp/IntermediateBuildFilesPath/Reipp.build/Release-iphoneos/Reipp.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'Reipp' from project 'Reipp')
▸ (1 failure)
2022-09-26 22:53:12.081 xcodebuild[4133:11735] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-09-26 22:53:12.082 xcodebuild[4133:11735] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-09-26 22:53:12.142 xcodebuild[4133:11735] XType: failed to connect - Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process.}
2022-09-26 22:53:12.142 xcodebuild[4133:11735] Font server protocol version mismatch (expected:5 got:0), falling back to local fonts
2022-09-26 22:53:12.142 xcodebuild[4133:11735] XType: unable to make a connection to the font daemon!
2022-09-26 22:53:12.142 xcodebuild[4133:11735] XType: XTFontStaticRegistry is enabled as fontd is not available.
** ARCHIVE FAILED **
The following build commands failed:
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/Reipp-gorbnnjknomygnfxwixidlmwggov/Build/Intermediates.noindex/ArchiveIntermediates/Reipp/IntermediateBuildFilesPath/Reipp.build/Release-iphoneos/Reipp.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'Reipp' from project 'Reipp')
(1 failure)
Exit status: 65
+-------------+-------------------------+
| Build environment |
+-------------+-------------------------+
| xcode_path | /Applications/Xcode.app |
| gym_version | 2.206.1 |
| sdk | iPhoneOS15.5.sdk |
+-------------+-------------------------+
Looks like fastlane ran into a build/archive error with your project
It's hard to tell what's causing the error, so we wrote some guides on how
to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
Before submitting an issue on GitHub, please follow the guide above and make
sure your project is set up correctly.
fastlane uses `xcodebuild` commands to generate your binary, you can see the
the full commands printed out in yellow in the above log.
Make sure to inspect the output above, as usually you'll find more error information there
[stderr] [!] Error building the application - see the log above
error Unable to resolve module ../../zillow from /Users/expo/workingdir/build/Reipp/src/screens/ContactAgentScreen.js:
None of these files exist:
* zillow(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)
* zillow/index(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)
4 | import axios from 'axios'
5 |
> 6 | import { extendedPropertOptions, singlePropertyOptions } from '../../zillow'
| ^
7 |
8 | import PropertySampleComponent from '../components/GeneralComponents/PropertySampleComponent'
9 | import ContactAgentComponent from '../components/PropertyScreenComponents.js/ContactAgentComponent'.
Error: Unable to resolve module ../../zillow from /Users/expo/workingdir/build/Reipp/src/screens/ContactAgentScreen.js:
None of these files exist:
* zillow(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)
* zillow/index(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)
4 | import axios from 'axios'
5 |
> 6 | import { extendedPropertOptions, singlePropertyOptions } from '../../zillow'
| ^
7 |
8 | import PropertySampleComponent from '../components/GeneralComponents/PropertySampleComponent'
9 | import ContactAgentComponent from '../components/PropertyScreenComponents.js/ContactAgentComponent'
at ModuleResolver.resolveDependency (/Users/expo/workingdir/build/Reipp/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:136:15)
at DependencyGraph.resolveDependency (/Users/expo/workingdir/build/Reipp/node_modules/metro/src/node-haste/DependencyGraph.js:231:43)
at Object.resolve (/Users/expo/workingdir/build/Reipp/node_modules/metro/src/lib/transformHelpers.js:129:24)
at resolve (/Users/expo/workingdir/build/Reipp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:396:33)
at /Users/expo/workingdir/build/Reipp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:412:26
at Array.reduce (<anonymous>)
at resolveDependencies (/Users/expo/workingdir/build/Reipp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:411:33)
at processModule (/Users/expo/workingdir/build/Reipp/node_modules/metro/src/DeltaBundler/traverseDependencies.js:140:31)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
info
Error: Fastlane build failed with unknown error. See logs for the "Run fastlane" and "Xcode Logs" phases for more information.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.
这是对象代码:
import React, { useState, useEffect } from 'react'
import { View, Text, StyleSheet, TouchableOpacity, TextInput } from 'react-native'
import { Feather } from 'react-native-vector-icons'
import axios from 'axios'
import { extendedPropertOptions, singlePropertyOptions } from '../../zillow'
import PropertySampleComponent from '../components/GeneralComponents/PropertySampleComponent'
import ContactAgentComponent from '../components/PropertyScreenComponents.js/ContactAgentComponent'
const ContactAgentScreen = ({route}) => {
console.log(extendedPropertOptions)
console.log(singlePropertyOptions)
const [addressLookup, setAddressLookup] = useState('')
const [currentHome, setCurrentHome] = useState({})
useEffect(() => {
if(route.params?.zpid){
getPropertyDetails(route.params.zpid)
}
}, [])
const newSearch = () => {
extendedPropertOptions.params.location = addressLookup
axios.request(extendedPropertOptions)
.then((response) => {
Object.keys(response.data).length == 1 ? getPropertyDetails(response.data.zpid) : console.log('no detail found')
})
.catch((error) => {
console.log(error)
})
}
const getPropertyDetails = (zpid) => {
singlePropertyOptions.params.zpid = zpid
axios.request(singlePropertyOptions)
.then((response) => {
setCurrentHome(response.data)
})
.catch((error) => {
console.log(error)
})
}
return (
<View style={styles.container}>
<View style={styles.header}>
<Text style={styles.headerText}>Connect With An Agent</Text>
</View>
<View style={styles.row}>
<Feather style={styles.chevronDown} size={20} name='search'/>
<TextInput
value={addressLookup}
style={styles.input}
onChangeText={setAddressLookup}
placeholder={'Enter an address'}
/>
<TouchableOpacity style={styles.searcingContainer} onPress={() => {newSearch()}}>
<Text style={styles.searchSubmit}>Search</Text>
</TouchableOpacity>
</View>
{
Object.keys(currentHome).length == 0 ? null : <View style={styles.property}><PropertySampleComponent item={currentHome}/></View>
}
<ContactAgentComponent currentHome={currentHome}/>
</View>
)
}
const styles = StyleSheet.create({
container: {
marginTop: 44
},
row: {
display: 'flex',
flexDirection: 'row',
height: 46,
alignItems: 'center',
borderBottomColor: 'grey',
borderBottomWidth: 1,
},
header: {
display: 'flex',
flexDirection: 'row',
height: 56,
alignItems: 'center',
borderBottomColor: 'grey',
borderBottomWidth: 2,
justifyContent: 'space-between',
backgroundColor: 'lightgrey'
},
chevronDown: {
color: '#1c39bb',
marginLeft: 16,
marginRight: 6
},
headerText: {
fontSize: 22,
marginLeft: 16
},
input: {
width: '70%',
fontSize: 17,
paddingTop: 4,
borderBottomColor: 'grey',
borderBottomWidth: 2
},
searcingContainer: {
marginLeft: 8,
display: 'flex',
flexDirection: 'row',
alignItems: 'flex-end',
},
searchSubmit: {
fontSize: 17,
color: '#273be2'
},
property: {
borderBottomColor: 'grey',
borderBottomWidth: 1
}
})
export default ContactAgentScreen
我不知道它为什么会破坏。我甚至运行了
console.log()
,它们都显示了我期望看到的正确信息。
这是我的文件结构的图像:
这是构建页面的图像:
2个回答
今天使用 eas build --platform ios --local 时也遇到了这个问题,我刚刚更新到了 XCode 版本 14.0.1 (14A400),可能是这个原因导致了这个问题:
[RUN_FASTLANE] ▸ ** ARCHIVE FAILED ** [RUN_FASTLANE] ** ARCHIVE FAILED ** [RUN_FASTLANE] 退出状态:65
peterddd
2022-09-27
更新 XCode 后,我也遇到了问题。
以下这对我有帮助:
Add this
post_install
section to yourPodfile
:post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = "" config.build_settings['CODE_SIGNING_REQUIRED'] = "NO" config.build_settings['CODE_SIGNING_ALLOWED'] = "NO" end end end
更多: https://github.com/ivpusic/react-native-image-crop-picker/issues/1806
haxpanel
2022-10-20