No Cache API URL specified

Cache does not work.
CacheAPIURL does not exist.
However, it works on the default branch.

Is there a way to solve it?

  • steps
    - cache-pull: {}
    // something
    - cache-push:
        is_always_run: true
        run_if: .IsCI
        inputs:
        - cache_paths: |-
            ./vendor -> ./Gemfile.lock
            ./Pods -> ./Podfile.lock
            ./Carthage -> ./Cartfile.resolved
        - compress_archive: 'true'
  • Log
| (0) cache-pull                                                               |
+------------------------------------------------------------------------------+
| id: cache-pull                                                               |
| version: 2.1.3                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2020-01-22T17:51:05Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Config:
- CacheAPIURL: 
- DebugMode: false
- StackID: osx-xcode-11.3.x
No Cache API URL specified, there's no cache to use, exiting.

Hi @watanave,

Thank you for reaching out.

We received a similar ticket to this over on GitHub (link: https://github.com/bitrise-steplib/steps-cache-push/issues/38). I am going to reach out to our tooling team to see if anything has changed and see what they suggest as a solution.

I will follow-up as soon as I have more information.

Cheers,
Luna

Hi @watanave,

Can you please add the following script step, run a similar build, and follow-up with the output?

#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
env

Thanks and looking forward to hearing from you.
Luna

1 Like

Thanks for the reply.
I got the logs.

And I found something new.
This problem occurs with Pull Request.
When triggered manually on a branch without a pull request, the cache worked.


+ env
ANDROID_NDK_VERSION=r20
BITRISE_BUILD_STATUS=0
GITHUB_ACCESS_TOKEN=[REDACTED]
ADDON_SHIP_API_URL=[REDACTED]
ANDROID_HOME=/usr/local/share/android-sdk
BITRISE_OSX_STACK_REV_ID=v2019_12_12_1
SHELL=/bin/bash
BITRISE_GIT_BRANCH=feature/translate_result_view
TMPDIR=/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/
BITRISE_BUILD_API_TOKEN=[REDACTED]
ADDON_SHIP_API_TOKEN=[REDACTED]
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.D8mIlviKVD/Render
BITRISE_APP_TITLE=HiraganaTranslator
BITRISE_BUILD_URL=https://app.bitrise.io/build/12ba053b660fa953
ADDON_VDTESTING_API_URL=[REDACTED]
ANDROID_SDK_ROOT=/usr/local/share/android-sdk
BITRISE_GIT_MESSAGE=ひらがな変換結果画面 デザイン / 画面遷移
BITRISE_DEPLOY_DIR=/Users/vagrant/deploy
BITRISE_TMP_DIR=/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/tmp019354230
BITRISE_KEYCHAIN=bitrise.keychain
BITRISE_LIBRARY_DIR=/Users/vagrant/Library/MobileDevice/Provisioning Profiles
BITRISE_SOURCE_DIR=/Users/vagrant/git
LC_ALL=en_US.UTF-8
GIT_CLONE_COMMIT_COMMITER_NAME=watanave
DOTPROFILE_LOADED=1
script_file_path=
BITRISE_IO=true
USER=vagrant
BITRISEIO_GIT_BRANCH_DEST=master
HOMEBREW_NO_ANALYTICS=1
ENVMAN_ENVSTORE_PATH=/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise897823242/output_envstore.yml
BITRISE_CACHE_DIR=/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/cache384228531
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.ivEJiu6djn/Listeners
BITRISEIO_PULL_REQUEST_MERGE_BRANCH=pull/23/merge
HOMEBREW_NO_AUTO_UPDATE=1
GIT_CLONE_COMMIT_MESSAGE_SUBJECT=bitriseから依頼されたスクリプトを追加
BITRISE_TOOLS_FOLDER_PATH=/Users/vagrant/bitrise/tools
BITRISE_SYM_ROOT=/Users/vagrant/build
MATCH_KEYCHAIN_PASSWORD=vagrant
BITRISE_PULL_REQUEST=23
BITRISE_STEP_DIR=/Users/vagrant/stepdir
BITRISE_TEST_RESULT_DIR=/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/test_results623579044/test_result864283105
HOST_NAME=prd-veg-std-g-xcode-11-3-200123191020-cLjyHKJksuM6dc8wZ72SyU
BITRISE_APP_SLUG=7e33687043c6ea5a
PATH=/Users/vagrant/.bitrise/tools:/Users/vagrant/.jenv/shims:/Users/vagrant/.rbenv/shims:/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/vagrant/.jenv/shims:/Users/vagrant/.rbenv/shims:/usr/local/sbin:/Users/vagrant/bin:/usr/local/opt/go/libexec/bin:/Users/vagrant/go/bin:/Users/vagrant/bitrise/tools/cmd-bridge/bin/osx:/opt/android-ndk:/usr/local/share/android-sdk/tools:/usr/local/share/android-sdk/tools/bin:/usr/local/share/android-sdk/platform-tools:/usr/local/flutter/bin:/Users/vagrant/.jenv/bin:/usr/local/opt/go/libexec/bin:/Users/vagrant/go/bin:/Users/vagrant/bitrise/tools/cmd-bridge/bin/osx:/opt/android-ndk:/usr/local/share/android-sdk/tools:/usr/local/share/android-sdk/tools/bin:/usr/local/share/android-sdk/platform-tools:/usr/local/flutter/bin:/Users/vagrant/.jenv/bin
GIT_REPOSITORY_URL=https://github.com/susan335/HiraganaTranslator.git
BITRISE_GIT_COMMIT=641bde400ddcfcb25a08bcdd629963a8ad3fa29b
BITRISE_TRIGGERED_WORKFLOW_TITLE=primary
JENV_LOADED=1
PWD=/Users/vagrant/git
BITRISEIO_STACK_ID=osx-xcode-11.3.x
BITRISE_TEST_DEPLOY_DIR=/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/test_results623579044
PR=true
LANG=en_US.UTF-8
runner_bin=/bin/bash
BITRISE_FOLDER_PATH=/Users/vagrant/bitrise
BITRISE_STEP_SOURCE_DIR=/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise897823242/step_src
ADDON_VDTESTING_API_TOKEN=[REDACTED]
BITRISE_STEP_FORMATTED_OUTPUT_FILE_PATH=/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/bitrise897823242/formatted_output.md
XPC_FLAGS=0x0
content=#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
env
BITRISE_PROFILE_DIR=/Users/vagrant/profiles
BITRISE_STEP_DATA_FOLDER_PATH=/Users/vagrant/bitrise/stepdata
GIT_CLONE_COMMIT_HASH=641bde400ddcfcb25a08bcdd629963a8ad3fa29b
RBENV_SHELL=bash
BITRISE_KEYCHAIN_PASSWORD=vagrant
XPC_SERVICE_NAME=0
STEPLIB_BUILD_STATUS=0
SHLVL=7
HOME=/Users/vagrant
PULL_REQUEST_ID=23
LANGUAGE=en_US.UTF-8
BITRISEIO_PULL_REQUEST_HEAD_BRANCH=pull/23/head
BITRISEIO_GIT_REPOSITORY_OWNER=susan335
GIT_CLONE_COMMIT_AUTHOR_NAME=watanave
GIT_CLONE_COMMIT_COMMITER_EMAIL=susan.se3p@gmail.com
CI=true
BITRISEIO_GIT_REPOSITORY_SLUG=HiraganaTranslator
LOGLEVEL=info
GIT_CLONE_COMMIT_AUTHOR_EMAIL=susan.se3p@gmail.com
DOTBASHPROFILE_LOADED=1
LOGNAME=vagrant
BITRISEIO_PULL_REQUEST_REPOSITORY_URL=https://github.com/susan335/HiraganaTranslator.git
JENV_SHELL=bash
BITRISE_APP_URL=https://app.bitrise.io/app/7e33687043c6ea5a
BITRISE_BUILD_NUMBER=19
GIT_CLONE_COMMIT_MESSAGE_BODY=
BITRISE_OBJ_ROOT=/Users/vagrant/bin
GOPATH=/Users/vagrant/go
BITRISE_BUILD_TRIGGER_TIMESTAMP=1579806951
is_debug=no
ANDROID_NDK_HOME=/opt/android-ndk/android-ndk-r20
working_dir=/Users/vagrant/git
DOT_BITRISE_PROFILE_LOADED=1
BITRISE_TRIGGERED_WORKFLOW_ID=primary
BITRISE_TOOLS_CMD_BRIDGE_PATH=/usr/local/bin/cmd-bridge
DOTBASHRC_LOADED=1
BITRISE_SECRET_FILTERING=true
GIT_CLONE_COMMIT_COUNT=105
BITRISE_BUILD_SLUG=12ba053b660fa953
_=/usr/bin/env

@watanave Thanks for providing this information. I am going to reach out to our tooling team to see what they suggest and get back to you as soon as I have more information.

1 Like

Hi @watanave,

Thank you for your patience.

I have spoke with our tooling and website team. This is apparently intended behaviour for open source/public repositories to prevent unauthorized access to your caches (since anyone can open a pull request on your project).

I am going to open a JIRA internally to discuss the possibility/feature request of adding the option for users to disable this precaution. In the meantime, the solution is to start builds on the branch itself, not the pull request.

Please don’t hesitate to follow-up if you have any questions.

Kind regards,
Luna

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.