Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bazel Maven SHA cache not matching #762

Closed
grainw opened this issue Jun 3, 2020 · 14 comments
Closed

Bazel Maven SHA cache not matching #762

grainw opened this issue Jun 3, 2020 · 14 comments
Assignees
Labels
legacy:face detection Issues related to Face Detection platform:android Issues with Android as Platform type:build/install For Build and Installation issues

Comments

@grainw
Copy link

grainw commented Jun 3, 2020

INFO: Repository 'maven' used the following cache hits instead of downloading the corresponding file.

  • Hash '6598d9277705ad8369a4f9c64217fbc31c19234f2cbcca9b1e5c4300a3abb317' for https://github.com/coursier/coursier/releases/download/v2.0.0-RC5-3/coursier.jar
    If the definition of 'maven' was updated, verify that the hashes were also updated.
    ERROR: An error occurred during the fetch of repository 'maven':
    Error while fetching artifact with coursier: Timed out
    ERROR: /Users/xieqingxi/newPycharmProject/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/basic/BUILD:18:16: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/basic:basic_lib depends on @maven//:androidx_concurrent_concurrent_futures in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
    ERROR: /Users/xieqingxi/newPycharmProject/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/basic/BUILD:18:16: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/basic:basic_lib depends on @maven//:com_google_guava_guava in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
    ERROR: Analysis of target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/facedetectioncpu:facedetectioncpu' failed; build aborted: Analysis failed
    INFO: Elapsed time: 828.794s
    INFO: 0 processes.
    FAILED: Build did NOT complete successfully (4 packages loaded, 3366 targets configured)
@grainw
Copy link
Author

grainw commented Jun 3, 2020

What does this mean and how do I fix it?

@jiuqiant
Copy link
Contributor

jiuqiant commented Jun 3, 2020

I think the root issue is "Error while fetching artifact with coursier: Timed out", which is a network connection issue. You probably can find some useful solutions at #3, #581, and #601.

@jiuqiant jiuqiant self-assigned this Jun 3, 2020
@grainw
Copy link
Author

grainw commented Jun 4, 2020

[alex@alexMBP mediapipe]$ bazel build -c opt --config=android_arm64 --distdir=cache --repository_cache=cache --keep_going mediapipe/examples/android/src/java/com/google/mediapipe/apps/facedetectioncpu
Starting local Bazel server and connecting to it...
INFO: SHA256 (https://github.com/bazelbuild/rules_cc/archive/master.zip) = a07fc8b90c22e42962142504438a84b31567976adcd9ee1a4c9f75d2e3396f8d
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "a07fc8b90c22e42962142504438a84b31567976adcd9ee1a4c9f75d2e3396f8d"
DEBUG: Repository rules_cc instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
/private/var/tmp/_bazel_xieqingxi/dc96381984d2233f78a69cb75737a1e0/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in
INFO: SHA256 (https://github.com/opencv/opencv/releases/download/3.4.3/opencv-3.4.3-android-sdk.zip) = cdb0e190c3734edd4052a3535d9e4310af912a9f70a421b1621711942a1028d5
DEBUG: Rule 'android_opencv' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "cdb0e190c3734edd4052a3535d9e4310af912a9f70a421b1621711942a1028d5"
DEBUG: Repository android_opencv instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
/private/var/tmp/_bazel_xieqingxi/dc96381984d2233f78a69cb75737a1e0/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in
INFO: Repository maven instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule coursier_fetch defined at:
/private/var/tmp/_bazel_xieqingxi/dc96381984d2233f78a69cb75737a1e0/external/rules_jvm_external/coursier.bzl:798:33: in
INFO: Repository 'maven' used the following cache hits instead of downloading the corresponding file.

Hash '6598d9277705ad8369a4f9c64217fbc31c19234f2cbcca9b1e5c4300a3abb317' for https://github.com/coursier/coursier/releases/download/v2.0.0-RC5-3/coursier.jar
If the definition of 'maven' was updated, verify that the hashes were also updated.
ERROR: An error occurred during the fetch of repository 'maven':
Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/third_party/BUILD:158:16: //third_party:camerax_core depends on @maven//:androidx_camera_camera_core in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/third_party/BUILD:165:16: //third_party:camera2 depends on @maven//:androidx_camera_camera_camera2 in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/third_party/BUILD:137:16: //third_party:androidx_legacy_support_v4 depends on @maven//:androidx_legacy_legacy_support_v4 in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/third_party/BUILD:151:16: //third_party:androidx_recyclerview depends on @maven//:androidx_recyclerview_recyclerview in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/third_party/BUILD:130:16: //third_party:androidx_core depends on @maven//:androidx_core_core in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/third_party/BUILD:116:16: //third_party:androidx_appcompat depends on @maven//:androidx_appcompat_appcompat in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/third_party/BUILD:109:16: //third_party:androidx_annotation depends on @maven//:androidx_annotation_annotation in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/components/BUILD:41:16: //mediapipe/java/com/google/mediapipe/components:android_camerax_helper depends on @maven//:androidx_concurrent_concurrent_futures in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/components/BUILD:41:16: //mediapipe/java/com/google/mediapipe/components:android_camerax_helper depends on @maven//:androidx_lifecycle_lifecycle_common in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/components/BUILD:41:16: //mediapipe/java/com/google/mediapipe/components:android_camerax_helper depends on @maven//:com_google_code_findbugs_jsr305 in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/components/BUILD:41:16: //mediapipe/java/com/google/mediapipe/components:android_camerax_helper depends on @maven//:com_google_guava_guava in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/third_party/BUILD:123:16: //third_party:androidx_constraint_layout depends on @maven//:androidx_constraintlayout_constraintlayout in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/framework/BUILD:73:16: //mediapipe/java/com/google/mediapipe/framework:android_core depends on @maven//:com_google_code_findbugs_jsr305 in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/framework/BUILD:73:16: //mediapipe/java/com/google/mediapipe/framework:android_core depends on @maven//:com_google_flogger_flogger in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/framework/BUILD:73:16: //mediapipe/java/com/google/mediapipe/framework:android_core depends on @maven//:com_google_flogger_flogger_system_backend in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/framework/BUILD:73:16: //mediapipe/java/com/google/mediapipe/framework:android_core depends on @maven//:com_google_guava_guava in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/framework/BUILD:43:16: //mediapipe/java/com/google/mediapipe/framework:android_framework_no_proguard depends on @maven//:com_google_code_findbugs_jsr305 in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/framework/BUILD:43:16: //mediapipe/java/com/google/mediapipe/framework:android_framework_no_proguard depends on @maven//:com_google_flogger_flogger in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/framework/BUILD:43:16: //mediapipe/java/com/google/mediapipe/framework:android_framework_no_proguard depends on @maven//:com_google_flogger_flogger_system_backend in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/framework/BUILD:43:16: //mediapipe/java/com/google/mediapipe/framework:android_framework_no_proguard depends on @maven//:com_google_guava_guava in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/glutil/BUILD:21:16: //mediapipe/java/com/google/mediapipe/glutil:glutil depends on @maven//:com_google_code_findbugs_jsr305 in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/glutil/BUILD:21:16: //mediapipe/java/com/google/mediapipe/glutil:glutil depends on @maven//:com_google_flogger_flogger in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/glutil/BUILD:21:16: //mediapipe/java/com/google/mediapipe/glutil:glutil depends on @maven//:com_google_flogger_flogger_system_backend in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/glutil/BUILD:21:16: //mediapipe/java/com/google/mediapipe/glutil:glutil depends on @maven//:com_google_guava_guava in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/components/BUILD:17:16: //mediapipe/java/com/google/mediapipe/components:android_components depends on @maven//:com_google_code_findbugs_jsr305 in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/java/com/google/mediapipe/components/BUILD:17:16: //mediapipe/java/com/google/mediapipe/components:android_components depends on @maven//:com_google_guava_guava in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/examples/android/src/java/com/google/mediapipe/apps/basic/BUILD:18:16: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/basic:basic_lib depends on @maven//:androidx_concurrent_concurrent_futures in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/xieqingxi/newPycharmProject/mediapipe/mediapipe/examples/android/src/java/com/google/mediapipe/apps/basic/BUILD:18:16: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/basic:basic_lib depends on @maven//:com_google_guava_guava in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
WARNING: errors encountered while analyzing target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/facedetectioncpu:facedetectioncpu': it will not be built
INFO: Analyzed target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/facedetectioncpu:facedetectioncpu (149 packages loaded, 9708 targets configured).
INFO: Found 0 targets...
ERROR: command succeeded, but there were loading phase errors
INFO: Elapsed time: 620.213s, Critical Path: 0.03s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

@grainw
Copy link
Author

grainw commented Jun 4, 2020

I followed the solution in#3, but still reported the error above, and the problem was mainly related to Maven.how do I fix it?@jiuqiant I'm using the latest version .And I have a VPN

@Aprameyah
Copy link

@grainw where you able to fix the problem? Im getting a similar problem #1207

@jiuqiant jiuqiant removed their assignment Nov 11, 2020
@ljmkimqx
Copy link

ljmkimqx commented Jan 4, 2021

same problem. I don't know how to fix it. It's the same mistake I tried so many times.

`
bazel build -c opt --host_crosstool_top=@bazel_tools//tools/cpp:toolchain --fat_apk_cpu=arm64-v8a,armeabi-v7a
//mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar:mp_face_detection_aar

WARNING: API level 29 specified by android_ndk_repository 'androidndk' is not available. Using latest known API level 28

INFO: Repository maven instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)

Repository rule coursier_fetch defined at:
/private/var/tmp/_bazel_ljm/db4283ef7dc11dcc5f964f68d2d19029/external/rules_jvm_external/coursier.bzl:798:33: in

INFO: Repository 'maven' used the following cache hits instead of downloading the corresponding file.

ERROR: An error occurred during the fetch of repository 'maven':
Error while fetching artifact with coursier: Timed out
ERROR: /Users/ljm/Downloads/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar/BUILD:3:14: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar:mp_face_detection_aar_android_lib depends on @maven//:com_google_code_findbugs_jsr305 in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/ljm/Downloads/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar/BUILD:3:14: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar:mp_face_detection_aar_android_lib depends on @maven//:com_google_flogger_flogger in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/ljm/Downloads/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar/BUILD:3:14: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar:mp_face_detection_aar_android_lib depends on @maven//:com_google_flogger_flogger_system_backend in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/ljm/Downloads/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar/BUILD:3:14: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar:mp_face_detection_aar_android_lib depends on @maven//:com_google_guava_guava in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: /Users/ljm/Downloads/mediapipe-master/mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar/BUILD:3:14: //mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar:mp_face_detection_aar_android_lib depends on @maven//:androidx_lifecycle_lifecycle_common in repository @maven which failed to fetch. no such package '@maven//': Error while fetching artifact with coursier: Timed out
ERROR: Analysis of target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/build_aar:mp_face_detection_aar' failed; build aborted: Analysis failed

INFO: Elapsed time: 601.682s
INFO: 0 processes.

FAILED: Build did NOT complete successfully (8 packages loaded, 6807 targets c
onfigured)
`

@Samuel-wei
Copy link

I followed the solution in#3, but still reported the error above, and the problem was mainly related to Maven.how do I fix it?@jiuqiant I'm using the latest version .And I have a VPN

Did you fixed it what you encounter above?
I has similar problems.
Any advise to me
Thank you!

@liuminghui233
Copy link

I followed the solution in#3, but still reported the error above, and the problem was mainly related to Maven.how do I fix it?@jiuqiant I'm using the latest version .And I have a VPN

Did you fixed it what you encounter above?
I has similar problems.
Any advise to me
Thank you!

Have you solved the problem now? Can you give me some advice?

@adrishyantee
Copy link

Even I am also having the same problem. Kindly help me out

@sgowroji sgowroji self-assigned this Aug 3, 2021
@sgowroji sgowroji added platform:android Issues with Android as Platform legacy:face detection Issues related to Face Detection stat:awaiting response Waiting for user response type:build/install For Build and Installation issues labels Aug 3, 2021
@google-ml-butler
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

@11676670
Copy link

if you network blocked by the Great Firewall. you can change your repositories in WORKSPACE file like this.
repositories =
[
"https://maven.aliyun.com/repository/google",
"https://maven.aliyun.com/repository/central",
"https://maven.aliyun.com/repository/public",
],
Good luck.

@google-ml-butler
Copy link

Closing as stale. Please reopen if you'd like to work on this further.

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

@sgowroji sgowroji removed stat:awaiting response Waiting for user response stale labels Aug 23, 2021
@neontorrent
Copy link

In my case, my coursier credentials.properties have an empty line, and that somehow caused a timed out error in bazel build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy:face detection Issues related to Face Detection platform:android Issues with Android as Platform type:build/install For Build and Installation issues
Projects
None yet
Development

No branches or pull requests

10 participants