EAS Build iOS Failure: Authentication with Apple Developer Portal failed - ios

I'm using EAS to build my Expo app, and today I started getting this error when attempting to run an iOS build, either local or on EAS servers. I'm thinking it's an issue with Apple servers, so I'm hoping it gets fixed soon.
Output from build command:
✔ Select platform › iOS
✔ Using remote iOS credentials (Expo server)
If you provide your Apple account credentials we will be able to generate all necessary build credentials and fully validate them.
This is optional, but without Apple account access you will need to provide all the missing values manually and we can only run minimal validation on them.
✔ Do you want to log in to your Apple account? … yes
› Log in to your Apple Developer account to continue
✔ Apple ID: … ...
› Restoring session /Users/.../.app-store/auth/.../cookie
› Session expired Local session
› Using password for ... from your local Keychain
Learn more
✔ Logged in New session
Authentication with Apple Developer Portal failed!
Error: Cookie not in this host's domain. Cookie:developer-mdn.apple.com Request:developer.apple.com
Anyone else have this problem and have any ideas on how to resolve it?
I've tried removing the stored authentication cookie and signing in again. I also tried signing in on App Store Connect to see if there was any issue with my account but I couldn't find one.

Updating the eas-cli version to version 3.5.2 fixed the problem for me.
Just run the command:
npm install -g eas-cli
and it supposed to work

I was getting the same error. I was able to start the build, after selecting no for the "Do you want to log in to your Apple account?" question. I hope this workaround works for you.
github issue https://github.com/expo/eas-cli/issues/1672#issuecomment-1416851869
Edit: As #Dviros pointed out above, run npm install -g eas-cli for a definitive solution.

I started having this issue today too.
There is old issue in github that seems to be related
https://github.com/expo/eas-cli/issues/1220#issuecomment-1416834395
Looks like it just started happening again today.

This is now fixed by the expo team.
In order for it to work, all you have to do is update to the latest eas-cli. This should do it:
npm i -g eas-cli
Then build or submit you application to iOS.
eas build --platform ios --auto-submit
Of course you can ignore the --auto-submit.

I was able to work around the Apple sign in by using local credentials.
https://docs.expo.dev/app-signing/local-credentials/
By going to the Expo website I was able to download the distribution certificate and provisioning profile certificate. There was also a file that had the password needed to access the distribution certificate. Then I configured the production build profile in eas.json with
...
"ios": {
"credentialsSource": "local"
},
...
And I created a credentials.json file with
{
"ios": {
"provisioningProfilePath": "relative/path/to/provisioning/profile.mobileprovision",
"distributionCertificate": {
"path": "relative/path/to/distribution/certificate.p12",
"password": "<MYPASSWORD>"
}
}
}
Then building with the normal command, it no longer prompted me to sign in to Apple. Build worked like a charm!

I wont advise to put the password in a file, it's a dangerous practice.
I guess the Expo EAS team will need to have a look and find a solution for all of us users.

The EXPO team created an incident on there status page regarding this issue:
Apple authentication error renewing certificates/profiles for EAS Build
We are currently investigating an upstream issue authenticating with Apple to renew certificates/profiles when using EAS Build.
If you are using local credentials, if you're running a non-interactive build, or if you don't need to login to Apple because your certificates/profiles are up to date, then you are unaffected by this incident.
I hope they fix it soon!

use Transporter.
I got the same issue, but i solved it using transporter. I use eas build to upload it to expo server from there i download the app and upload it to Transporter.

Reinstalling eas-cli globally using npm i -g eas-cli did not fix this problem for me.
I was able to fix this by updating the eas-cli package in my local project.
Update your package.json to "eas-cli": "^3.5.2", and then run npm i to reinstall.

Related

Jenkins iOS builds on Mac Sierra failing during xcodebuild 8.2 code signing (SecKey API returned -25308)

I have Jenkins CI set up on Mac Sierra to build iOS apps using Xcode 8.2 with automatic signing. All works well when building using Xcode as the developer. However, Jenkins using xcodebuild is failing with the following:
SecKey API returned: -25308, (null)/Users/Shared/Jenkins/Home/workspace/App/build/Build/Intermediates/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App.app/Frameworks/GTMSessionFetcher.framework: unknown error -1=ffffffffffffffff
I have followed the advice in security / codesign in Sierra: Keychain ignores access control settings and UI-prompts for permission, to no avail.
I have tried putting both private keys and certs into the System keychain, to no avail.
If I log in as the Jenkins user and run the codesign command manually, I "Always Allow" access to the keychain, and it works, repeatedly. However, running as invoked by the Jenkins CI does not. (The Jenkins master is the Mac, and I'm using this same Mac to build.)
The error is mentioning the CocoaPod GTMSessionFetcher. Is this something to do with CocoaPods?
Any ideas would be appreciated.
I was experiencing exactly the same issue and I am quite sure that it has nothing to do with CocoaPods, its a codesigning issue. Some of the things I did:
Check that I do not have duplicate Keychain Entries. This post was useful for that. It turned out that I had one entry duplicated.
Check that private keys are allowed to all applications, as explained here
Try this (be aware that since macOS Sierra login.keychain has changed to login.keychain-db), which is the second answer in the advice you mention, but didn't work.
Move both private keys and certs to System keychain (leaving only the certificates on login keychain). This last step was the one that made things work.
In case this is not helpful you can try to unlock the login keychain manually in your Jenkins job (that did the trick for me before I moved keys an certs to System keychain):
node("macOS-sierra") {
.........
stage("Build"){
sh 'security unlock-keychain -p KEYCHAIN_PASS "/Users/YOUR-CI-USER/Library/Keychains/login.keychain-db" && fastlane beta'
}
You can check your keychains with this:
$ security list-keychains

Cannot run on device after installing 'cordova-plugin-mfp-push'

I am having an issue running my app on the device after installing the "cordova-plugin-mfp-push".
In Xcode , I see the error..
Unable to install "my app"
the certificate used to sign "myapp" has either expired or has been revoked. An updated certificate is required to sign and install the application.
When I remove the plugin the error goes away and I can deploy to my phone.
Can you give some hints on how to debug this issue. My certs is valid and push is enable for the certs.
I am using MobileFirst version 8 , xCode 7.3 with the mfp template
Thanks for your help
To help propagate the changes that are added by the push framework removing the ios environment and adding it back in has resolved a similar issue in my environment:
$ cordova remove ios
$ cordova add ios#latest
Once you have re added the ios platform run cordova prepare and cordova build ios
Once the above steps are completed you can open the project in Xcode. Here Xcode will find two warnings that can be automatically handled by Xcode that are worth updating. Review what will be updated and correct the warnings. See image below:
At this point you should be able to run the project successfully.
dUsing APNS requires the Push Notification capability and therefore a new certificate. You can renew the certificate within the Apple Developer Portal (Certificates, Identifiers & Profiles).
Alternatively you could use Xcode 8 which simplifies certificate handling a lot when using automatic code signing.
I was facing the same issue. After adding mfp-push plugin I was unable to install the app on iPhone with error saying "The application does not have valid signature".
I could resolve this by removing cordoba-plugin-mfp-push & also cordova-plugin-mfp, then adding only cordova-plugin-mfp-push, which in turn adds cordova-plugin-mfp.

Profile not found 404 error when attempting to store app credentials using "ionic security" command

I'm trying to use the new Ionic Package facility to build an ios app.
I have been through the process of creating the ios certificate and provisioning profile. I'm now trying to add those to my ionic project using the ionic security command in the ionic CLI.
I have followed the sample command from the docs:
ionic security credentials ios --profile my_first_profile -c ~/Downloads/Certificate.p12 -p my_certificate_password -r ~/Downloads/MyProfile.mobileprovision
(but obviously replaced profileId, certificate location and provisioning profile location with my own parameters.)
When I run the command I get a 404: requested URL was not found error (I have redacted my request_id):
Body: {"error":{"title":"404: Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.","type":"NotFound","details":"Profile not found.","link":null},"meta":{"request_id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","version":"1.0.0-alpha","status":404}}
Is this something I'm doing wrong or a problem on the Ionic server? What can I do to fix it?
Many thanks

Fabric build and run sign up error

I've got this error:
Fabric: This app relies on Fabric. Please sign up for access at https://fabric.io/sign_up,
install Fabric.app then ask a team member to invite you to this app's organization.
If this machine is a build server please remove Fabric.app if present and use xcodebuild so that Portfolium.app.dSYM is uploaded.
Command /bin/sh failed with exit code 1
But I have logged in in fabric app and it works for me before.
I supposed I delete app to trash. That's why it caused this issue.
Again install fabric app in simulator.
please follow this
please find fabric in spotlight and and run again and try it.
also go check with this link
How to integrate fabric with Xcode 6.2

Phonegap local builds fail with media plugin

create new project
build for iOS: SUCCESS
add media plugin
build for iOS: FAIL
The following build commands failed:
CompileC build/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Objects-normal/i386/CDVSound.o HelloWorld/Plugins/org.apache.cordova.media/CDVSound.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
[error] /Projects/Code/hello/platforms/ios/cordova/build: Command failed with exit code 65
Here's the list of commands
phonegap create hello
cd hello
phonegap build ios # WORKS
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-media.git
phonegap build ios # FAILS
Same scenario happens with cordova, and if I use sudo.
I fixed the problem by completely deleting the iOS folder under platforms, then re-running phonegap build ios.
This is something I ran into a while back. If you’re not an iOS developer, but get tasked with building iOS apps, you may run into this. This particular exit code is fun because xcodebuild doesn’t tell you what the problem is.
Aside from building your app using the Xcode IDE, you also have the command line utility xcodebuild available to you. Assuming the code itself compiles just fine, this tool will tell you, for example, if you’re missing a provisioning profile or something.
In my case, it turned out xcodebuild didn’t have access to the certificate I was using.
So… here’s some things to check for:
Make sure you’ve installed an up to date certificate in your Keychain
Remove expired certificates
Grant access to xcode to use your certificate (or allow all programs to use the certificate)
Make sure you’ve installed an up to date provisioning profile
Remove expired
provisioning profiles
Another option ....
use https://build.phonegap.com which will build the app for you and generate your .ipa and .apk files. It is free for 1 project (just delete your project and then re-upload if you have multiple ones). Just make an account, upload your certs and then you upload your www folder.
Thumbs up if you this was helpful to you!
I got the solution on PhoneGap Google group
And the solution is to add the File plugin also. Strange that these dependencies are not mentioned but it worked. I guess we'll need to randomly try the combinations of plugins until something works.
The bug is logged here: https://issues.apache.org/jira/browse/CB-6225
And it looks like you have to add File plugin first, then Media, the order is important.
try add sudo when add cordova plugin into your project.
sudo cordova plugin add https://github.com/apache/cordova-plugin-media
I was getting an exit code 65 after adding the dialogs plugin. Tried some of the top answers here, but in the end James's advice worked: deleted the ios platform, reinstalled the platform, and then it built.

Resources