I'm trying to work out the instructions defined in http://www.webrtc.org/native-code/android. After the command "gclient sync" is executed and after hours of downloading, at the end the process failed:
fatal: early EOF
The remote end hung up unexpectedly
fatal: index-pack failed
error: RPC failed; result=56, HTTP code = 200
Traceback (most recent call last):
File "C:\depot_tools\depot_tools\gclient_scm.py", line 924, in _Clone
self._Run(clone_cmd, options, cwd=self._root_dir, retry=True)
File "C:\depot_tools\depot_tools\gclient_scm.py", line 1201, in _Run
gclient_utils.CheckCallAndFilterAndHeader(cmd, env=env, **kwargs)
File "C:\depot_tools\depot_tools\gclient_utils.py", line 293, in CheckCallAndF
ilterAndHeader
return CheckCallAndFilter(args, **kwargs)
File "C:\depot_tools\depot_tools\gclient_utils.py", line 538, in CheckCallAndF
ilter
rv, args, kwargs.get('cwd', None), None, None)
CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=512m clone --no-che
ckout --progress --verbose https://chromium.googlesource.com/chromium/src.git C:
\\webrtc_android\\src\\chromium\\_gclient_src_x3yrqm' returned non-zero exit sta
tus 128 in C:\webrtc_android\src\chromium
----------------------------------------
Traceback (most recent call last):
File "C:\depot_tools\depot_tools\gclient.py", line 2325, in <module>
sys.exit(main(sys.argv[1:]))
File "C:\depot_tools\depot_tools\gclient.py", line 2311, in main
return dispatcher.execute(OptionParser(), argv)
File "C:\depot_tools\depot_tools\subcommand.py", line 252, in execute
return command(parser, args[1:])
File "C:\depot_tools\depot_tools\gclient.py", line 2066, in CMDsync
ret = client.RunOnDeps('update', args)
File "C:\depot_tools\depot_tools\gclient.py", line 1523, in RunOnDeps
work_queue.flush(revision_overrides, command, args, options=self._options)
File "C:\depot_tools\depot_tools\gclient_utils.py", line 1024, in run
self.item.run(*self.args, **self.kwargs)
File "C:\depot_tools\depot_tools\gclient.py", line 834, in run
file_list)
File "C:\depot_tools\depot_tools\gclient_scm.py", line 166, in RunCommand
return getattr(self, command)(options, args, file_list)
File "C:\depot_tools\depot_tools\gclient_scm.py", line 418, in update
self._Clone(revision, url, options)
File "C:\depot_tools\depot_tools\gclient_scm.py", line 932, in _Clone
if os.listdir(tmp_dir):
WindowsError: [Error 3] The system cannot find the path specified: 'C:\\webrtc_a
ndroid\\src\\chromium\\_gclient_src_x3yrqm/*.*'
Error: Command 'C:\\depot_tools\\depot_tools\\python276_bin\\python.exe -u src/s
ync_chromium.py --target-revision 47ce5feb1d13ce889da15f76f063a7978a0b5c37' retu
rned non-zero exit status 1 in C:\webrtc_android
Hook ''C:\depot_tools\depot_tools\python276_bin\python.exe' -u src/sync_chromium
.py --target-revision 47ce5feb1d13ce889da15f76f063a7978a0b5c37' took 77717.11 se
cs
Does this has to do with the fact that I'am trying to execute it on Windows?
Independently of your error, you will not be able to fetch and compile code for android under windows. You need to be on the right linux distribution.
Related
I keep having the same error while trying to do checkout AOSP source on macOS Catalina 10.15.7. Followed all the instructions on https://source.android.com/setup/build/initializing#setting-up-a-mac-os-x-build-environment, also https://source.android.com/setup/build/downloading and tried different tags. This is what happens after I invoke repo --trace sync -j1.
: git config --file /Volumes/android/aosp/.repo/projects/external/skqp.git/config --includes --null --list 1>| 2>|
: export GIT_DIR=/Volumes/android/aosp/.repo/projects/external/skqp.git
: git rev-parse --verify refs/tags/android-10.0.0_r41^0 1>| 2>|
: cd /Volumes/android/aosp/external/skqp
: git read-tree --reset -u -v HEAD 1>| 2>|
error: RPC failed; HTTP 499 curl 16 Error in the HTTP2 framing layer
fatal: the remote end hung up unexpectedly
error: Cannot checkout platform/external/skqp: GitError: Cannot initialize work tree for platform/external/skqp
: git rev-list refs/tags/android-10.0.0_r41 -1 1>| 2>|
Traceback (most recent call last):
File "/Volumes/android/aosp/.repo/repo/main.py", line 630, in <module>
_Main(sys.argv[1:])
File "/Volumes/android/aosp/.repo/repo/main.py", line 604, in _Main
result = run()
File "/Volumes/android/aosp/.repo/repo/main.py", line 597, in <lambda>
run = lambda: repo._Run(name, gopts, argv) or 0
File "/Volumes/android/aosp/.repo/repo/main.py", line 266, in _Run
result = cmd.Execute(copts, cargs)
File "/Volumes/android/aosp/.repo/repo/subcmds/sync.py", line 983, in Execute
self._Checkout(all_projects, opt, err_event, err_results)
File "/Volumes/android/aosp/.repo/repo/subcmds/sync.py", line 567, in _Checkout
self._CheckoutWorker(**kwargs)
File "/Volumes/android/aosp/.repo/repo/subcmds/sync.py", line 447, in _CheckoutWorker
return self._CheckoutOne(opt, project, *args, **kwargs)
File "/Volumes/android/aosp/.repo/repo/subcmds/sync.py", line 481, in _CheckoutOne
project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
File "/Volumes/android/aosp/.repo/repo/project.py", line 1223, in Sync_LocalHalf
self._InitWorkTree(force_sync=force_sync, submodules=submodules)
File "/Volumes/android/aosp/.repo/repo/project.py", line 2758, in _InitWorkTree
raise GitError('Cannot initialize work tree for ' + self.name)
error.GitError: Cannot initialize work tree for platform/external/skqp
When I try to run Systrace, i get this stacktrace:
python systrace.py --app=com.mydebug.app view gfx sched dalvik wm
Starting tracing (stop with enter)
Tracing completed. Collecting output...
CRITICAL:root:(TimeoutThread-1-for-Thread-1) Exception on ReadFile(1829d365, /sys/kernel/debug/tracing/tracing_on, retries=3, timeout=30), attempt 1 of 4: AdbCommandFailedError("(device: 1829d365) adb pull /sys/kernel/debug/tracing/tracing_on /tmp/tmpyO_hQZ/tmp_ReadFileWithPull: failed with exit status 1 and output:\n- adb: error: failed to copy '/sys/kernel/debug/tracing/tracing_on' to '/tmp/tmpyO_hQZ/tmp_ReadFileWithPull': remote Permission denied\n",)
CRITICAL:root:(TimeoutThread-2-for-Thread-1) Exception on ReadFile(1829d365, /sys/kernel/debug/tracing/tracing_on, retries=3, timeout=30), attempt 2 of 4: AdbCommandFailedError("(device: 1829d365) adb pull /sys/kernel/debug/tracing/tracing_on /tmp/tmpVakBVH/tmp_ReadFileWithPull: failed with exit status 1 and output:\n- adb: error: failed to copy '/sys/kernel/debug/tracing/tracing_on' to '/tmp/tmpVakBVH/tmp_ReadFileWithPull': remote Permission denied\n",)
CRITICAL:root:(TimeoutThread-3-for-Thread-1) Exception on ReadFile(1829d365, /sys/kernel/debug/tracing/tracing_on, retries=3, timeout=30), attempt 3 of 4: AdbCommandFailedError("(device: 1829d365) adb pull /sys/kernel/debug/tracing/tracing_on /tmp/tmp_IoryO/tmp_ReadFileWithPull: failed with exit status 1 and output:\n- adb: error: failed to copy '/sys/kernel/debug/tracing/tracing_on' to '/tmp/tmp_IoryO/tmp_ReadFileWithPull': remote Permission denied\n",)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/tracing_agents/atrace_agent.py", line 194, in _collect_and_preprocess
trace_data = self._collect_trace_data()
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/tracing_agents/atrace_agent.py", line 261, in _collect_trace_data
self._stop_trace()
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/tracing_agents/atrace_agent.py", line 244, in _stop_trace
if int(self._device_utils.ReadFile(is_trace_enabled_file)):
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/android/decorators.py", line 57, in timeout_retry_wrapper
retry_if_func=retry_if_func)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/utils/timeout_retry.py", line 159, in Run
error_log_func=error_log_func)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/utils/reraiser_thread.py", line 186, in JoinAll
self._JoinAll(watcher, timeout)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/utils/reraiser_thread.py", line 158, in _JoinAll
thread.ReraiseIfException()
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/utils/reraiser_thread.py", line 81, in run
self._ret = self._func(*self._args, **self._kwargs)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/utils/timeout_retry.py", line 152, in <lambda>
child_thread = reraiser_thread.ReraiserThread(lambda: func(*args, **kwargs),
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/android/decorators.py", line 47, in impl
return f(*args, **kwargs)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/android/device_utils.py", line 1658, in ReadFile
return self._ReadFileWithPull(device_path)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/android/device_utils.py", line 1610, in _ReadFileWithPull
self.adb.Pull(device_path, host_temp_path)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/android/sdk/adb_wrapper.py", line 454, in Pull
self._RunDeviceAdbCmd(cmd, timeout, retries)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/android/sdk/adb_wrapper.py", line 282, in _RunDeviceAdbCmd
check_error=check_error)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/android/decorators.py", line 51, in timeout_retry_wrapper
return impl()
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/android/decorators.py", line 47, in impl
return f(*args, **kwargs)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/../../devil/devil/android/sdk/adb_wrapper.py", line 258, in _RunAdbCmd
args, output, status, device_serial)
AdbCommandFailedError: (device: 1829d365) adb pull /sys/kernel/debug/tracing/tracing_on /tmp/tmpw7qK2c/tmp_ReadFileWithPull: failed with exit status 1 and output:
- adb: error: failed to copy '/sys/kernel/debug/tracing/tracing_on' to '/tmp/tmpw7qK2c/tmp_ReadFileWithPull': remote Permission denied
Outputting Systrace results...
Tracing complete, writing results
Traceback (most recent call last):
File "systrace.py", line 49, in <module>
sys.exit(run_systrace.main())
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/run_systrace.py", line 194, in main
main_impl(sys.argv)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/run_systrace.py", line 191, in main_impl
controller.OutputSystraceResults(write_json=options.write_json)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/systrace_runner.py", line 67, in OutputSystraceResults
self._out_filename)
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/output_generator.py", line 70, in GenerateHTMLOutput
html_file.write(_ConvertToHtmlString(result.raw_data))
File "/Users/vinay.nagaraj/Library/Android/sdk/platform-tools/systrace/catapult/systrace/systrace/output_generator.py", line 92, in _ConvertToHtmlString
raise ValueError('Invalid trace result format for HTML output')
ValueError: Invalid trace result format for HTML output
I can adb pull files off my sdcard though. I've tried running systrace from my android-sdk platform-tools, and I've tried running systrace cloned from the catapult git repo but I get the same error. Is it not possible to run systrace on production devices??
What's peculiar is that I can successfully run systrace using the Android Device Monitor, but I don't like how it forces me to put in a time unlike the command line tool. Also, no matter what time and buffer size I choose when running systrace through the Device Monitor it always records for 5 seconds only.
Getting errors as below, when I follow step 4 of the instruction from Getting Started with ARC Open Source on Linux. OS is Ubuntu 14.04 LTS running in Hyper-V.
UBUNTU14:~/arc$ ./configure
ERROR:root:While running
['third_party/tools/depot_tools/third_party/gsutil/gsutil', 'cp',
'gs://arc-build/naclports/builds/pepper_40/python.zip',
'/tmp/tmpUZ0IoK/naclports-python'] ERROR:root:GSResponseError:
status=403, code=None, reason=Forbidden.
ERROR:root:Try prodaccess, and if it does not solve the problem try rm
~/.devstore_token ###STEP_WARNINGS### ERROR:root:Retrying after 9 s
sleeping Traceback (most recent call last): File
"/home/fkiller/arc/src/build/build_common.py", line 938, in wrapper
return func(*args, **kwargs) File "/home/fkiller/arc/src/build/util/download_package_util.py", line 243,
in _download_package_with_retries
self._download_method(url, download_package_path) File "/home/fkiller/arc/src/build/util/download_package_util.py", line 119,
in _download
build_common.get_gsutil_executable(), 'cp', url, destination_path]) File
"/home/fkiller/arc/src/build/util/download_package_util.py", line 97,
in execute_subprocess
output = subprocess.check_output(cmd, cwd=cwd, stderr=subprocess.STDOUT) File "/usr/lib/python2.7/subprocess.py",
line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output) CalledProcessError: Command
'['third_party/tools/depot_tools/third_party/gsutil/gsutil', 'cp',
'gs://arc-build/naclports/builds/pepper_40/python.zip',
'/tmp/tmpUZ0IoK/naclports-python']' returned non-zero exit status 1
Any idea to resolve this without changing build script? I may manually pointing python.zip from other sources such as https://naclports.storage.googleapis.com/builds/pepper_40/trunk-147-g49eb4c9/publish/python/pnacl/python.zip, but I want to build it as is without changing scripts.
I've already tried to setup gsutil and its authenticator, but it didn't fix the issue.
EDIT: After #elijah-taylor fixed ACL, now I'm getting errors below
Traceback (most recent call last): File "src/build/configure.py",
line 365, in
sys.exit(main()) File "src/build/configure.py", line 347, in main
_gclient_sync_third_party() File "src/build/configure.py", line 132, in _gclient_sync_third_party
subprocess.check_output(cmd, cwd=os.path.dirname(gclient_filename)) File
"/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs) File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception OSError: [Errno 2] No such file or directory
In the line 132,
File "src/build/configure.py", line 132, in _gclient_sync_third_party
subprocess.check_output(cmd, cwd=os.path.dirname(gclient_filename))
gclient_filename is "third_party/.gclient" and os.path.dirname(gclient_filename) is "thrid_party".
The problem was bad ACLs on the files. I reached out to #elijah-taylor for a fix, it should now work!
faced same issue..fixed after running the following.
apt-get install gsutil
apt-get install libwww-perl
chmod +x ./third_party/tools/depot_tools/third_party/gsutil/gsutil
I use Facebook's Infer to check my android code
infer -- ./gradlew build
after 8 minutes
Fatal error: exception Sys_error("/Users/lm/project/android_workplace/******/app/build/intermediates/exploded-aar/com.mogujie/user/1.2.17/jars/classes.jar: Too many open files")
Traceback (most recent call last):
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/infer", line 180, in <module>
main()
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/infer", line 144, in main
capture_exitcode = imported_module.gen_instance(args, cmd).capture()
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/../lib/capture/gradle.py", line 83, in capture
return util.run_commands(cmds)
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/../lib/capture/util.py", line 40, in run_commands
if not cmd.start():
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/inferlib.py", line 692, in start
if self.capture() == os.EX_OK:
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/inferlib.py", line 478, in capture
return self.run_infer_frontend()
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/inferlib.py", line 469, in run_infer_frontend
self.args.analyzer
File "/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/inferlib.py", line 385, in run_command
raise e
subprocess.CalledProcessError: Command '[u'/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/InferJava', u'-project_root', '/Users/lm/project/android_workplace/Minicooper4android', u'-results_dir', u'/Users/lm/project/android_workplace/Minicooper4android/infer-out', u'-verbose_out', '/var/folders/2r/7hc18jz1091_jg7_8jcnqlhr0000gn/T/javac_qWbfkP.out', u'-models', u'/Users/lm/project/infer_workplace/infer-osx-v0.4.0/infer/bin/../lib/java/models.jar', u'-no-static_final']' returned non-zero exit status 2
From http://fbinfer.com/support
The maximum number of files a program can simultaneously hold open is a bit low on MacOs. You can increase the limit by running these commands for example:
sysctl -w kern.maxfiles=20480
sysctl -w kern.maxfilesperproc=22480
ulimit -S -n 2048
So, Basically I've synced all the Cm-11.0 sources to my PC. Now I had move the sources to another PC. So i thought that copying just '.repo' folder and running repo sync -l to another PC will do the trick.
Now I have .repo folder and when I run repo sync it gives the following error
dkbhadeshiya#CrayJaguar:~/android/cm11$ repo sync -j1
Fetching project CyanogenMod/android_frameworks_webview
Traceback (most recent call last):
File "/home/dkbhadeshiya/android/cm11/.repo/repo/main.py", line 500, in <module>
_Main(sys.argv[1:])
File "/home/dkbhadeshiya/android/cm11/.repo/repo/main.py", line 476, in _Main
result = repo._Run(argv) or 0
File "/home/dkbhadeshiya/android/cm11/.repo/repo/main.py", line 155, in _Run
result = cmd.Execute(copts, cargs)
File "/home/dkbhadeshiya/android/cm11/.repo/repo/subcmds/sync.py", line 635, in Execute
fetched = self._Fetch(to_fetch, opt)
File "/home/dkbhadeshiya/android/cm11/.repo/repo/subcmds/sync.py", line 339, in _Fetch
self._FetchProjectList(**kwargs)
File "/home/dkbhadeshiya/android/cm11/.repo/repo/subcmds/sync.py", line 234, in _FetchProjectList
success = self._FetchHelper(opt, project, *args, **kwargs)
File "/home/dkbhadeshiya/android/cm11/.repo/repo/subcmds/sync.py", line 275, in _FetchHelper
no_tags=opt.no_tags, archive=self.manifest.IsArchive)
File "/home/dkbhadeshiya/android/cm11/.repo/repo/project.py", line 1076, in Sync_NetworkHalf
self._UpdateHooks()
File "/home/dkbhadeshiya/android/cm11/.repo/repo/project.py", line 2098, in _UpdateHooks
self._InitHooks()
File "/home/dkbhadeshiya/android/cm11/.repo/repo/project.py", line 2126, in _InitHooks
os.symlink(os.path.relpath(stock_hook, os.path.dirname(dst)), dst)
OSError: [Errno 20] Not a directory
and when I run Repo Sync -l It gives following error:
dkbhadeshiya#CrayJaguar:~/android/cm11$ repo sync -l
error: in `sync -l`: revision refs/heads/cm-11.0 in CyanogenMod/android_abi_cpp not found
Any Idea how to solve this??
Maybe you can try this command before you sync.
repo forall -vc "git reset --hard"