Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27713] Unable to package for ios adhoc distribution using SDK 8.3.0 but OK with 8.0.0

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionCannot Reproduce
Resolution Date2020-02-03T20:08:50.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelscb-tooling, engTriage
ReporterLeor Brenman
AssigneeChris Barber
Created2020-01-09T20:29:39.000+0000
Updated2020-02-03T20:08:50.000+0000

Description

Unable to package for distribution using SDK 8.3.0 but OK with 8.0.0 Create Hello World app and try to package for ios adhoc distribution. You will get: [ERROR] : Invalid "--distribution-name" value "iPhone Distribution: Leor Brenman (7GZQ9W5WSG)" For help, run: titanium.js help build Using SDK 8.0.0 works fine in same environment

Attachments

FileDateSize
certs.txt2020-01-31T16:52:18.000+00009651
info 800.txt2020-01-31T16:52:18.000+0000155630
info 830.txt2020-01-31T16:52:18.000+0000178369

Comments

  1. Abir Mukherjee 2020-01-09

    [~ssekhri] can you try to reproduce this issue?
  2. Satyam Sekhri 2020-01-09

    Unable to reproduce the issue using 8.3.0.GA. Was able to successfully package a default alloy project via studio as well as CLI. Environment: Mac OS: 10.15.1 SDK: 8.3.0.GA Appc CLI: 7.1.2 JDK: 11.0.4 Node: 10.16.3 Studio: 6.0.0.201911251516 Xcode: 11.2 Also tried the following and couldn't reproduce the issue: 1. Tried with different xcode versions (11.2, 11.0, 10.3) 2. Tried with Appc CLI 7.1.2 and 7.1.0 3. Added an expired adhoc distribution profile along with the already present valid profile. Both profiles were shown with appropriate status using ti info and daemon. Also no issues with package using the valid profile.
  3. Alan Hutton 2020-01-16

    [~lbrenman] Are you still seeing this issue?
  4. Leor Brenman 2020-01-16

    [~ahutton] I stopped using 8.3.0 and instead I'm using 8.0.0. Has something changed that 8.3.0 would work for me now?
  5. Alan Hutton 2020-01-17

    [~lbrenman] It wasn't reproducible on our side. Could you do a *app ti info* and send me the output?
  6. Leor Brenman 2020-01-17

    Leors-MacBook-Air:~ leorbrenman$ appc ti info Appcelerator Command-Line Interface, version 7.1.2 Copyright (c) 2014-2020, Appcelerator, Inc. All Rights Reserved. Operating System Name = Mac OS X Version = 10.14.6 Architecture = 64bit # CPUs = 4 Memory = 16.0GB Node.js Node.js Version = 10.14.1 npm Version = 6.4.1 Titanium CLI CLI Version = 5.2.2 node-appc Version = 0.2.49 Titanium SDKs 8.3.0.GA Version = 8.3.0 Install Location = /Users/leorbrenman/Library/Application Support/Titanium/mobilesdk/osx/8.3.0.GA Platforms = iphone, android git Hash = 2a73828e30 git Timestamp = 11/21/2019 00:09 node-appc Version = 0.3.4 8.1.1.GA Version = 8.1.1 Install Location = /Users/leorbrenman/Library/Application Support/Titanium/mobilesdk/osx/8.1.1.GA Platforms = iphone, android git Hash = 0148ee6e79 git Timestamp = 8/29/2019 14:08 node-appc Version = 0.3.3 8.0.2.GA Version = 8.0.2 Install Location = /Users/leorbrenman/Library/Application Support/Titanium/mobilesdk/osx/8.0.2.GA Platforms = iphone, android git Hash = a12da5b9ce git Timestamp = unknown node-appc Version = 0.2.47 8.0.1.GA Version = 8.0.1 Install Location = /Users/leorbrenman/Library/Application Support/Titanium/mobilesdk/osx/8.0.1.GA Platforms = iphone, android git Hash = c4f6f25c7d git Timestamp = unknown node-appc Version = 0.2.47 8.0.0.GA Version = 8.0.0 Install Location = /Users/leorbrenman/Library/Application Support/Titanium/mobilesdk/osx/8.0.0.GA Platforms = iphone, android git Hash = 3726240fa2 git Timestamp = unknown node-appc Version = 0.2.47 7.5.2.GA Version = 7.5.2 Install Location = /Users/leorbrenman/Library/Application Support/Titanium/mobilesdk/osx/7.5.2.GA Platforms = iphone, android git Hash = 31f9aa4 git Timestamp = 4/2/2019 17:36 node-appc Version = 0.2.47 7.4.0.GA Version = 7.4.0 Install Location = /Users/leorbrenman/Library/Application Support/Titanium/mobilesdk/osx/7.4.0.GA Platforms = iphone, android git Hash = c625ad446f git Timestamp = 9/13/2018 18:45 node-appc Version = 0.2.45 Mac OS X Command Line Tools = installed Intel® Hardware Accelerated Execution Manager (HAXM) Not installed Java Development Kit Version = 1.8.0_162 Java Home = /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home Genymotion Path = not found Genymotion Executable = not found Genymotion Player = not found Home = not found VirtualBox Executable = not found Version = unknown Android SDK Android Executable = not found ADB Executable = /Users/leorbrenman/Library/Android/sdk/platform-tools/adb SDK Path = /Users/leorbrenman/Library/Android/sdk Android NDK NDK Path = not found NDK Version = not found Android Platforms 1) android-19 Name = Android 4.4.2 **Not supported by Titanium SDK 8.3.0.GA** API Level = 19 Revision = 1 Skins = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in ABIs = Path = /Users/leorbrenman/Library/Android/sdk/platforms/android-19 2) android-21 Name = Android 5.0.1 **Not supported by Titanium SDK 8.3.0.GA** API Level = 21 Revision = 2 Skins = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in ABIs = Path = /Users/leorbrenman/Library/Android/sdk/platforms/android-21 3) android-23 Name = Android 6.0 API Level = 23 Revision = 3 Skins = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in, AndroidWearRound, AndroidWearRound360x360, AndroidWearRound400x400, AndroidWearRound480x480, AndroidWearRoundChin320x290, AndroidWearRoundChin320x300, AndroidWearRoundChin360x325, AndroidWearRoundChin360x326, AndroidWearRoundChin360x330, AndroidWearSquare, AndroidWearSquare240x240, AndroidWearSquare320x320 ABIs = armeabi-v7a, x86, x86_64 Path = /Users/leorbrenman/Library/Android/sdk/platforms/android-23 4) android-26 Name = Android 8.0.0 API Level = 26 Revision = 1 Skins = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in ABIs = Path = /Users/leorbrenman/Library/Android/sdk/platforms/android-26 5) android-27 Name = Android 8.1.0 API Level = 27 Revision = 1 Skins = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in ABIs = Path = /Users/leorbrenman/Library/Android/sdk/platforms/android-27 6) android-28 Name = Android 9 API Level = 28 Revision = 1 Skins = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in ABIs = x86 Path = /Users/leorbrenman/Library/Android/sdk/platforms/android-28 Android Add-Ons None Android Emulators Nexus 5X API 28 x86 ID = Nexus_5X_API_28_x86 SDK Version = Android 9 (API level 28) ABI = x86 Skin = nexus_5x Path = /Users/leorbrenman/.android/avd/Nexus_5X_API_28_x86.avd SD Card = /Users/leorbrenman/.android/avd/Nexus_5X_API_28_x86.avd/sdcard.img Google APIs = yes Genymotion Emulators None Connected Android Devices None Xcode 10.3 (build 10G8) - Xcode default Install Location = /Applications/Xcode.app/Contents/Developer iOS SDKs = 12.4 iOS Simulators = 12.4 Watch SDKs = 5.3 Watch Simulators = 5.3 Supported by TiSDK 8.3.0.GA = yes EULA Accepted = yes Teams = none iOS Keychains login.keychain-db = /Users/leorbrenman/Library/Keychains/login.keychain-db System.keychain = /Library/Keychains/System.keychain iOS Development Certificates /Users/leorbrenman/Library/Keychains/login.keychain-db iPhone Developer: Leor Brenman (5GJ26LZ8AV) Not valid before = 1/30/2019 8:01 AM Not valid after = 1/30/2020 8:01 AM iPhone Developer: Leor Brenman (5GJ26LZ8AV) Not valid before = 4/8/2019 7:11 PM Not valid after = 4/7/2020 7:11 PM iOS App Store Distribution Certificates /Users/leorbrenman/Library/Keychains/login.keychain-db iPhone Distribution: Leor Brenman (7GZQ9W5WSG) Not valid before = 1/30/2019 8:00 AM Not valid after = 1/30/2020 8:00 AM iPhone Distribution: Leor Brenman (7GZQ9W5WSG) Not valid before = 4/8/2019 7:10 PM Not valid after = 4/7/2020 7:10 PM Apple WWDR Certificate Apple WWDR = installed Development iOS Provisioning Profiles wildcard dev UUID = 5f3655c1-da8a-4c7b-8911-b4683bfd37b7 App Prefix = 7GZQ9W5WSG App Id = * Date Created = 1/30/2019 8:24 AM Date Expired = 1/30/2020 8:24 AM Managed = No wildcard MBA Dev UUID = f25e2b26-e142-4b00-85fb-1082179813c5 App Prefix = 7GZQ9W5WSG App Id = * Date Created = 4/8/2019 7:27 PM Date Expired = 4/7/2020 7:27 PM Managed = No App Store Distribution iOS Provisioning Profiles None Ad Hoc iOS Provisioning Profiles Geofence Push UUID = 0496367f-ea34-4af6-ad79-83857c9a5838 App Prefix = 7GZQ9W5WSG App Id = com.leorbrenman.gfs Date Created = 1/30/2019 8:26 AM Date Expired = 1/30/2020 8:00 AM Managed = No Griffin Healthcare Distribution UUID = 0f351d4f-cca3-4c52-b9c6-30aad39012e1 App Prefix = 7GZQ9W5WSG App Id = com.leorbrenman.ghc Date Created = 1/30/2019 8:25 AM Date Expired = 1/30/2020 8:00 AM Managed = No MyApprovals Distribution UUID = 855d0583-f011-4e1d-8964-b57d9381257b App Prefix = 7GZQ9W5WSG App Id = com.appcelerator.myapprovals Date Created = 9/11/2019 2:26 PM Date Expired = 4/7/2020 7:10 PM Managed = No wildcard UUID = 06cd9c2c-5246-46a2-9368-5c828e0c9435 App Prefix = 7GZQ9W5WSG App Id = * Date Created = 6/18/2019 3:43 PM Date Expired = 1/30/2020 8:00 AM Managed = No wildcard UUID = 8235dec4-7592-4db3-a7f5-215f33fdb4de App Prefix = 7GZQ9W5WSG App Id = * Date Created = 1/30/2019 8:25 AM Date Expired = 1/30/2020 8:00 AM Managed = No wildcard MBA UUID = 3c5ca8de-5fcd-4bb1-81bc-c65009f41415 App Prefix = 7GZQ9W5WSG App Id = * Date Created = 6/18/2019 3:48 PM Date Expired = 4/7/2020 7:10 PM Managed = No wildcard MBA UUID = f65e9c69-c8e3-4623-b8c5-3bff13a8801a App Prefix = 7GZQ9W5WSG App Id = * Date Created = 1/15/2020 7:08 AM Date Expired = 4/7/2020 7:10 PM Managed = No Enterprise Ad Hoc iOS Provisioning Profiles None iOS Simulators 12.4 iPad Air (3rd generation) (ipad) UDID = B866721E-C83B-418E-9FA9-A0A31D941857 Supports Watch Apps = no iPad Air (ipad) UDID = 87F09FE9-BFF0-4E85-9D9D-359544E6A9A1 Supports Watch Apps = no iPad Air 2 (ipad) UDID = 2795B435-824A-4042-9CC7-EC09DD6C4D3E Supports Watch Apps = no iPad (5th generation) (ipad) UDID = 71EBCB2E-6F95-4533-9882-E8AC06542477 Supports Watch Apps = no iPad Pro (9.7-inch) (ipad) UDID = 4B090E09-8949-47B5-B1D0-A5796946AB8C Supports Watch Apps = no iPad Pro (12.9-inch) (ipad) UDID = C132174B-60D5-4EFB-AD1D-EC96F4041BDA Supports Watch Apps = no iPad Pro (12.9-inch) (2nd generation) (ipad) UDID = FDA21019-7AC2-4D55-9626-A97DC185A8F9 Supports Watch Apps = no iPad Pro (10.5-inch) (ipad) UDID = FFF341B0-34BC-4CA2-A711-819F5FBFD4AD Supports Watch Apps = no iPad (6th generation) (ipad) UDID = 5355E0A9-1D1D-4064-9DA3-8DC1531E937C Supports Watch Apps = no iPad Pro (11-inch) (ipad) UDID = 96BF1B4B-D7C0-4FE5-ABF2-FC5E6E445257 Supports Watch Apps = no iPad Pro (12.9-inch) (3rd generation) (ipad) UDID = 300828D3-82F6-4FA1-9D0E-A6F796DDEF60 Supports Watch Apps = no iPhone 8 (iphone) UDID = 82E69FC8-26F2-466A-BE2E-67108068F3C2 Supports Watch Apps = yes iPhone 8 Plus (iphone) UDID = C120642A-2CA8-477E-A12A-00252D7D5DFA Supports Watch Apps = yes iPhone X (iphone) UDID = 48A83B93-4311-4A29-A524-01394B673DF3 Supports Watch Apps = yes iPhone Xs (iphone) UDID = A0FEFA7A-DBCB-4079-BC0E-7033C4042474 Supports Watch Apps = yes iPhone Xs Max (iphone) UDID = DE1064E0-D3CC-46B4-A631-857D1F291C7F Supports Watch Apps = yes iPhone Xʀ (iphone) UDID = EDD02D9A-8ACC-4583-AB1C-2D86AF260667 Supports Watch Apps = yes iPhone 5s (iphone) UDID = C6A84F47-93E8-4920-A1D4-E24F5472D3A1 Supports Watch Apps = yes iPhone 6 Plus (iphone) UDID = 996DC6A9-3F6D-4D81-88AF-B9944E58F78E Supports Watch Apps = yes iPhone 6 (iphone) UDID = 654A954D-63E1-45D4-98D2-7AFBC86F2F4E Supports Watch Apps = yes iPhone 6s (iphone) UDID = 6C31F8A5-B1A4-431B-89A4-4B6F6E62CE40 Supports Watch Apps = yes iPhone 6s Plus (iphone) UDID = D0FF4372-E8FC-4D51-90F8-7983A710196B Supports Watch Apps = yes iPhone SE (iphone) UDID = F81CDADD-A771-4FBF-844F-EE156A4B5C03 Supports Watch Apps = yes iPhone 7 (iphone) UDID = 5B5A19FC-6273-444A-A9FA-EAF5CDBB1522 Supports Watch Apps = yes iPhone 7 Plus (iphone) UDID = CAB0B9F9-F376-462A-B7DC-9CD2C3425441 Supports Watch Apps = yes WatchOS Simulators 5.3 Apple Watch Series 2 - 38mm (watch) UDID = 8124460E-8955-47CD-B682-B4D9C6DE1315 Apple Watch Series 2 - 42mm (watch) UDID = 6747BCDB-8FC4-44C2-87A2-24FB27995CCB Apple Watch Series 3 - 38mm (watch) UDID = BDD2DF0D-3FA3-4568-BABD-2434289A31FC Apple Watch Series 3 - 42mm (watch) UDID = 0792AB7A-A09D-406C-91C4-737C6604AC48 Apple Watch Series 4 - 40mm (watch) UDID = 05B635D0-789C-4300-A752-4B9123952CEC Apple Watch Series 4 - 44mm (watch) UDID = D9D88555-D2A5-489E-B587-3AF0F7824057 Connected iOS Devices None Android Issues ! Unable to locate an Android NDK. Without the NDK, you will not be able to build native Android Titanium modules. If you have already downloaded and installed the Android NDK, you can tell Titanium where the Android NDK is located by running 'appc titanium config android.ndkPath /path/to/android-ndk', otherwise you can install it by running 'appc titanium setup android' or manually downloading from http://appcelerator.com/android-ndk. ! Android API Android 4.4.2 (android-19) is too old and is no longer supported by Titanium SDK 8.3.0. The minimum supported Android API level by Titanium SDK 8.3.0 is API level 23. ! Android API Android 5.0.1 (android-21) is too old and is no longer supported by Titanium SDK 8.3.0. The minimum supported Android API level by Titanium SDK 8.3.0 is API level 23. iOS Issues ! Unable to find any valid iOS distribution provisioning profiles. This will prevent you from packaging apps for AppStore distribution. You will need to log in to http://appcelerator.com/ios-dist-certs with your Apple Developer account, then create, download, and install a profile.
  7. Chris Barber 2020-01-17

    [~ahutton] The problem is likely due to a difference in how ioslib v1 and v2 detect the certs. He's using Studio which means Studio is calling the Appc Daemon and invokes ioslib v2. The result from ioslib v2 is passed into a ti build and ti build uses v1 and v1 doesn't detect the cert as valid. We know SDK 8.3.0.GA uses ioslib v1.7.19. What we don't know is what version of ioslib v2 is the iOS Appc Daemon plugin using. We could guess if we knew what version of the Appc CLI he's is using, but it's probably easier to just run appc appcd exec /ios/1.x. Also, are 100% sure we're dealing with a Ad-hoc build and not an App Store build? It affects what type of certs are used. I have verified that ioslib v1 is properly decoding his cert, but I still don't know why the Appc Daemon is returning more certs that ti info. We should compare the output of appc ti info -t ios -o json and appc appcd exec /ios/1.x/info/certs.
  8. Leor Brenman 2020-01-17

    I'm doing an adhoc build
  9. Chris Barber 2020-01-31

    [~lbrenman] Can you please do some digging on your end and help us out? I am interested to compare the output from appc ti info -t ios -o json --sdk 8.0.0.GA, appc ti info -t ios -o json --sdk 8.3.0.GA, and appc appcd exec /ios/1.x/info/certs.
  10. Leor Brenman 2020-01-31

    [~cbarber] Attached are the responses [^certs.txt] [^info 800.txt] [^info 830.txt]
  11. Chris Barber 2020-01-31

    [~lbrenman] Thank you for the logs. In short, I don't know what's going on. I don't know why 8.0.0.GA works and 8.3.0.GA doesn't. The daemon is finds 2 distribution certs: 1 valid, 1 expired. It doesn't matter because they both have the same name and fullname. Studio passes in the fullname into the \-\-distribution-name option. So the problem doesn't appear to be daemon or Studio related. Next is the Titanium CLI arg parser. This is actually where the error is coming from. When Studio calls the Titanium CLI, it sets \-\-no-prompt. This means it will validate all options and determine which options are invalid and/or missing. This code hasn't been touched in 2 years and because it works with 8.0.0.GA, I don't think the Titanium CLI is the problem. That leaves one place left, the Titanium SDK iOS build distribution name callback. Turns out this code was touched back in August 2019! https://github.com/appcelerator/titanium_mobile/pull/11188 The Titanium CLI calls the distribution name validate() callback. This callback is returning the error, but the Titanium CLI never prints this error. Instead it prints a generic "invalid" error. Inside the validate() callback, there are 3 ways it will error. 1. The value was a literal boolean as is the case when you specify \-\-distribution-name without a value. This is not the case here. 2. It finds more than 1 cert with a matching name. Since ioslib only finds 1 dist cert, this is also not the case here. 3. Then there's a catch all where value is empty (not the case here) or it didn't find any matching dist certs. The only thing that makes sense is it didn't find a match, but I don't see why not. To debug this, we need do some digging. Please edit the ~/Library/Application Support/Titanium/mobilesdk/osx/8.3.0.GA/iphone/cli/commands/_build.js, go to line 853 and replace the entire validate() function with this:
        		validate: function (value, callback) {
        			console.log('DISTRIBUTION NAME VALIDATE');
        			console.log('target =', cli.argv.target);
        			console.log(typeof value);
        			console.log(value);
        			console.log('distributionCertLookup:');
        			console.log(distributionCertLookup);
        
        			if (typeof value === 'boolean') {
        				return callback(true);
        			}
        			if (cli.argv.target !== 'dist-appstore' && cli.argv.target !== 'dist-adhoc') {
        				return callback(null, value);
        			}
        
        			if (value) {
        				// value can either be a fullname (Apple Distribution: Joe Bloggs (TEAMID)) or just name (Joe Bloggs (TEAMID)). We want to use fullname, so if we were provided
        				// a name try to map it back to the correct format.
        				const v = distributionCertLookup.filter(cert => cert.name.toLowerCase() === value.toLowerCase() || cert.fullname.toLowerCase() === value.toLowerCase());
        
        				console.log('matches:', v.length);
        				console.log(v);
        
        				if (v.length === 1) {
        					return callback(null, v[0].fullname);
        				}
        
        				if (v.length > 1) {
        					return callback(new Error(__('Unable to determine correct certificate from supplied value')));
        				}
        			}
        			callback(new Error(__('Invalid distribution certificate "%s"', value)));
        		}
        
  12. Chris Barber 2020-02-03

    Resolving as the problem seems to have gone away!

JSON Source