Unable to request session with fastlane spaceauth: Spaceship::AccessForbiddenError - ios

I am trying to deploy iOS application automatically with fastlane under CircleCI. Unfortunately it wants 2-factor authentication. I am trying to do on my development machine:
fastlane spaceauth -u my#email.com
and it sends me code by mobile phone, i.e. password is correct and valid. Unfortunately, after I enter the code, it says me
Requesting session...
Could not login to App Store Connect
Please check your credentials and try again.
This could be an issue with App Store Connect,
Please try unsetting the FASTLANE_SESSION environment variable
(if it is set) and re-run `fastlane spaceauth`
Exception type: Spaceship::AccessForbiddenError
How to fix that?

Related

Google Cloud SDK Init web authentication error

I installed Google Cloud SDK on Mac and then ran the command ./google-cloud-sdk/bin/gcloud init but every time I do this I get the following errors:
Errors
it comes up with the prompt to log in and choose an account but then every time I click on my google account it tries to load and then I get a safari cannot connect to server error.
I have also tried running ./google-cloud-sdk/bin/gcloud auth login with the same errors.
Any help would be greatly appreciated
Did you try running it without opening the browser?
gcloud auth login --no-launch-browser

Failed authentication in Apple Developer Portal when execute expo build:ios

I'm trying to config automatically build iOS apps using Expo through Gitlab-CI.
This are the commands that I am using:
expo login -u expo_user -p expo_pass
expo build:ios --non-interactive --apple-id my_id#domain.com --clear-dist-cert --clear-provisioning-profile --dist-p12-path "path_to_file.p12" --provisioning-profile-path "path_to_file.mobileprovision"
I am already passing the respective values of this env vars:
EXPO_APPLE_PASSWORD
EXPO_IOS_DIST_P12_PASSWORD
During the 2nd command execution it launch this logs:
[14:24:23] Trying to authenticate with Apple Developer Portal...
[14:24:25] Authentication with Apple Developer Portal failed!
[14:24:25] Error: Reason: Unknown reason, raw: "<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>Apple</center>\r\n</body>\r\n</html>\r\n\n"
at runAction (/expo-cli#3.13.1/src/appleApi/fastlane.ts:28:17)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Object.authenticate (/expo-cli#3.13.1/src/appleApi/authenticate.ts:46:40)
at IOSBuilder.getAppleCtx (/expo-cli#3.13.1/src/commands/build/ios/IOSBuilder.js:47:23)
at IOSBuilder.produceMissingCredentials (/expo-cli#3.13.1/src/commands/build/ios/IOSBuilder.js:123:22)
at IOSBuilder.prepareCredentials (/expo-cli#3.13.1/src/commands/build/ios/IOSBuilder.js:65:7)
at IOSBuilder.run (/expo-cli#3.13.1/src/commands/build/ios/IOSBuilder.js:19:7)
at IOSBuilder.command (/expo-cli#3.13.1/src/commands/build/BaseBuilder.js:55:7)
at Command.<anonymous> (/expo-cli#3.13.1/src/exp.ts:81:7)
The Apple Developer account that I am using have configured the Two Factor Authentication (2FA).
Is this the reason why the expo build:ios command is failing the auth against Apple Portal?
What am I missing in this commands?
PS: These commands on my laptop works fine!
A similar issue was happening to me in interactive mode on my dev machine.
One thing that happened to work for me was logging into App Store Connect in an incognito window to trigger the 2FA. Not sure if it's a coincidence, but it worked!
For reference, I was getting a similar error on the latest expo-cli#4.9.1
✖ Logging in...
Authentication with Apple Developer Portal failed!
Error: Apple Service Error -1018. Could Not Complete Request. Your request could not be completed because of an error. Please try again later. Apple servers may be down right
now, please try again in about 10-20 minutes
In addition to the other answers, also ensure that a VPN or site-blocking software is not activated, which was the cause of my issue.
Not a very satisfying answer, but it worked for me: Delete your node_modules and then reinstall all your dependencies.
We had no problem last week, but today we kept hitting this error.
This possible fix has zero risk as long as you have a yarn.lock or NPM's equivalent so that you can be sure the versions you download match the originals.
You Need To Use expo build:ios --clear-credentials it worked fine for me.
As Specified bellow in link.
-c, --clear-credentials Clear all credentials stored on Expo servers.
https://forums.expo.io/t/solved-ios-standalone-build-failed/10007/3?u=alihussnain

Hyperledger Composer Multiple user mode for REST server throws 401 error

I have been following the tutorials which are provided in Hyperledger Composer docs, but I am not getting the results that they are supposed to I should be getting. Specifically, when I try to enable the multiple user mode for the REST server and I try to call one of the business network REST API operations using the REST API explorer I always get a HTTP 401 Authorization Required. According to the Tutorial, I if get this error is due to I have not authenticated correctly to the REST API, but it does not mention why this error occurs or how I may fix it.
It is very important for application development to be able to authenticate each user who wants to make requests to the API.
What version of Hyperledger Composer are you using?
The tutorial/document you refer to is correct for v0.15.0 and works a little differently for prior versions.
Are you seeing an Access token at the top of the Browser Window - this indicates that you have successfully authenticated and can continue with the steps for the Wallet.
If you are not seeing an Access token displayed, then make sure you hit your REST server with a URL similar to http://localhost:3000/auth/github again and login.
If you are still experiencing problems I would suggest going back to just using authentication without multiuser mode and verify that the authentication works properly from there.
After some research, I found a solution and worked for me.
If you already enable Github authentication then ignore. Otherwise first enable authentication following this tutorial Enaling Authentication.
Before start rest server you will export your admin card from the network by using this command:
composer card export -n admin#sample-network -f admincard.card
Now start rest server with authentication using this command:
composer-rest-server -c admin#sample-network -p 3000 -a true -m true
After some time rest server will start.
Now First, go this link for authentication: http://localhost:3000/auth/github
After successful authentication, you will get an access token and also you will see a Wallet options below.
Now you need to import a card that you already export from your network.
That's it, you can able to add anything to your network.
In my case, I have two missed steps:
enabling authentication for the REST server
https://hyperledger.github.io/composer/v0.19/integrating/enabling-rest-authentication.html
composer-rest-server -c admin#you_project -a true, I just execute composer-rest-server but did not specify the identity "admin#you_project" before.

Push notifications not working in production mode

I am implementing push notifications, it's working in development mode.
In production mode, when I run the application I get this message in Xcode but the application installs on the device.
launch failed: failed to get the task for process 11288
After opening the app on device I get token id, but not get the notification, when I run simple.php file in terminal I get message as
connected to APN
Message successfully delivered
I have used AdHoc production provisioning certificate to test the application.
Can you tell me how to test push notifications in production.
You need to use a production push certificate, which you can generate the same way you do with a development certificate (just choose production), as well as change your server address from gateway.sandbox.push.apple.com to gateway.push.apple.com...
EDIT: You are not allowed to debug production apps, which is why you get that Xcode error in production mode...
First, You get the following error
launch failed: failed to get the task for process 11288
Because, you are running app in Production (adhoc/distribution/release) scheme mode.
Second,Your pem file and its password should be correct. Also make sure you are using the correct gateway for Production.
We could help you more, if you can share your server file here.
Thanks

Remote Access to Secured Jenkins Server

I have a Jenkins installation on a machine running Windows Server 2008. The Jenkins installation is secured using Jenkins own user database with matrix-based security authorization. Anonymous users don't have any access, except to register an account. I have set up an account and gave this account full access.
Now I'd like to trigger a build remotely from a different machine that hosts the repository. I believe this should be possible by accessing the following URL:
https://[username]:[user_api_token]#[address.of.jenkins]:8080/job/[project]/build?token=[project_api_token]
However, this does not seem to be working for me. When I access this site in a browser, Jenkins forwards to the login-page, and does not start the build.
What am I doing wrong? It seems to be an authentication problem, as I'm not logged in after opening the URL above. Furthermore, if I give anonymous users full access, the URL works.
Try invoking the build from a command-line program like curl:
curl http://[userid]:[user_token]#localhost:8080/job/[project]/build?token=[proj_token]
or
curl --user [userid]:[user_token] http://localhost:8080/job/[project]/build?token=[proj_token]
I think your issue could be browser related, embedding credentials within the URL (Firefox pops up a warning in my case telling me I'm about to login to Jenkins)

Resources