8000 Cannot archive, corrupted or unreadable · Issue #10135 · CocoaPods/CocoaPods · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Cannot archive, corrupted or unreadable #10135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
MarcoCarnevali opened this issue Oct 8, 2020 · 3 comments
Closed
1 task done

Cannot archive, corrupted or unreadable #10135

MarcoCarnevali opened this issue Oct 8, 2020 · 3 comments
Labels
s1:awaiting input Waiting for input from the original author

Comments

@MarcoCarnevali
Copy link
MarcoCarnevali commented Oct 8, 2020

Report

What did you do?

  1. Run pod install

What did you expect to happen?

Expected to install al dependencies and be able to archive

What happened instead?

Archive is successful but I couldn't find it on Organizer.
I'm able to find it on Finder, when I double tap it Xcode gives me this error: "Cannot open, archive is corrupted or unreadable"
Using CocoaPods v1.9.3 I'm able to archive it successfully, I have this problem just by using CocoaPods 1.10.0.rc.1.
I need to use rc.1 because of this issue #10026.
I'm using Xcode 12.0.1

CocoaPods Environment

Stack

   CocoaPods : 1.10.0.rc.1
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
    RubyGems : 3.0.3
        Host : macOS 11.0 (20A5384c)
       Xcode : 12.0.1 (12A7300)
         Git : git version 2.24.3 (Apple Git-128)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs.git @ edb4d501a5efc691725b4fdfdac593d28824175b

               trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

Podfile

platform :ios, '12.2'
source "https://github.com/CocoaPods/Specs.git"

target 'Driver' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  
  pod 'MapboxVisionNativeAll', :podspec => 'https://api.mapbox.com/downloads/v1/vision/ios/mapbox-vision-native-all/0.13.1.podspec?access_token='
  
  # Vision only
  pod 'MapboxVision', :git => 'https://github.com/MarcoCarnevali/mapbox-vision-ios.git', :branch => 'mobileEventsUpdate', :tag => 'v0.13.1'
  
  # AR
  pod 'MapboxVisionAR', :git => 'https://github.com/MarcoCarnevali/mapbox-vision-ios.git', :branch => 'mobileEventsUpdate', :tag => 'v0.13.1'
  
  # Safety
  pod 'MapboxVisionSafety', :git => 'https://github.com/MarcoCarnevali/mapbox-vision-ios.git', :branch => 'mobileEventsUpdate', :tag => 'v0.13.1'
  
  pod 'MapboxNavigation', '~> 1.0.0'
  pod 'MapboxDirections'
  pod 'MapboxSearchUI', ">= 1.0.0-beta.1", "< 2.0"
  pod 'MapboxGeocoder.swift'
  pod 'FacebookCore'
  pod 'Firebase/Core'
  pod 'Firebase/DynamicLinks'
  pod 'Firebase/Storage'
  pod 'Firebase/Crashlytics'
  pod 'Firebase/Messaging'
  pod 'Firebase/Firestore'
  pod 'Firebase/Database'
  pod 'Firebase/Functions'
  pod 'Firebase/RemoteConfig'
  pod 'FirebaseUI/Auth'
  pod 'FirebaseUI/Email'
  pod 'FirebaseUI/Google'
  pod 'FirebaseUI/Facebook'
  pod 'FirebaseUI/OAuth'
  pod 'SVProgressHUD'
  pod 'CoreEngine', :podspec => './CoreEngine.podspec'
  pod 'MKRingProgressView'
  pod 'Analytics'
  pod 'Segment-Firebase'
  pod "Segment-Mixpanel"
  pod 'segment-appsflyer-ios'
  pod 'RealmSwift'
  pod 'lottie-ios'
  
  script_phase :name => "Copy bitcode symbol maps into Products directory",
    :script => "if [ \"$ACTION\" = \"install\" ]; then mdfind -name .bcsymbolmap -onlyin   \"${PODS_ROOT}\" | xargs -I{} cp -v {} \"${CONFIGURATION_BUILD_DIR}\"; fi;",
    :execution_position => :after_compile

  target 'DriverTests' do
    inherit! :search_paths
    # Pods for testing
  end
  
end

# set swift v5.0 
post_install do |installer|
 installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
         config.build_settings['SWIFT_VERSION'] = '5.0'
         config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.2'
         config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
         #config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
     end
 end
end
@amorde
Copy link
Member
amorde commented Oct 8, 2020

This is quite difficult to troubleshoot based on this information alone. I would try to narrow down the project to something that reliably reproduces the issue.

That said, I'd suspect this is related

script_phase :name => "Copy bitcode symbol maps into Products directory",
    :script => "if [ \"$ACTION\" = \"install\" ]; then mdfind -name .bcsymbolmap -onlyin   \"${PODS_ROOT}\" | xargs -I{} cp -v {} \"${CONFIGURATION_BUILD_DIR}\"; fi;",
    :execution_position => :after_compile

CocoaPods includes support for copying the bitcode symbolmaps of vendored frameworks automatically, so I'd suspect this isn't necessary

@amorde amorde added the s1:awaiting input Waiting for input from the original author label Oct 8, 2020
@MarcoCarnevali
Copy link
Author

@amorde removing that script fixed the problem! Thank you!!

@byvalentino
Copy link
byvalentino commented Nov 20, 2020

Archive corrupted or unreadable here too.

The project compiles and runs properly on a real device, both in debugging and release mode.

Started with Xcode 12.0 and macOS catilina
Continued after update Xcode 12.2 mac OS big sur
Cocoapods 1.10 and 1.10-pre

Xcode builds successfully the Archive, resulting in size >700Mb

The following profile worked, even though one library creates problems (gesture handler).

Checked all the recommendation from Apple, and other sources, old and new.
https://developer.apple.com/library/archive/technotes/tn2215/_index.html
https://stackoverflow.com/questions/45779591/failed-to-emit-precompiled-header-for-bridging-header
#9888
#3550
https://stackoverflow.com/questions/63646607/xcode-12-using-firebase-pods-lexical-or-preprocessor-issue-pb-h-file-not-fou/63648164#63648164
https://www.ralfebert.de/ios/blog/cocoapods-clean-input-output-files/
#8073
https://stackoverflow.com/questions/51609408/archive-failed-with-xcode-10-cocoapods-and-new-build-system

Recreated new project and it archives properly. As soon as MapBox pod is introduced in the Podfile, archives are built corrupted.

Removing MapBox, the archive works. Issue related to Mapbox when imported via Cocoapods.
Archive 400Mb without MapBox, 300Mb with MapBox.


source 'https://github.com/CocoaPods/Specs.git'

require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.0'
use_frameworks!

#The target name is most likely the name of your project.
target 'BikeLogger' do

pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'RCTTypeSafety', :path => '../node_modules/react-native/Libraries/TypeSafety'
pod 'ReactCommon', :path => '../node_modules/react-native/ReactCommon'
pod 'FBReactNativeSpec', :path => '../node_modules/react-native/Libraries/FBReactNativeSpec'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'RCTRequired', :path => '../node_modules/react-native/Libraries/RCTRequired'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'FBLazyVector', :path => '../node_modules/react-native/Libraries/FBLazyVector'
pod 'React-callinvoker', :path => '../node_modules/react-native/ReactCommon/callinvoker'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
##New libs from here

pod 'react-native-safe-area-context', :path => '../node_modules/react-native-safe-area-context'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
pod 'RNScreens', :path => '../node_modules/react-native-screens'
pod 'react-native-mapbox-gl', :path => '../node_modules/@react-native-mapbox-gl/maps'

pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga"

#Third party deps podspec link
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

end


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s1:awaiting input Waiting for input from the original author
Projects
None yet
Development

No branches or pull requests

3 participants
0