meteor-launch
meteor-launch copied to clipboard
Testflight fails with 2 factor authentication
When attempting to push to testflight I get the following error from iTunes Transporter.
[19:10:07]: Your account has 2 step verification enabled
[19:10:07]: Please go to https://appleid.apple.com/account/manage
[19:10:07]: and generate an application specific password for
[19:10:07]: the iTunes Transporter, which is used to upload builds
I have generated an app-specific password, but it's not clear to me how I can set this password with meteor launch. It appears that fastlane has support for setting this password, but I don't think I can pass the password in to meteor launch. Perhaps this should be another variable in the launch.json file?
So close to getting meteor-launch running I can almost taste it!
@wesleyfsmith you should be able to set the password in launch.json using FASTLANE_PASSWORD. Poorly named variable, but that should get you there :)
I actually tried that but then it actually errors out earlier in the process saying "Invalid User Credentials", which I'm assuming is because it's failing to log into my apple account.
I found this fastlane issue which makes it sounds like there is some sort of prompt where I would normally be able to paste in the app-specific password, which makes it seem like it is different than my appleId password.
I looked at your file here but I can't figure out where I would detect if a prompt occurred because I don't fully understand the project well enough yet. Maybe somewhere in here I would be able to put in the password at the prompt?
execSync("fastlane ios deploy", { // Maybe this object can pass more params?
stdio: [0, 1, 2],
env, //or could it be set here?
});
I appreciate the help!
@wesleyfsmith ah. You may need to try this:
https://github.com/fastlane/fastlane/tree/master/spaceship#2-step-verification
Basically, this generates a hash from your 2 step that is valid for a month. Then, you should be able to include that in launch.json as a variable named FASTLANE_SESSION.
This seems like it may get annoying, so maybe I can build it in to launch somehow?
So I tried that, I was actually never able to get it to work. Are you sure FASTLANE_SESSION is getting passed through?
I've been able to get meteor-launch working for other builds though.
Oh nice! I'd love to see/hear about what you are using it for. I want to get a "Who's Using Launch?" section going.
That's a good question. I've got a test for making sure env vars get passed in to the launch envinroment here https://github.com/NewSpring/meteor-launch/blob/master/src/__test/util.js#L22-L27
I'll try to setup two-factor and test it out myself soon.
Awesome! What's weird is that one of the times when I've had two factor auth enabled, it opened the window on my mac with the 6 digit code, and spaceship prompted me to enter the code. I thought the issue had been magically fixed, but then I entered the code and it errored out. Afterward, it went back to the old error and never prompted me for the 6 digit code again, nor did it bring up the two factor screen with the code like it did the first time. Strange, huh?
Copied from the fastlane repo, not sure about meteor_launch specific points, I hope it helps 👍
Hey everyone, fastlane now fully supports both two-factor and two-step verification 👋
Please make sure to update to the latest version of fastlane by running
fastlane update_fastlane
If you use a Gemfile, just run bundle update
On your computer 🚀
To use fastlane with two-factor, just run fastlane as you usually would. You'll be asked for the verification method, and a 4 or 6 digits pin. Everything will just work out of the box 📦
On your continuous integration system 💻
Check out the official two-factor docs for more information on how to setup two-step on CI system. You'll have to authenticate on your local machine to get a session cookie, which you then transfer to your CI.
If you have any issues setting this up, please submit a new issue so we can help you get up and running 👍
@KrauseFx thanks so much for the info, and also for the work you are doing! Fastlane is awesome.
Hopefully I will have time to get this working soon.