Skip to content

Mac error: icudtl.dat not found in bundle #304

Closed
@cztomczak

Description

@cztomczak

This error occurs during a call to CefInitialize(). Logs below:

[CEF Python] CefInitialize()
[CEF Python] App_OnBeforeCommandLineProcessing_BrowserProcess()
[CEF Python] Command line string for the browser process:  --browser-subprocess-path=/Library/Python/2.7/site-packages/cefpython3/subprocess --no-sandbox --lang=en-US --log-file=/Users/czarek/Library/Logs/Python_debug.log --log-severity=warning --resources-dir-path=/Library/Python/2.7/site-packages/cefpython3/Resources --remote-debugging-port=63542
[0227/141002:ERROR:icu_util.cc(137)] icudtl.dat not found in bundle
[0227/141002:ERROR:icu_util.cc(173)] Invalid file descriptor to ICU data received.

Changing "resources_dir_path" setting didn't fix this error. The issue is in Chromium which calls NSBundle.pathForResource_ofType for the mainBundle. And in ours case the main bundle is Python bundle. To fix this it is required to call base::mac::SetOverrideFrameworkBundlePath. In CEF branches 2924+ this fix already landed - see CEF Issue 1532 and commit da2209a. New option was added CefSettings.framework_dir_path:

  ///
  // The path to the CEF framework directory on macOS. If this value is empty
  // then the framework must exist at "Contents/Frameworks/Chromium Embedded
  // Framework.framework" in the top-level app bundle. Also configurable using
  // the "framework-dir-path" command-line switch.
  ///
  cef_string_t framework_dir_path;

CEF Python needs to set this setting (if not set) to "package_dir/CEF.framework" directory during a call to cef.Initialize(). Fix in upstream is available in v56+ so need to update to v56 first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions