gclient sync error AttributeError: 'NoneType' object has no attribute 'endswith'

703 views
Skip to first unread message

Volodymyr Shalashenko

unread,
Sep 10, 2024, 5:01:18 AMSep 10
to Chromium-dev
Hi everyone! Starting of today, September 10th 2024, glient sync fails with the following error:
Syncing projects:   1% ( 5/368) src/buildtools/linux64:gn/gn/linux-${arch}      
src/buildtools/clang_format/script (ERROR)
----------------------------------------
[0:00:43] Started.
----------------------------------------
Traceback (most recent call last):
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/metrics.py", line 302, in print_notice_and_exit
    yield
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/gclient.py", line 4638, in <module>
    sys.exit(main(sys.argv[1:]))
             ^^^^^^^^^^^^^^^^^^
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/gclient.py", line 4624, in main
    return dispatcher.execute(OptionParser(), argv)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/subcommand.py", line 254, in execute
    return command(parser, args[1:])
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/gclient.py", line 3977, in CMDsync
    ret = client.RunOnDeps('update', args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/gclient.py", line 2436, in RunOnDeps
    work_queue.flush(revision_overrides,
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/gclient_utils.py", line 1026, in flush
    reraise(e[0], e[1], e[2])
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/gclient_utils.py", line 53, in reraise
    raise value
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/gclient_utils.py", line 1105, in run
    self.item.run(*self.args, **self.kwargs)
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/gclient.py", line 1251, in run
    self._got_revision = self._used_scm.RunCommand(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/gclient_scm.py", line 137, in RunCommand
    return getattr(self, command)(options, args, file_list)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/gclient_scm.py", line 664, in wrapper
    return_val = f(*args)
                 ^^^^^^^^
  File "/mnt/HDD/webprog26/projects/depot_tools/depot_tools/gclient_scm.py", line 866, in update
    strp_current_url = current_url[:-4] if current_url.endswith(
                                           ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'endswith'

I haven't changed anything on my machine. Has anyone faced such an issue?

Dirk Pranke

unread,
Sep 10, 2024, 3:42:27 PMSep 10
to webp...@gmail.com, Chromium-dev
It looks like you'd probably get that crash if you didn't have `remote.origin.url` set in your Git config, so I would check that. From a quick look I just did, it doesn't look like there's a recent change in depot_tools that would break something.

-- Dirk

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/5314b604-89af-4ffb-878e-451f8b16412dn%40chromium.org.

Volodymyr Shalashenko

unread,
Sep 10, 2024, 4:48:09 PMSep 10
to Chromium-dev, Dirk Pranke, Chromium-dev, webp...@gmail.com
As a temporary solution I replaced depot_tools I had with this Github fork last updated a week ago and it works fine so it might be that the reason is not a missing `remote.origin.url `

Dirk Pranke

unread,
Sep 10, 2024, 4:53:12 PMSep 10
to Volodymyr Shalashenko, Chromium-dev
If my suggestion didn't fix things I suggest you file a bug and we can try to dig into it. You could try adding a ".disable_auto_update" file to the depot_tools directory and bisecting changes w/ git to see if you can narrow done something that broke you.

-- Dirk

Bartosz Chmura

unread,
Sep 11, 2024, 8:19:40 AMSep 11
to Chromium-dev, Dirk Pranke, Chromium-dev, Volodymyr Shalashenko
Today I tried to update Chromium repo and also got the same error. 

git config --get remote.origin.url
ssh://xxx.yyy.com:1234/chromium

Stephen White

unread,
Sep 11, 2024, 10:24:38 AMSep 11
to chm...@gmail.com, Chromium-dev, Dirk Pranke, Volodymyr Shalashenko
I got that error recently on a personal Linux box, and fixed it by upgrading git to 2.46.0 (previously, it was 2.20something). My guess is that depot_tools began using a feature only available in newer versions.

Stephen

Zhao Jiazhong

unread,
Sep 11, 2024, 12:51:15 PMSep 11
to Chromium-dev, Dirk Pranke, Chromium-dev, Volodymyr Shalashenko
This issue seems to be introduced by Avoid silently overwriting diff.ignoreSubmodules config, which added `--show-scope` option to `git config --list -z` command, but the option is supported since git v2.26, and the command would fail with older git.

Bartosz Chmura

unread,
Sep 12, 2024, 8:47:59 AMSep 12
to Chromium-dev, Zhao Jiazhong, Dirk Pranke, Chromium-dev, Volodymyr Shalashenko
I can confirm that upgrading git from 2.25.1 to 2.46.0 fixes a problem.
Reply all
Reply to author
Forward
0 new messages