当前位置: 首页 > 面试题库 >

缺少所需的模块Firebase-Jenkins构建错误

桓智敏
2023-03-14
问题内容

我已经配置了jenkins来构建我的ios-
swift应用程序。我使用过xcode版本8.1和swift版本3。我是Jenkins的新手,并继续集成过程。根据我的控制台输出,我认为构建成功。因为这样的控制台输出打印

 Touch build/testinng.app
        cd /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test
        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /usr/bin/touch -c /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test/build/testinng.app

    CodeSign build/testinng.app
        cd /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test
        export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

    Signing Identity:     "-"

        /usr/bin/codesign --force --sign - --timestamp=none /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test/build/testinng.app

    ** BUILD SUCCEEDED **

    2016-11-09 19:51:39.300 xcodebuild[2659:26623] [MT] IDETestOperationsObserverDebug: (E99CCCC3-8EED-4FBA-8A00-2CD3C0D7273F) Beginning test session testinngUITests-E99CCCC3-8EED-4FBA-8A00-2CD3C0D7273F at 2016-11-09 19:51:39.299 with Xcode 8B62 on target <DVTiPhoneSimulator: 0x7f9dce6bc690> {
            SimDevice: SimDevice : iPhone 7 (223F7310-19DF-4FA7-B147-73AB8B48454F) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-7 } runtime={ SimRuntime : 10.1 (14B72) - com.apple.CoreSimulator.SimRuntime.iOS-10-1 }
    } (10.1 (14B72))

但是在此控制台输出打印失败消息之后。

failed to import required module: 'Firebase'.

我这样的gofinal控制台输出。

 Touch build/testinng.app
        cd /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test
        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /usr/bin/touch -c /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test/build/testinng.app

    CodeSign build/testinng.app
        cd /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test
        export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

    Signing Identity:     "-"

        /usr/bin/codesign --force --sign - --timestamp=none /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test/build/testinng.app

    ** BUILD SUCCEEDED **

    2016-11-09 19:51:39.300 xcodebuild[2659:26623] [MT] IDETestOperationsObserverDebug: (E99CCCC3-8EED-4FBA-8A00-2CD3C0D7273F) Beginning test session testinngUITests-E99CCCC3-8EED-4FBA-8A00-2CD3C0D7273F at 2016-11-09 19:51:39.299 with Xcode 8B62 on target <DVTiPhoneSimulator: 0x7f9dce6bc690> {
            SimDevice: SimDevice : iPhone 7 (223F7310-19DF-4FA7-B147-73AB8B48454F) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-7 } runtime={ SimRuntime : 10.1 (14B72) - com.apple.CoreSimulator.SimRuntime.iOS-10-1 }
    } (10.1 (14B72))


=== BUILD TARGET testinngTests OF PROJECT testinng WITH CONFIGURATION Debug ===

Check dependencies

Create product structure
/bin/mkdir -p /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test/build/testinng.app/PlugIns/testinngTests.xctest

ProcessInfoPlistFile build/testinng.app/PlugIns/testinngTests.xctest/Info.plist testinngTests/Info.plist
    cd /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    builtin-infoPlistUtility /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test/testinngTests/Info.plist -expandbuildsettings -format binary -platform iphonesimulator -o /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test/build/testinng.app/PlugIns/testinngTests.xctest/Info.plist

CompileSwift normal x86_64 /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test/testinngTests/testinngTests.swift
    cd /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test/testinngTests/testinngTests.swift -target x86_64-apple-ios10.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.1.sdk -I /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test/build -F /--akyiibisusqoudfyyfxubyhwzzgz/Build/Intermediates/testinng.build/Debug-iphonesimulator/testinngTests.build/Objects-normal/x86_64/testinngTests.swiftdeps -o /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/testinng-akyiibisusqoudfyyfxubyhwzzgz/Build/Intermediates/testinng.build/Debug-iphonesimulator/testinngTests.build/Objects-normal/x86_64/testinngTests.o
/Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test/testinngTests/testinngTests.swift:10:18: error: missing required module 'Firebase'
@testable import testinng
                 ^

2016-11-09 19:51:48.418 xcodebuild[2659:26623] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/testinng-akyiibisusqoudfyyfxubyhwzzgz/Logs/Test/B554B7BB-8F73-4B3F-8B9B-B07918ED46AB/Session-testinngUITests-2016-11-09_195139-CXzaIj.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/testinng-akyiibisusqoudfyyfxubyhwzzgz/Logs/Test/B554B7BB-8F73-4B3F-8B9B-B07918ED46AB/Session-testinngUITests-2016-11-09_195139-CXzaIj.log}
2016-11-09 19:51:48.418 xcodebuild[2659:26623] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/testinng-akyiibisusqoudfyyfxubyhwzzgz/Logs/Test/B554B7BB-8F73-4B3F-8B9B-B07918ED46AB/Session-testinngTests-2016-11-09_195139-NdHjC1.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/testinng-akyiibisusqoudfyyfxubyhwzzgz/Logs/Test/B554B7BB-8F73-4B3F-8B9B-B07918ED46AB/Session-testinngTests-2016-11-09_195139-NdHjC1.log}
2016-11-09 19:51:48.419 xcodebuild[2659:27966] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled <DTXChannel: 0x7f9dceef3b20>
2016-11-09 19:51:48.419 xcodebuild[2659:26664] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled <DTXChannel: 0x7f9dcee7ded0>

Testing failed:
    Missing required module 'Firebase'
** TEST FAILED **


The following build commands failed:
    CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
    CompileSwift normal x86_64 /Users/Shared/Jenkins/Home/workspace/testinng_Bit_Test/testinngTests/testinngTests.swift
(2 failures)
Build step 'Xcode' marked build as failure

与此相关的问题是什么?


问题答案:

经过广泛的研究,我终于找到了解决该问题的方法。我所做的第二个修改Runpath Search Paths是我相信实际上解决了这个问题。以下是我做过/修改过的事情。

1.我将pod’Firebase’移到了pod文件中的测试目标,如下所示:

 target 'MyAppTests' do
    inherit! :search_paths
    pod 'Firebase'
end

2. Runpath Search Paths配置指向$(FRAMEWORK_SEARCH_PATHS)

3.In除了上述所有,我卸载了我的老cocoapod(1.0.2),并安装了最新版本(1.1.1),除去火力地堡,重新安装吧..然后pod installpod updated在终端。



 类似资料:
  • 我正在尝试在Visual Studio2017(Community Edition)中构建我的第一个F#Android项目。 使用F#-Android-Blank应用程序模板创建新项目后,Visual Studio中的“错误”窗口立即显示以下消息: project Foo缺少构建所需的Android SDK。双击此消息并按照提示进行安装。 在消息上双击多少都不会出现提示。 我找不到一个明显的下载A

  • 问题内容: 我有另一个线程在“缺少zlib”上寻求帮助。有了很好的帮助,问题已解决(几乎)。 现在,我对自己构建Python(在Ubuntu 10.10上)感兴趣。 一些重要的问题引起了我的注意: 构建Python(例如2.7.1)之后,如果缺少模块,是否需要重新构建Python? 有没有一种方法可以在构建Python之前找出缺少的模块?说sqlite3。我已为系统默认值(Python 2.6.6

  • 根据新版本的Firebase Crashlytics添加到我们的应用程序中,应用程序在启动时停止。 java.lang.RuntimeException:无法获取提供程序com.google.firebase.provider.firebaseInitProvider:java.lang.IllegalStateException:缺少Crashlytics构建ID。当应用程序的构建配置中没有Cr

  • 我不明白如何用anaconda3设置我的PYTHONPATH。 我是否缺少安装步骤?

  • 当我编译应用程序时,我得到一个错误,如下所示: 无法构建Objective-C模块“Firebase” 此错误出现在我的文件swift的中。

  • 问题内容: 我已安装在主目录中。 我正在尝试运行一个需要python 2.7.x版本的脚本,而我却丢失了bz2错误 我尝试安装bz2模块,但出现很多错误 问题答案: 可能是从源代码构建python时,没有bz2标头。 在Ubuntu / Debian上安装它们: 软呢帽: 并再次构建python。您可能会注意到python在配置/构建时会检查很多库,如果您错过其中的一些库,那么您的案例可能就不会支