[SOLVED]NoUsableRevError occurs when syncing projects

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

[SOLVED]NoUsableRevError occurs when syncing projects

Postby zgshen » Thu Feb 18, 2021 11:33 am

Code: Select all
1>Syncing projects:   0% ( 0/ 2)
[0:02:31] Still working on:
[0:02:31]   src

[0:02:31] Still working on:
[0:02:31]   src
Syncing projects:  90% (27/30) src/third_party/angle

src/buildtools/clang_format/script (ERROR)
----------------------------------------
[0:02:31] Started.
----------------------------------------
Traceback (most recent call last):
  File "E:\buildcef\depot_tools\gclient_scm.py", line 878, in revert
    deps_revision = self.GetUsableRev(deps_revision, options)
  File "E:\buildcef\depot_tools\gclient_scm.py", line 938, in GetUsableRev
    raise NoUsableRevError(
gclient_scm.NoUsableRevError: 5> Hash 99803d74e35962f63a775f29477882afd4d57d94 does not appear to be a valid hash in this repo.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\buildcef\depot_tools\metrics.py", line 267, in print_notice_and_exit
    yield
  File "E:\buildcef\depot_tools\gclient.py", line 3195, in <module>
    sys.exit(main(sys.argv[1:]))
  File "E:\buildcef\depot_tools\gclient.py", line 3181, in main
    return dispatcher.execute(OptionParser(), argv)
  File "E:\buildcef\depot_tools\subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "E:\buildcef\depot_tools\gclient.py", line 2817, in CMDrevert
    return client.RunOnDeps('revert', args)
  File "E:\buildcef\depot_tools\gclient.py", line 1779, in RunOnDeps
    work_queue.flush(revision_overrides, command, args, options=self._options,
  File "E:\buildcef\depot_tools\gclient_utils.py", line 965, in flush
    reraise(e[0], e[1], e[2])
  File "E:\buildcef\depot_tools\gclient_utils.py", line 67, in reraise
    raise value
  File "E:\buildcef\depot_tools\gclient_utils.py", line 1042, in run
    self.item.run(*self.args, **self.kwargs)
  File "E:\buildcef\depot_tools\gclient.py", line 925, in run
    self._got_revision = self._used_scm.RunCommand(command, options, args,
  File "E:\buildcef\depot_tools\gclient_scm.py", line 132, in RunCommand
    return getattr(self, command)(options, args, file_list)
  File "E:\buildcef\depot_tools\gclient_scm.py", line 884, in revert
    e.message)
AttributeError: 'NoUsableRevError' object has no attribute 'message'
Traceback (most recent call last):
  File "..\automate\automate-git.py", line 1367, in <module>
    run("gclient revert --nohooks", chromium_dir, depot_tools_dir)
  File "..\automate\automate-git.py", line 70, in run
    args, cwd=working_dir, env=env, shell=(sys.platform == 'win32'))
  File "C:\Python27\lib\subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gclient', 'revert', '--nohooks']' returned non-zero exit status 1

Last edited by zgshen on Sat Feb 20, 2021 9:17 pm, edited 1 time in total.
zgshen
Techie
 
Posts: 25
Joined: Sun Jun 04, 2017 9:35 pm

Re: NoUsableRevError occurs when syncing projects

Postby magreenblatt » Thu Feb 18, 2021 1:57 pm

What branch are you trying to build? Have you tried a clean checkout of Chromium?

If it continues to fail you can run the steps manually (get [CHROMIUM_VERSION] from CHROMIUM_BUILD_COMPATIBILITY.txt).

Code: Select all
cd path\to\chromium\src
git checkout refs/tags/[CHROMIUM_VERSION]
gclient sync --with_branch_heads --nohooks
cd cef
tools\patch.bat
cd ..
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
gclient runhooks
cd cef
cef_create_projects.bat
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: NoUsableRevError occurs when syncing projects

Postby zgshen » Thu Feb 18, 2021 10:51 pm

magreenblatt wrote:What branch are you trying to build? Have you tried a clean checkout of Chromium?

If it continues to fail you can run the steps manually (get [CHROMIUM_VERSION] from CHROMIUM_BUILD_COMPATIBILITY.txt).

Code: Select all
cd path\to\chromium\src
git checkout refs/tags/[CHROMIUM_VERSION]
gclient sync --with_branch_heads --nohooks
cd cef
tools\patch.bat
cd ..
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
gclient runhooks
cd cef
cef_create_projects.bat


I'm building branch 4240. Here is my update.bat:
Code: Select all
set CEF_USE_GN=1
set GN_DEFINES=proprietary_codecs=true enable_hevc_demuxing=true enable_ac3_eac3_audio_demuxing=true ffmpeg_branding=Chrome is_official_build=true
set GN_ARGUMENTS=--ide=vs2019 --sln=cef --filters=//cef/*
python ..\automate\automate-git.py --download-dir=E:\buildcef\chromium_git --depot-tools-dir=E:\buildcef\depot_tools --minimal-distrib --client-distrib --branch=4240 --no-debug-build --x64-build --force-update


I follow the manual steps, and fails with following errors:
Code: Select all

Apply chrome_browser_background_mode_1100085.patch in E:\buildcef\chromium_git
... patch directory is not a repository root.
-------------------------------------------------------------------------------
!!!! ERROR: This patch failed to apply. Your build will not be correct.
-------------------------------------------------------------------------------

Apply base_string_piece_1049498.patch in E:\buildcef\chromium_git
... patch directory is not a repository root.
-------------------------------------------------------------------------------
!!!! ERROR: This patch failed to apply. Your build will not be correct.
-------------------------------------------------------------------------------

68 patches total (0 applied, 0 skipped, 68 failed)

-------------------------------------------------------------------------------
!!!! ERROR: 68 patches failed to apply. Your build will not be correct.
zgshen
Techie
 
Posts: 25
Joined: Sun Jun 04, 2017 9:35 pm

Re: NoUsableRevError occurs when syncing projects

Postby magreenblatt » Fri Feb 19, 2021 11:44 am

You need to use the "chromium_git\chromium\src\cef" directory path. Copy the folder from "chromium_git\cef" if necessary.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: NoUsableRevError occurs when syncing projects

Postby zgshen » Sat Feb 20, 2021 6:17 am

It works.Thank you very much.
zgshen
Techie
 
Posts: 25
Joined: Sun Jun 04, 2017 9:35 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 62 guests