Skip to content
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

Bcsymbolmap hash differs when uploading and downloading #218

Open
jimmya opened this issue Mar 17, 2020 · 11 comments
Open

Bcsymbolmap hash differs when uploading and downloading #218

jimmya opened this issue Mar 17, 2020 · 11 comments

Comments

@jimmya
Copy link

jimmya commented Mar 17, 2020

Enhancement Suggestion / Bug Report

I noticed when running the download command the hashes for the bcsymbolmap file is different than when running the upload command. This results in errors when downloading the bcsymbolmap file.

Steps which explain the enhancement or reproduce the bug

  1. run the upload command and notice the hashes for the bcsymbol map
    in my case:

79C5B610-92FE-3504-A0F5-3CC894F78122.bcsymbolmap-c773de0f281c25937ecfbbede0ca02ea3068cd92.zip

and

AAA54ED2-7603-3876-9C39-E5FDCBF2C270.bcsymbolmap-c773de0f281c25937ecfbbede0ca02ea3068cd92.zip

  1. run the download command and notice the bcsymbolmap hashes being different
    in my case:

783C9712-BA3F-3A63-9EBD-38077FD7BAEC.bcsymbolmap-c773de0f281c25937ecfbbede0ca02ea3068cd92.zip

and

71073C0A-5259-3C49-B305-988A36AD2639.bcsymbolmap-c773de0f281c25937ecfbbede0ca02ea3068cd92.zip

  1. see errors that bcsymbolmap can't be downloaded in log

Is there a reason these are different? Both commands are ran directly after each other so I wouldn't expect any differences.

Rome version:

0.23.2.63

OS and version:

10.15.3 (19D76)

@tmspzz
Copy link
Owner

tmspzz commented Mar 17, 2020

Can you elaborate on your Cartfile? What platforms are you uploading/downloading for?

bcsymbolmaps ids are generated for all platforms. It's ok for them to be missing for the platforms you don't build for.

Integration tests cover this scenario and I don't see any discrepancies https://github.com/tmspzz/Rome/blob/master/integration-tests/dynamic-frameworks-yml.bats

@jimmya
Copy link
Author

jimmya commented Mar 18, 2020

I did another small test with a smaller project.
My Cartfile looks like this:

github "evgenyneu/keychain-swift" == 19.0
github "SwiftyBeaver/SwiftyBeaver" == 1.8.4

Cartfile.resolved:

github "SwiftyBeaver/SwiftyBeaver" "1.8.4"
github "evgenyneu/keychain-swift" "19.0.0"

Romefile:

cache:
  local: ~/Library/Caches/Rome 
  engine: scripts/engine.sh
  
repositoryMap:
- keychain-swift:
  - name: KeychainSwift
currentMap:
- ios-framework-utilities:
  - name: Utilities
  - name: TestUtilities

And when running:
rome upload --platform ios --cache-prefix swift-5.0
the bcymbolmap hashes are:

swift-5.0/SwiftyBeaver/iOS/754C4785-E78E-36BF-AEBA-CF1112EFDAC7.bcsymbolmap-1.8.4.zip
swift-5.0/SwiftyBeaver/iOS/056ADC2F-2520-36DC-BF71-BBC5CB5E6E98.bcsymbolmap-1.8.4.zip
swift-5.0/keychain-swift/iOS/92D9332F-2935-335A-86E8-AFB4C1BA5EE1.bcsymbolmap-19.0.0.zip
swift-5.0/keychain-swift/iOS/013EFF06-29D3-3328-A480-3173844D06F7.bcsymbolmap-19.0.0.zip

And when running:
rome download --platform ios --cache-prefix swift-5.0
the bcymbolmap hashes are:

swift-5.0/SwiftyBeaver/iOS/9270ED7F-3677-3C1F-9937-A844464AFD30.bcsymbolmap-1.8.4.zip
swift-5.0/SwiftyBeaver/iOS/A8F3B32A-8691-3D18-8BDF-4EE87E05143A.bcsymbolmap-1.8.4.zip
swift-5.0/keychain-swift/iOS/353C2931-8F13-3312-8977-8BA4C030C0F4.bcsymbolmap-19.0.0.zip
swift-5.0/keychain-swift/iOS/5BA14D33-C541-3A11-87B0-5C3DBA1C98C3.bcsymbolmap-19.0.0.zip

@tmspzz
Copy link
Owner

tmspzz commented Mar 18, 2020

Thanks, I'll take a look asap

@tmspzz
Copy link
Owner

tmspzz commented Mar 18, 2020

Here is my test:

$ rome upload
Copied SwiftyBeaver.framework to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/iOS/SwiftyBeaver.framework-1.8.4.zip
Copied SwiftyBeaver.dSYM to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/iOS/SwiftyBeaver.framework.dSYM-1.8.4.zip
Copied 88613523-0EAB-3C9A-9736-35B126482970.bcsymbolmap to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/iOS/88613523-0EAB-3C9A-9736-35B126482970.bcsymbolmap-1.8.4.zip
Copied 562F46BA-CE46-3E6C-B48F-71C45F2165D7.bcsymbolmap to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/iOS/562F46BA-CE46-3E6C-B48F-71C45F2165D7.bcsymbolmap-1.8.4.zip
Copied KeychainSwift.framework to: /Users/tmpz/Library/Caches/Rome/keychain-swift/iOS/KeychainSwift.framework-19.0.0.zip
Copied KeychainSwift.dSYM to: /Users/tmpz/Library/Caches/Rome/keychain-swift/iOS/KeychainSwift.framework.dSYM-19.0.0.zip
Copied 92D9332F-2935-335A-86E8-AFB4C1BA5EE1.bcsymbolmap to: /Users/tmpz/Library/Caches/Rome/keychain-swift/iOS/92D9332F-2935-335A-86E8-AFB4C1BA5EE1.bcsymbolmap-19.0.0.zip
Copied 013EFF06-29D3-3328-A480-3173844D06F7.bcsymbolmap to: /Users/tmpz/Library/Caches/Rome/keychain-swift/iOS/013EFF06-29D3-3328-A480-3173844D06F7.bcsymbolmap-19.0.0.zip
Copied SwiftyBeaver.framework to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/Mac/SwiftyBeaver.framework-1.8.4.zip
Copied SwiftyBeaver.dSYM to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/Mac/SwiftyBeaver.framework.dSYM-1.8.4.zip
Copied KeychainSwift.framework to: /Users/tmpz/Library/Caches/Rome/keychain-swift/Mac/KeychainSwift.framework-19.0.0.zip
Copied KeychainSwift.dSYM to: /Users/tmpz/Library/Caches/Rome/keychain-swift/Mac/KeychainSwift.framework.dSYM-19.0.0.zip
Copied SwiftyBeaver.framework to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/watchOS/SwiftyBeaver.framework-1.8.4.zip
Copied SwiftyBeaver.dSYM to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/watchOS/SwiftyBeaver.framework.dSYM-1.8.4.zip
Copied E59D6013-FFB2-3710-91CE-4E8E8C69628A.bcsymbolmap to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/watchOS/E59D6013-FFB2-3710-91CE-4E8E8C69628A.bcsymbolmap-1.8.4.zip
Copied A94E7B1E-A409-38CB-B528-00549FD0DFFA.bcsymbolmap to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/watchOS/A94E7B1E-A409-38CB-B528-00549FD0DFFA.bcsymbolmap-1.8.4.zip
Copied KeychainSwift.framework to: /Users/tmpz/Library/Caches/Rome/keychain-swift/watchOS/KeychainSwift.framework-19.0.0.zip
Copied KeychainSwift.dSYM to: /Users/tmpz/Library/Caches/Rome/keychain-swift/watchOS/KeychainSwift.framework.dSYM-19.0.0.zip
Copied EAB33171-35EB-33C0-90A6-998D20D19E8A.bcsymbolmap to: /Users/tmpz/Library/Caches/Rome/keychain-swift/watchOS/EAB33171-35EB-33C0-90A6-998D20D19E8A.bcsymbolmap-19.0.0.zip
Copied 6874F868-3DA8-38C4-B4AB-15C456E610F8.bcsymbolmap to: /Users/tmpz/Library/Caches/Rome/keychain-swift/watchOS/6874F868-3DA8-38C4-B4AB-15C456E610F8.bcsymbolmap-19.0.0.zip
Copied SwiftyBeaver.framework to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/tvOS/SwiftyBeaver.framework-1.8.4.zip
Copied SwiftyBeaver.dSYM to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/tvOS/SwiftyBeaver.framework.dSYM-1.8.4.zip
Copied F3982EDE-1AC5-3A7F-9AD1-97C7BCDE5A2C.bcsymbolmap to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/tvOS/F3982EDE-1AC5-3A7F-9AD1-97C7BCDE5A2C.bcsymbolmap-1.8.4.zip
Copied KeychainSwift.framework to: /Users/tmpz/Library/Caches/Rome/keychain-swift/tvOS/KeychainSwift.framework-19.0.0.zip
Copied KeychainSwift.dSYM to: /Users/tmpz/Library/Caches/Rome/keychain-swift/tvOS/KeychainSwift.framework.dSYM-19.0.0.zip
Copied 1DA5E346-D3B4-37F7-A7D0-D7E8CC4D5704.bcsymbolmap to: /Users/tmpz/Library/Caches/Rome/keychain-swift/tvOS/1DA5E346-D3B4-37F7-A7D0-D7E8CC4D5704.bcsymbolmap-19.0.0.zip
Copied .SwiftyBeaver.version to: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/.SwiftyBeaver.version-1.8.4
Copied .keychain-swift.version to: /Users/tmpz/Library/Caches/Rome/keychain-swift/.keychain-swift.version-19.0.0
20:12:05 tmpz@Artemis ~/Code/Personal/Rome-issue-218
$ rm -rf Carthage/Build
20:12:20 tmpz@Artemis ~/Code/Personal/Rome-issue-218
$ rome download
Found SwiftyBeaver in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/iOS/SwiftyBeaver.framework-1.8.4.zip
Found KeychainSwift in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/iOS/KeychainSwift.framework-19.0.0.zip
Found SwiftyBeaver in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/Mac/SwiftyBeaver.framework-1.8.4.zip
Found KeychainSwift in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/Mac/KeychainSwift.framework-19.0.0.zip
Found SwiftyBeaver in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/watchOS/SwiftyBeaver.framework-1.8.4.zip
Found KeychainSwift in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/watchOS/KeychainSwift.framework-19.0.0.zip
Found SwiftyBeaver in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/tvOS/SwiftyBeaver.framework-1.8.4.zip
Found KeychainSwift in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/tvOS/KeychainSwift.framework-19.0.0.zip
Error: could not find SwiftyBeaver.7FA97FFA-F007-3F2B-9337-0EC5646D7E90.bcsymbolmap in local cache at : /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/iOS/7FA97FFA-F007-3F2B-9337-0EC5646D7E90.bcsymbolmap-1.8.4.zip
Error: could not find SwiftyBeaver.E8387F63-E9EE-383F-81F5-546DACE65EA6.bcsymbolmap in local cache at : /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/iOS/E8387F63-E9EE-383F-81F5-546DACE65EA6.bcsymbolmap-1.8.4.zip
Found SwiftyBeaver.88613523-0EAB-3C9A-9736-35B126482970.bcsymbolmap in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/iOS/SwiftyBeaver.framework-1.8.4.zip
Error: no such file Carthage/Build/iOS/88613523-0EAB-3C9A-9736-35B126482970.bcsymbolmap
Found SwiftyBeaver.562F46BA-CE46-3E6C-B48F-71C45F2165D7.bcsymbolmap in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/iOS/SwiftyBeaver.framework-1.8.4.zip
Error: no such file Carthage/Build/iOS/562F46BA-CE46-3E6C-B48F-71C45F2165D7.bcsymbolmap
Error: could not find KeychainSwift.353C2931-8F13-3312-8977-8BA4C030C0F4.bcsymbolmap in local cache at : /Users/tmpz/Library/Caches/Rome/keychain-swift/iOS/353C2931-8F13-3312-8977-8BA4C030C0F4.bcsymbolmap-19.0.0.zip
Error: could not find KeychainSwift.5BA14D33-C541-3A11-87B0-5C3DBA1C98C3.bcsymbolmap in local cache at : /Users/tmpz/Library/Caches/Rome/keychain-swift/iOS/5BA14D33-C541-3A11-87B0-5C3DBA1C98C3.bcsymbolmap-19.0.0.zip
Found KeychainSwift.92D9332F-2935-335A-86E8-AFB4C1BA5EE1.bcsymbolmap in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/iOS/KeychainSwift.framework-19.0.0.zip
Error: no such file Carthage/Build/iOS/92D9332F-2935-335A-86E8-AFB4C1BA5EE1.bcsymbolmap
Found KeychainSwift.013EFF06-29D3-3328-A480-3173844D06F7.bcsymbolmap in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/iOS/KeychainSwift.framework-19.0.0.zip
Error: no such file Carthage/Build/iOS/013EFF06-29D3-3328-A480-3173844D06F7.bcsymbolmap
Error: could not find SwiftyBeaver.21EB9D4C-4FD4-3AF0-A0B5-E1C54BBC78CF.bcsymbolmap in local cache at : /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/Mac/21EB9D4C-4FD4-3AF0-A0B5-E1C54BBC78CF.bcsymbolmap-1.8.4.zip
Error: could not find KeychainSwift.35705713-33C9-3A6C-94FF-593C79AD006F.bcsymbolmap in local cache at : /Users/tmpz/Library/Caches/Rome/keychain-swift/Mac/35705713-33C9-3A6C-94FF-593C79AD006F.bcsymbolmap-19.0.0.zip
Error: could not find SwiftyBeaver.8AF8A4DE-1BB9-3918-A457-A6996276F767.bcsymbolmap in local cache at : /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/watchOS/8AF8A4DE-1BB9-3918-A457-A6996276F767.bcsymbolmap-1.8.4.zip
Found SwiftyBeaver.E59D6013-FFB2-3710-91CE-4E8E8C69628A.bcsymbolmap in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/watchOS/SwiftyBeaver.framework-1.8.4.zip
Error: no such file Carthage/Build/watchOS/E59D6013-FFB2-3710-91CE-4E8E8C69628A.bcsymbolmap
Found SwiftyBeaver.A94E7B1E-A409-38CB-B528-00549FD0DFFA.bcsymbolmap in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/watchOS/SwiftyBeaver.framework-1.8.4.zip
Error: no such file Carthage/Build/watchOS/A94E7B1E-A409-38CB-B528-00549FD0DFFA.bcsymbolmap
Error: could not find KeychainSwift.7C68500F-7507-3B24-8786-49141CDA64F4.bcsymbolmap in local cache at : /Users/tmpz/Library/Caches/Rome/keychain-swift/watchOS/7C68500F-7507-3B24-8786-49141CDA64F4.bcsymbolmap-19.0.0.zip
Found KeychainSwift.EAB33171-35EB-33C0-90A6-998D20D19E8A.bcsymbolmap in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/watchOS/KeychainSwift.framework-19.0.0.zip
Error: no such file Carthage/Build/watchOS/EAB33171-35EB-33C0-90A6-998D20D19E8A.bcsymbolmap
Found KeychainSwift.6874F868-3DA8-38C4-B4AB-15C456E610F8.bcsymbolmap in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/watchOS/KeychainSwift.framework-19.0.0.zip
Error: no such file Carthage/Build/watchOS/6874F868-3DA8-38C4-B4AB-15C456E610F8.bcsymbolmap
Error: could not find SwiftyBeaver.C2C9F70B-D371-3A72-8791-5BC8E8321CA3.bcsymbolmap in local cache at : /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/tvOS/C2C9F70B-D371-3A72-8791-5BC8E8321CA3.bcsymbolmap-1.8.4.zip
Found SwiftyBeaver.F3982EDE-1AC5-3A7F-9AD1-97C7BCDE5A2C.bcsymbolmap in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/tvOS/SwiftyBeaver.framework-1.8.4.zip
Error: no such file Carthage/Build/tvOS/F3982EDE-1AC5-3A7F-9AD1-97C7BCDE5A2C.bcsymbolmap
Error: could not find KeychainSwift.331D2235-6D08-3A72-8C64-66E437789200.bcsymbolmap in local cache at : /Users/tmpz/Library/Caches/Rome/keychain-swift/tvOS/331D2235-6D08-3A72-8C64-66E437789200.bcsymbolmap-19.0.0.zip
Found KeychainSwift.1DA5E346-D3B4-37F7-A7D0-D7E8CC4D5704.bcsymbolmap in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/tvOS/KeychainSwift.framework-19.0.0.zip
Error: no such file Carthage/Build/tvOS/1DA5E346-D3B4-37F7-A7D0-D7E8CC4D5704.bcsymbolmap
Found SwiftyBeaver.dSYM in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/iOS/SwiftyBeaver.framework.dSYM-1.8.4.zip
Found KeychainSwift.dSYM in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/iOS/KeychainSwift.framework.dSYM-19.0.0.zip
Found SwiftyBeaver.dSYM in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/Mac/SwiftyBeaver.framework.dSYM-1.8.4.zip
Found KeychainSwift.dSYM in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/Mac/KeychainSwift.framework.dSYM-19.0.0.zip
Found SwiftyBeaver.dSYM in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/watchOS/SwiftyBeaver.framework.dSYM-1.8.4.zip
Found KeychainSwift.dSYM in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/watchOS/KeychainSwift.framework.dSYM-19.0.0.zip
Found SwiftyBeaver.dSYM in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/tvOS/SwiftyBeaver.framework.dSYM-1.8.4.zip
Found KeychainSwift.dSYM in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/tvOS/KeychainSwift.framework.dSYM-19.0.0.zip
Found .SwiftyBeaver.version in local cache at: /Users/tmpz/Library/Caches/Rome/SwiftyBeaver/.SwiftyBeaver.version-1.8.4
Copied .SwiftyBeaver.version to: Carthage/Build/.SwiftyBeaver.version
Found .keychain-swift.version in local cache at: /Users/tmpz/Library/Caches/Rome/keychain-swift/.keychain-swift.version-19.0.0
Copied .keychain-swift.version to: Carthage/Build/.keychain-swift.version

And here are the bcsymbolmaps uuids for SwiftyBeaver iOS

$ xcrun dwarfdump --uuid Carthage/Build/iOS/SwiftyBeaver.framework/SwiftyBeaver
UUID: 7FA97FFA-F007-3F2B-9337-0EC5646D7E90 (i386) Carthage/Build/iOS/SwiftyBeaver.framework/SwiftyBeaver
UUID: E8387F63-E9EE-383F-81F5-546DACE65EA6 (x86_64) Carthage/Build/iOS/SwiftyBeaver.framework/SwiftyBeaver
UUID: 88613523-0EAB-3C9A-9736-35B126482970 (armv7) Carthage/Build/iOS/SwiftyBeaver.framework/SwiftyBeaver
UUID: 562F46BA-CE46-3E6C-B48F-71C45F2165D7 (arm64) Carthage/Build/iOS/SwiftyBeaver.framework/SwiftyBeaver

I don't see a discrepancy in the bcsymbolmaps' UUIDs that are uploaded and downloaded.
Take for example 88613523-0EAB-3C9A-9736-35B126482970. It's both uploaded and downloaded.

Some bcsymbolmaps are missing because there are no bcsymbolmaps produced for that architecture.

@tmspzz
Copy link
Owner

tmspzz commented Mar 18, 2020

@jimmya maybe it's relate to the use of the engine. Can you try without and just with the local cache like I did?

@tmspzz
Copy link
Owner

tmspzz commented Mar 25, 2020

@jimmya any idea?

@jimmya
Copy link
Author

jimmya commented Mar 30, 2020

I'm sorry for my late reply @tmspzz I tried without the engine and only local cache and then it works fine. I'm puzzled. Could you perhaps look at my engine and see if you can spot an obvious mistake:

#!/usr/bin/env bash

set -e

ACTION="$1"

GREEN='\033[0;32m'
ORANGE='\033[0;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color

info () {
  printf "${ORANGE}$1${NC}\n"
}

success () {
  printf "${GREEN}$1${NC}\n"
}

error () {
  printf "${RED}$1${NC}\n"
}

ARTIFACTORY_DESTINATION="https://redacted"
AUTH_HEADER="X-JFrog-Art-Api"
API_KEY=`cat ~/.artifactory/key`

if [ "$ACTION" == "upload" ]; then
  LOCAL_PATH="$2"
  REMOTE_PATH="$3"
  DIR=`echo "$LOCAL_PATH" | cut -d/ -f1`
  info "Upload $LOCAL_PATH to $REMOTE_PATH"

  http_code=$(curl --http1.1 -LI "$ARTIFACTORY_DESTINATION$REMOTE_PATH" -o /dev/null -w '%{http_code}\n' -s)
  if [ ${http_code} -eq 200 ]; then
    success "File already exists"
  else
    http_code=$(curl --http1.1 -H "$AUTH_HEADER: $API_KEY" -T "$LOCAL_PATH" "$ARTIFACTORY_DESTINATION$REMOTE_PATH" -o /tmp/curl-output -w '%{http_code}\n' -s)
    if [ ${http_code} -eq 201 ]; then
      success "Uploaded $LOCAL_PATH to $REMOTE_PATH"
    else 
      error "Error: Failed to upload $LOCAL_PATH"
      CURL_OUTPUT=`cat /tmp/curl-output`
      error "$CURL_OUTPUT"
    fi
  fi
  # Cleanup
  rm -rf "$DIR"

elif [ "$ACTION" == "download" ]; then
  REMOTE_PATH="$2"
  OUTPUT_PATH="$3"
  info "Download $REMOTE_PATH to $OUTPUT_PATH"
  http_code=$(curl --http1.1 --create-dirs -s -f -o "$OUTPUT_PATH" "$ARTIFACTORY_DESTINATION$REMOTE_PATH" -w '%{http_code}\n' -s)
  if [ ${http_code} -eq 200 ]; then
    success "Downloaded $REMOTE_PATH to $OUTPUT_PATH"
  else
    error "Error: Failed to download $REMOTE_PATH"
  fi

elif [ "$ACTION" == "list" ]; then
  REMOTE_PATH="$2"
  http_code=$(curl --http1.1 -LI "$ARTIFACTORY_DESTINATION$REMOTE_PATH" -o /dev/null -w '%{http_code}\n' -s)
  if [ ${http_code} -ne 200 ]; then
      exit 1
  fi
  
else
  error "Error: Unsupported command: $ACTION"
  exit 1
fi

@dalu93
Copy link

dalu93 commented Apr 27, 2020

Hi,

I'm using the script from @jimmya for the same purpose. I can see the same error as he's describing it.

Here is my console output while uploading "nantes" library

[12:54:48]: ▸ Upload Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework-0.0.9.zip to Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework-0.0.9.zip
[12:55:18]: ▸ Uploaded Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework-0.0.9.zip to Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework-0.0.9.zip
[12:55:18]: ▸ Upload Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework.dSYM-0.0.9.zip to Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework.dSYM-0.0.9.zip
[12:55:50]: ▸ Uploaded Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework.dSYM-0.0.9.zip to Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework.dSYM-0.0.9.zip
[12:55:50]: ▸ Upload Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/964FDC63-4368-3C20-9577-60AA335234AE.bcsymbolmap-0.0.9.zip to Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/964FDC63-4368-3C20-9577-60AA335234AE.bcsymbolmap-0.0.9.zip
[12:55:54]: ▸ Uploaded Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/964FDC63-4368-3C20-9577-60AA335234AE.bcsymbolmap-0.0.9.zip to Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/964FDC63-4368-3C20-9577-60AA335234AE.bcsymbolmap-0.0.9.zip
[12:55:54]: ▸ Upload Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/1D6FD58F-574E-3660-A87B-D2FE55594B35.bcsymbolmap-0.0.9.zip to Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/1D6FD58F-574E-3660-A87B-D2FE55594B35.bcsymbolmap-0.0.9.zip
[12:55:58]: ▸ Uploaded Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/1D6FD58F-574E-3660-A87B-D2FE55594B35.bcsymbolmap-0.0.9.zip to Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/1D6FD58F-574E-3660-A87B-D2FE55594B35.bcsymbolmap-0.0.9.zip
[12:55:58]: ▸ Upload Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/.nantes.version-0.0.9 to Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/.nantes.version-0.0.9
[12:56:00]: ▸ Uploaded Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/.nantes.version-0.0.9 to Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/.nantes.version-0.0.9

While here the output while downloading "nantes":

[12:56:09]: ▸ Download Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework-0.0.9.zip to /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework-0.0.9.zip
[12:56:23]: ▸ Downloaded Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework-0.0.9.zip to /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework-0.0.9.zip
[12:56:23]: ▸ Download Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework.dSYM-0.0.9.zip to /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework.dSYM-0.0.9.zip
[12:56:42]: ▸ Downloaded Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework.dSYM-0.0.9.zip to /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/nantes.framework.dSYM-0.0.9.zip
[12:56:43]: ▸ Download Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/5103399F-663F-3128-86D4-D4E53B200DD7.bcsymbolmap-0.0.9.zip to /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/5103399F-663F-3128-86D4-D4E53B200DD7.bcsymbolmap-0.0.9.zip
[12:56:43]: ▸ Download Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/AA9EC031-715E-3E44-A9FE-97E68CBAC0F2.bcsymbolmap-0.0.9.zip to /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/AA9EC031-715E-3E44-A9FE-97E68CBAC0F2.bcsymbolmap-0.0.9.zip
[12:56:45]: ▸ Download Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/964FDC63-4368-3C20-9577-60AA335234AE.bcsymbolmap-0.0.9.zip to /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/964FDC63-4368-3C20-9577-60AA335234AE.bcsymbolmap-0.0.9.zip
[12:56:47]: ▸ Downloaded Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/964FDC63-4368-3C20-9577-60AA335234AE.bcsymbolmap-0.0.9.zip to /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/964FDC63-4368-3C20-9577-60AA335234AE.bcsymbolmap-0.0.9.zip
[12:56:47]: ▸ Download Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/1D6FD58F-574E-3660-A87B-D2FE55594B35.bcsymbolmap-0.0.9.zip to /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/1D6FD58F-574E-3660-A87B-D2FE55594B35.bcsymbolmap-0.0.9.zip
[12:56:48]: ▸ Downloaded Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/1D6FD58F-574E-3660-A87B-D2FE55594B35.bcsymbolmap-0.0.9.zip to /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/1D6FD58F-574E-3660-A87B-D2FE55594B35.bcsymbolmap-0.0.9.zip
[12:56:48]: ▸ Download Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/.nantes.version-0.0.9 to /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/.nantes.version-0.0.9
[12:56:50]: ▸ Downloaded Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/.nantes.version-0.0.9 to /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/.nantes.version-0.0.9
[12:56:50]: ▸ Error: could not download /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/5103399F-663F-3128-86D4-D4E53B200DD7.bcsymbolmap-0.0.9.zip
[12:56:50]: ▸ Error: could not download /var/folders/3l/wbz_0syx69d4zgyh0b6cslymfgjgx8/T/Rome/a20fadc3-7ff3-4f5d-922a-93f3ef6d96de/Apple-Swift-version-5.1.3-swiftlang-1100.0.282.1-clang-1100.0.33.15/nantes/iOS/AA9EC031-715E-3E44-A9FE-97E68CBAC0F2.bcsymbolmap-0.0.9.zip
[12:56:50]: ▸ Error: could not download nantes.5103399F-663F-3128-86D4-D4E53B200DD7.bcsymbolmap : user error (Binary was not downloaded by engine)
[12:56:50]: ▸ Error: could not download nantes.AA9EC031-715E-3E44-A9FE-97E68CBAC0F2.bcsymbolmap : user error (Binary was not downloaded by engine)
[12:56:50]: ▸ Copied .nantes.version to: Carthage/Build/.nantes.version

Any idea @tmspzz ?

@tmspzz
Copy link
Owner

tmspzz commented Apr 27, 2020

Run before uploading xcrun dwarfdump --uuid YourFramework.framework/YourFramework
Run on the uploaded copy xcrun dwarfdump --uuid YourFramework.framework/YourFramework
Run on the downloaded copy xcrun dwarfdump --uuid YourFramework.framework/YourFramework

all uuids should match.

Repeat the same with dSYMs

@dalu93
Copy link

dalu93 commented Apr 27, 2020

Before uploading (right after carthage bootstrap --platform iOS):

$ xcrun dwarfdump --uuid Carthage/Build/iOS/nantes.framework/Nantes 
UUID: 5103399F-663F-3128-86D4-D4E53B200DD7 (i386) Carthage/Build/iOS/nantes.framework/Nantes
UUID: AA9EC031-715E-3E44-A9FE-97E68CBAC0F2 (x86_64) Carthage/Build/iOS/nantes.framework/Nantes
UUID: 964FDC63-4368-3C20-9577-60AA335234AE (armv7) Carthage/Build/iOS/nantes.framework/Nantes
UUID: 1D6FD58F-574E-3660-A87B-D2FE55594B35 (arm64) Carthage/Build/iOS/nantes.framework/Nantes
$ xcrun dwarfdump --uuid Carthage/Build/iOS/nantes.framework.dSYM/
UUID: 5103399F-663F-3128-86D4-D4E53B200DD7 (i386) Carthage/Build/iOS/nantes.framework.dSYM/Contents/Resources/DWARF/Nantes
UUID: AA9EC031-715E-3E44-A9FE-97E68CBAC0F2 (x86_64) Carthage/Build/iOS/nantes.framework.dSYM/Contents/Resources/DWARF/Nantes
UUID: 964FDC63-4368-3C20-9577-60AA335234AE (armv7) Carthage/Build/iOS/nantes.framework.dSYM/Contents/Resources/DWARF/Nantes
UUID: 1D6FD58F-574E-3660-A87B-D2FE55594B35 (arm64) Carthage/Build/iOS/nantes.framework.dSYM/Contents/Resources/DWARF/Nantes

The rest is available in my previous post. And you can see that from the upload logs, Rome is not uploading the symbols for AA9EC031-715E-3E44-A9FE-97E68CBAC0F2 and 5103399F-663F-3128-86D4-D4E53B200DD7, but then it tries to download them. To notice that the symbol maps are for i386 and x86_64 architectures.

@tmspzz
Copy link
Owner

tmspzz commented Apr 27, 2020

Your problem doesn't seem the same as @jimmya 's. What's you are seeing in perfectly normal, please see comment #178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants