Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cztomczak opened this issue Feb 27, 2017 · 1 comment
Closed

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

cztomczak opened this issue Feb 27, 2017 · 1 comment
Labels
Milestone

Comments

@cztomczak
Copy link
Owner

cztomczak commented Feb 27, 2017

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.

@cztomczak cztomczak added this to the v56 milestone Feb 27, 2017
cztomczak added a commit that referenced this issue Feb 28, 2017
hello_world.py example runs fine on Mac!

Add "Location of CEF framework in Mac apps" to Knowledge Base.

Set ApplicationSettings.framework_dir_path when not set
during a call to cef.Initialize(). Also set resources_dir_path.

Fix rpath to "@loader_path/" so that libraries load correctly.

Other fixes in build tools and in docs.
@cztomczak
Copy link
Owner Author

Fixed in da6bbed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant