Error while fetch --nohooks --no-history chromium in Chromium build ubuntu

Viewed 1342

I'm trying to build chromium on ubuntu, I followed all instruction from official chromium website but I'm facing some error after

fetch --nohooks --no-history chromium

as I'm new cant find a way to solve this issue. and I tried build it multiple time but same issue apparing..

ERROR:

1:28:42] Still working on:
[1:28:42]   src/third_party/icu
Syncing projects:  98% (55/56) src/third_party/icu                  
src/third_party/libavif/src (ERROR)
----------------------------------------
[0:32:54] Started.
[0:32:54] 

________ running 'git init --bare /home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_gittmp_srcyd5hsx90' in '/home/mypc/Desktop/code/chromium'

[0:32:54] Initialized empty Git repository in /home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_gittmp_srcyd5hsx90/
[0:32:54] 
________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/github.com/AOMediaCodec/libavif.git --template=/home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_gittmp_srcyd5hsx90 /home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_src_9qd9xci0' in '/home/mypc/Desktop/code/chromium'

[0:32:54] Cloning into '/home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_src_9qd9xci0'...
[0:32:56] error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
[0:32:56] fatal: the remote end hung up unexpectedly
[0:32:57] 
________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/github.com/AOMediaCodec/libavif.git --template=/home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_gittmp_srcyd5hsx90 /home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_src_9qd9xci0' in '/home/mypc/Desktop/code/chromium' attempt 2 / 4

[0:32:57] Cloning into '/home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_src_9qd9xci0'...
[0:32:57] error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
[0:32:57] fatal: the remote end hung up unexpectedly
[0:32:58] 
________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/github.com/AOMediaCodec/libavif.git --template=/home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_gittmp_srcyd5hsx90 /home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_src_9qd9xci0' in '/home/mypc/Desktop/code/chromium' attempt 3 / 4

[0:32:58] Cloning into '/home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_src_9qd9xci0'...
[0:32:59] error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
[0:32:59] fatal: the remote end hung up unexpectedly
[0:33:01] 
________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/github.com/AOMediaCodec/libavif.git --template=/home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_gittmp_srcyd5hsx90 /home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_src_9qd9xci0' in '/home/mypc/Desktop/code/chromium' attempt 4 / 4

[0:33:01] Cloning into '/home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_src_9qd9xci0'...
[0:33:01] error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
[0:33:01] fatal: the remote end hung up unexpectedly
Traceback (most recent call last):
  File "/home/mypc/Desktop/code/depot_tools/gclient_scm.py", line 1048, in _Clone
    self._Run(clone_cmd, options, cwd=self._root_dir, retry=True,
  File "/home/mypc/Desktop/code/depot_tools/gclient_scm.py", line 1388, in _Run
    gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
  File "/home/mypc/Desktop/code/depot_tools/gclient_utils.py", line 674, in CheckCallAndFilter
    raise subprocess2.CalledProcessError(
subprocess2.CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/github.com/AOMediaCodec/libavif.git --template=/home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_gittmp_srcyd5hsx90 /home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_src_9qd9xci0' returned non-zero exit status 128 in /home/mypc/Desktop/code/chromium
[0:33:05] _____ Conflicting directory found in /home/mypc/Desktop/code/chromium/src/third_party/libavif/src. Moving to /home/mypc/Desktop/code/chromium/_bad_scm/src/third_party/libavif/srco15x1xp5.
----------------------------------------


Warnings:
Conflicting directory /home/mypc/Desktop/code/chromium/src/third_party/libavif/src moved to /home/mypc/Desktop/code/chromium/_bad_scm/src/third_party/libavif/srco15x1xp5.
Traceback (most recent call last):
  File "/home/mypc/Desktop/code/depot_tools/gclient_scm.py", line 548, in update
    self._Clone(revision, url, options)
  File "/home/mypc/Desktop/code/depot_tools/gclient_scm.py", line 1048, in _Clone
    self._Run(clone_cmd, options, cwd=self._root_dir, retry=True,
  File "/home/mypc/Desktop/code/depot_tools/gclient_scm.py", line 1388, in _Run
    gclient_utils.CheckCallAndFilter(cmd, env=env, **kwargs)
  File "/home/mypc/Desktop/code/depot_tools/gclient_utils.py", line 674, in CheckCallAndFilter
    raise subprocess2.CalledProcessError(
subprocess2.CalledProcessError: Command 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/external/github.com/AOMediaCodec/libavif.git --template=/home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_gittmp_srcyd5hsx90 /home/mypc/Desktop/code/chromium/src/third_party/libavif/_gclient_src_9qd9xci0' returned non-zero exit status 128 in /home/mypc/Desktop/code/chromium

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mypc/.vpython-root/6b08bc/lib/python3.8/shutil.py", line 791, in move
    os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/home/mypc/Desktop/code/chromium/src/third_party/libavif/src' -> '/home/mypc/Desktop/code/chromium/_bad_scm/src/third_party/libavif/srco15x1xp5/src'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mypc/Desktop/code/depot_tools/metrics.py", line 291, in print_notice_and_exit
    yield
  File "/home/mypc/Desktop/code/depot_tools/gclient.py", line 3200, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/mypc/Desktop/code/depot_tools/gclient.py", line 3186, in main
    return dispatcher.execute(OptionParser(), argv)
  File "/home/mypc/Desktop/code/depot_tools/subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "/home/mypc/Desktop/code/depot_tools/gclient.py", line 2740, in CMDsync
    ret = client.RunOnDeps('update', args)
  File "/home/mypc/Desktop/code/depot_tools/gclient.py", line 1779, in RunOnDeps
    work_queue.flush(revision_overrides, command, args, options=self._options,
  File "/home/mypc/Desktop/code/depot_tools/gclient_utils.py", line 969, in flush
    reraise(e[0], e[1], e[2])
  File "/home/mypc/Desktop/code/depot_tools/gclient_utils.py", line 67, in reraise
    raise value
  File "/home/mypc/Desktop/code/depot_tools/gclient_utils.py", line 1046, in run
    self.item.run(*self.args, **self.kwargs)
  File "/home/mypc/Desktop/code/depot_tools/gclient.py", line 925, in run
    self._got_revision = self._used_scm.RunCommand(command, options, args,
  File "/home/mypc/Desktop/code/depot_tools/gclient_scm.py", line 132, in RunCommand
    return getattr(self, command)(options, args, file_list)
  File "/home/mypc/Desktop/code/depot_tools/gclient_scm.py", line 550, in update
    self._DeleteOrMove(options.force)
  File "/home/mypc/Desktop/code/depot_tools/gclient_scm.py", line 207, in _DeleteOrMove
    shutil.move(self.checkout_path, dest_path)
  File "/home/mypc/.vpython-root/6b08bc/lib/python3.8/shutil.py", line 811, in move
    copy_function(src, real_dst)
  File "/home/mypc/.vpython-root/6b08bc/lib/python3.8/shutil.py", line 435, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/home/mypc/.vpython-root/6b08bc/lib/python3.8/shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/home/mypc/Desktop/code/chromium/src/third_party/libavif/src'

Subprocess failed with return code 1.

PS. I'm also new in stackoverflow

4 Answers

To run the tool (which is a bash script), you can try specifying the path(absolute or relative) to the fetch file. ie if you are depot_tools, you may try ./fetch --nohooks --no-history chromium

See if it helps

Issues when fetching Chromium with errors like

error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400 fatal: the remote end hung up unexpectedly

are due to the Chromium repository having incorrect metadata. To resolve this, file a bug in https://crbug.com/new so someone from the Chromium team can fix the repository. Unfortunately, there isn't anything you can do to immediately resolve the issue on your end. The error message is misleading and not helpful, so it may make you think it's user error, but it isn't.

This error, with different dependencies, has occurred in the past: https://bugs.chromium.org/p/chromium/issues/detail?id=1226496 https://bugs.chromium.org/p/chromium/issues/detail?id=1313310

You can either use: fetch --nohooks chromium which will give you the full install.

Or: fetch --no-history chromium
which will be the shorter install you're looking for.

I'm not sure what the difference is, I'm quite new myself however I think this is what you're looking for. You're not supposed to combine the two conditions, they work independently I'm pretty sure.

Please correct me if I'm wrong, Best of Luck Max

(2021.06.02) I use: fetch --nohooks --no-history chromium, get a same error.

I try:
fetch --nohooks chromium, work done.

what happened? I don't know.

Related