Accessing log file in Codemagic - deployment

I'm filling in the Codemagic yaml file to perform an iOS deploy for React Native. However, an error occurs while the builder is fetching the signing files:
Executing AppStoreConnect action fetch-signing-files failed unexpectedly.
Detailed logs are available at
"/var/folders/m7/aegaegawegaw323523t232/T/codemagic-09-01-22.log".
To see more details about the error, add `--verbose` command line option.
The error message is too vague. It simply tells me to use --verbose, which returns
[12:28:30] DEBUG > Load JWT for App Store Connect key 'NAME_OF_KEY' from disk cache
[12:28:30] DEBUG > Failed to load App Store Connect JWT from disk cache:
Token is not cached
[12:28:30] DEBUG > Generate new App Store Connect JWT for key 'NAME_OF_KEY'
[12:28:30] WARNING > Executing AppStoreConnect action fetch-signing-files failed unexpectedly.
Detailed logs are available at "/var/folders/m7/aegaegawegaw323523t232/T/codemagic-09-01-22.log".
To see more details about the error, add `--verbose` command line option.
Which still is not enough for me to understand what's going on. My question is how do I access the Codemagic log at the mentioned codemagic-09-01-22.log file?

with Codemagic you can access builder machine via SSH or VNC (https://docs.codemagic.io/troubleshooting/accessing-builder-machine-via-ssh/) to check all logs.
However from the log you provided are you sure you configured correct key name?

Related

"App init setup failed: a project already exists" MongoDB Realm App

I have an error message that I do know know who to fix regarding Mongodb Realm CLI.
https://docs.mongodb.com/realm/cli/realm-cli-apps-create/
When I write the following command in Terminal:
realm-cli apps init -n "test"
I get the error message "app init setup failed: a project already exists"
I have already had a project name "test" but I have deleted it (Simply deleting the folder which might have been the mistake) but I still get the error message. The error occurs always, no matter the name or path/folder at the moment.
if realm-cli push is used it seems to use the old "test" application since the name is filled out when going through the [options]
https://docs.mongodb.com/realm/cli/realm-cli-push/
If I push the application it will deploy the test application and if deleted through either CLI or GUI it returns to the first problem mention at the start.
Where to go from here? Is the application somehow stored as a draft or something making it impossible for me to create another before its discarded or am I missing something?

Invalid permissions after setting gcloud caching use_kaniko?

I encountered a strange permissions error while building Docker images on the cloud. I switched to another machine, installed Gcloud, did gcloud init and everything worked again.
However, I noticed while building images, it took much longer because I didn't enable kaniko cache (which I figured out from this post: gcloud rebuilds complete container but Dockerfile is the same, only the script has changed)
After enabling this feature, I tried to rebuild my last image and bam, the same error message:
Status: Downloaded newer image for gcr.io/kaniko-project/executor:latest
gcr.io/kaniko-project/executor:latest
error checking push permissions --
make sure you entered the correct tag name, and that you are authenticated correctly, and try again:
checking push permission for "eu.gcr.io/pipeline/tree-par": creating push check transport for eu.gcr.io failed:
GET https://eu.gcr.io/v2/token?scope=repository%3pipeline%2Ftree-par%3Apush%2Cpull&service=eu.gcr.io:
UNAUTHORIZED: You don't have the needed permissions to perform this operation, and you may have invalid credentials.
To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication
ERROR
ERROR: build step 0 "gcr.io/kaniko-project/executor:latest" failed: step exited with non-zero status: 1
-------------------------------------------------------------------------------------------------------------------------------
ERROR: (gcloud.builds.submit) build bad4a9a4-054d-4ad7-991d-e5aeae039b7c completed with status "FAILURE"
Anyone any idea why this failed upon enabling the Kaniko cache? I hate to not use it because when it still worked, it really decreased the time it took to create docker images.
It seems that the issue comes from Kaniko's end.
Three days ago, on version v0.21.0, they added this fix:
Fix: GCR credential helper check does not respect DOCKER_CONFIG environment variable
Even after this release, 1 day later, this issue was reported where users saw a very similar Error message:
"[...] You don't have the needed permissions to perform this operation, and you may have invalid credentials[...] "
This was already fixed yesterday with the release of the v0.22.0 version. The suggested workaround is to execute the following command:
gcr.io/kaniko-project/executor:v0.22.0
I would suggest use that command instead of executor:latest to "force" the use of the v0.22.0 version.
I hope this is helpful! :)

Update action package with gactions always returns request timeout

I created a project under actions console and made a test action package for smart home app. I want to try uploading the action package I have using gactions. However, every time I execute this command
./gactions --verbose update --action_package action.json --project my_project_id
the result is always like this:
Unable to update: Patch https://actions.googleapis.com/v2/agents/my_project_id?updateMask=agent.draftActionPackage.actions%2Cagent.draftActionPackage.conversations&validateOnly=false: Post https://accounts.google.com/o/oauth2/token: dial tcp 216.58.200.45:443: i/o timeout
I checked the verbose log and I noticed that it is reading some data from creds.data
Reading credentials from: creds.data
Then I noticed the contents in creds.data contains the access token and the expiry time. But the expiry time is july 18, which is a lot of days from now. I am not sure if this is the case that causes timeout error. And I also don't know how to update the creds.data to get a new access token.
Alright. I noticed that a part of this error is my net problem. But I was able to open yahoo and other sites, while the update just didn't work. But nevermind, I just switched to a different Wi-Fi.
Then I deleted the creds.data. And executed the update command again, this will come out.
Gactions needs access to your Google account. Please copy & paste the URL below into a web browser and follow the instructions there. Then copy and paste the authorization code from the browser back here.
Visit this URL:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=237807841406-o6vu1tjkq8oqjub8jilj6vuc396e2d0c.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fassistant+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Factions.builder&state=state
Enter authorization code:
Then I followed the instructions above, got the authorization code, copied and pasted it in the console, and everything works fine now.

Error pushing changes to cloud foundry

from my local host, I connected to blue mix with
cf api https://api.ng.bluemix.net
I logged in and then I pushed the changes with
cf push
However, in the console,
Uploading MY_PROJECT...
Uploading app files from: /Users/MyName/Documents/MY_PROJECT
Uploading 437.7K, 386 files
Done uploading
FAILED
Error processing app files: Error uploading application.
The resource file mode is invalid: File mode '0444' is invalid.
(venv) My-iMac:MY_PROJECT MyName$
How do I trouble shoot this?
According to this link: https://github.com/cloudfoundry/cli/issues/685 the file mode must be at least 600 so I guess you should "raise" the permissions for your resources folder, even if 444 would be technically ok.
Concerning troubleshooting: the error message is right there in your output. If you need more log output, you can use the command
cf logs APP-NAME
See https://docs.cloudfoundry.org/devguide/deploy-apps/streaming-logs.html for further details.

Manually create Debug Token for BB10 fails

i want to create a debug token for my dev device with the native SDK (momentics), but it fails without any error message (just: "error creating debug token).
Now i use the command line tools.
But:
1. If i want to request a token:
./blackberry-debugtokenrequest -storepass xxxxx -devicepin xxxxx -csjpin xxxxx client-RDK-00000.csj
i get:
Error: Not yet registered to request debug tokens
2. So i want to register (i'm already registered, but ok...):
./blackberry-debugtokenrequest -register -storepass xxxxx -csjpin xxxxx client-PBDT-00000.csj
Error: Error: Unable to register client '00000' because there are no
more registration attempts. If you have already registered with this
server, then you should restore your signing keys from backup. If you
don't have a backup of the keys, then you can order a new set of keys
at www.blackberry.com/go/codesignin
I have a backup, but what should i do with it?
I want to create a debug token, but the message says: not yet registered.
So i want to register, and it says: already registered...
First things first, you only need the CSJ files to register with RIM, which you only need to do once. You can then safely delete them and your CSJ PIN.
If you have a backup file it means you have already registered which means you shouldn't be using the -register flag when attempting to create a debug token.
To restore your backup code signing key follow these instructions: http://supportforums.blackberry.com/t5/Testing-and-Deployment/Backup-and-Restore-BlackBerry-Code-Signing-Keys/ta-p/837925
Once you have restored your code signing key you can create a debug token using the following command:
blackberry-debugtokenrequest -storepass developercertpass -devicepin 50F2D211 dt.bar
You can use the CSJ files to register only one time. After that it cannot be used. Can you try getting new set of CSJ Files from blackberry server? I think it might solve the issue.
If you know Spanish I recommended this post.
In the pdf, in page 9, you´ll found a bat to get a debug token of blackberry 10. This is the code:
set LOCAL_DATA_PATH="c:\Users\<user>\AppData\Local\Research In Motion"
set CSK_PASSWORD=Pass of CA
set CERT_STORE_PASSWORD=Pass of web key
set DEVICE_PIN=PIN of device
E:
cd "eclipse\plugins\net.rim.ajde_1.5.2.201302260701\blackberry.tools.SDK\bin"
blackberry-debugtokenrequest -cskpass %CSK_PASSWORD% -keystore %LOCAL_DATA_PATH%\author.p12 -storepass %CERT_STORE_PASSWORD% -devicepin %DEVICE_PIN% %LOCAL_DATA_PATH%\debugtoken.bar
pause