Hash collision error when compiling Chromium version 104.0.5112.81

100 views
Skip to first unread message

Asesh Shrestha

unread,
Aug 5, 2022, 5:56:13 AM8/5/22
to Chromium-dev
So I just synced our Chromium fork with Chromium 104.0.5112.81. When compiling debug version, am getting this hash collision error:

D:\workspace\workstream-browser\src>ninja -C out\debug chrome
ninja: Entering directory `out\debug'
[19/31600] ACTION //chrome/browser/metrics/variations:chrome_ui_string_overrider_factory_gen_sources(//build/toolchain/win:win_clang_x64)
FAILED: gen/chrome/browser/metrics/variations/ui_string_overrider_factory.h gen/chrome/browser/metrics/variations/ui_string_overrider_factory.cc
D:/workspace/depot_tools/bootstrap-2@3_8_10_chromium_23_bin/python3/bin/python3.exe ../../components/variations/service/generate_ui_string_overrider.py -Nchrome_variations -ogen -Hchrome/browser/metrics/variations/ui_string_overrider_factory.h -Schrome/browser/metrics/variations/ui_string_overrider_factory.cc gen/chrome/grit/chromium_strings.h gen/chrome/grit/generated_resources.h gen/chrome/grit/google_chrome_strings.h gen/components/strings/grit/components_chromium_strings.h gen/components/strings/grit/components_google_chrome_strings.h gen/components/strings/grit/components_strings.h
Traceback (most recent call last):
  File "../../components/variations/service/generate_ui_string_overrider.py", line 307, in <module>
    sys.exit(main())
  File "../../components/variations/service/generate_ui_string_overrider.py", line 293, in main
    source_file_content = _GenerateSourceFileContent(
  File "../../components/variations/service/generate_ui_string_overrider.py", line 181, in _GenerateSourceFileContent
    raise HashCollisionError(error_message)
__main__.HashCollisionError:
The following names, sorted by hash value, had hash collisions (One possible cause: strings appear in different orders for Chrome and Chromium):
hash: 37524341, name: IDS_BLUETOOTH_DEVICE_CHOOSER_AUTHORIZE_BLUETOOTH
hash: 37524341, name: IDS_BLUETOOTH_DEVICE_CHOOSER_AUTHORIZE_BLUETOOTH
hash: 69582996, name: IDS_USER_MANAGER_TUTORIAL_SLIDE_YOUR_CHROME_TEXT
hash: 69582996, name: IDS_USER_MANAGER_TUTORIAL_SLIDE_YOUR_CHROME_TEXT
hash: 79457408, name: IDS_CRITICAL_NOTIFICATION_TITLE
hash: 79457408, name: IDS_CRITICAL_NOTIFICATION_TITLE
hash: 171202748, name: IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_BOTTOM_SUMMARY
hash: 171202748, name: IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_BOTTOM_SUMMARY
hash: 214121129, name: IDS_CHROME_CLEANUP_PROMPT_EXPLANATION
hash: 214121129, name: IDS_CHROME_CLEANUP_PROMPT_EXPLANATION
hash: 270654360, name: IDS_INBOUND_MDNS_RULE_NAME_CANARY
hash: 270654360, name: IDS_INBOUND_MDNS_RULE_NAME_CANARY
hash: 294839169, name: IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_LEARN_MORE_SECTION_1_BULLET_POINT_1
hash: 294839169, name: IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_LEARN_MORE_SECTION_1_BULLET_POINT_1
hash: 314687769, name: IDS_CONTENT_CONTEXT_ACCESSIBILITY_LABELS_BUBBLE_TEXT_ONCE
hash: 314687769, name: IDS_CONTENT_CONTEXT_ACCESSIBILITY_LABELS_BUBBLE_TEXT_ONCE
hash: 319649951, name: IDS_RUN_RECOVERY
hash: 319649951, name: IDS_RUN_RECOVERY
hash: 352041846, name: IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_LEARN_MORE_SECTION_2_BULLET_POINT_2
hash: 352041846, name: IDS_PRIVACY_SANDBOX_DIALOG_CONSENT_LEARN_MORE_SECTION_2_BULLET_POINT_2
hash: 467740844, name: IDS_USER_MANAGER_TUTORIAL_SLIDE_INTRO_TITLE
hash: 467740844, name: IDS_USER_MANAGER_TUTORIAL_SLIDE_INTRO_TITLE
hash: 552489421, name: IDS_PROFILE_PICKER_MAIN_VIEW_TITLE_V2
hash: 552489421, name: IDS_PROFILE_PICKER_MAIN_VIEW_TITLE_V2
hash: 562495006, name: IDS_RELAUNCH_REQUIRED_TITLE_SECONDS
hash: 562495006, name: IDS_RELAUNCH_REQUIRED_TITLE_SECONDS
hash: 609764378, name: IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY
hash: 609764378, name: IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY
...

The list is very long, so I have just posted some. The reason its happening is because those names are by default defined in both 

\src\chrome\app\google_chrome_strings.grd and \src\chrome\app\chromium_strings.grd

Never came across this issue before. I have tried to modify grit files etc but keep getting some other error messages later related to this issue. So may I know how can I tackle this issue?

Thanks

PhistucK

unread,
Aug 5, 2022, 8:57:18 AM8/5/22
to Asesh Shrestha, Chromium-dev
> One possible cause: strings appear in different orders for Chrome and Chromium
Have you verified that the orders match?

(The message makes it sound like it is fine to have Chrome and Chromium "duplicate" string IDs, but the order of the strings in both of them must match)

PhistucK


”This email and any files transmitted with it may be confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender.”

--
--
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/cda8ff2c-7333-4a39-b84e-a3a3444eaea7n%40chromium.org.

Asesh Shrestha

unread,
Aug 5, 2022, 11:31:06 AM8/5/22
to Chromium-dev, PhistucK, Chromium-dev, Asesh Shrestha
May I know how can I verify if the orders match?
Thanks

PhistucK

unread,
Aug 5, 2022, 1:08:01 PM8/5/22
to Asesh Shrestha, Chromium-dev
I guess compare the order of elements in the GRD files...

PhistucK

Asesh Shrestha

unread,
Aug 8, 2022, 6:46:04 AM8/8/22
to Chromium-dev, PhistucK, Chromium-dev, Asesh Shrestha
Yes, you are right. Thank you very much :)
Reply all
Reply to author
Forward
0 new messages