Open cztomczak opened 8 years ago
Same error happens with CEF 51 and the message is more descriptive this time. It's definitely an issue with the icudtl.dat file. Reported with details on the CEF Forum:
Temporary fix for the issue:
sudo cp icudtl.dat /usr/bin
sudo cp natives_blob.bin /usr/bin
The pygtk_.py example runs fine with this fix.
Related code in Chromium that causes issues:
bool path_ok = PathService::Get(DIR_EXE, &data_path);
PathService::Get(base::DIR_EXE, &data_path);
- to load "natives_blob.bin" which also causes issuePathService keys like DIR_EXE, DIR_MODULE etc. can be overriden using PathService::Override, see base/path_service.h: https://cs.chromium.org/chromium/src/base/path_service.h?cl=GROK&gsn=PathService&l=47
CEF already exposes CefGetPath() function to fetch paths using PathKey: https://bitbucket.org/chromiumembedded/cef/src/05ee60b7b4704f5e763b65d2a1fbea83815b34ac/libcef/browser/path_util_impl.cc?at=master
Here are the values for some of the path keys when running cefpython:
[CEF Python] ---- PK_DIR_EXE: /usr/bin
[CEF Python] ---- PK_DIR_MODULE: /usr/bin
[CEF Python] ---- PK_DIR_CURRENT: /home/czarek/github/cefpython/src/linux/binaries_64bit
[CEF Python] ---- PK_FILE_EXE: /usr/bin/python2.7
[CEF Python] ---- PK_FILE_MODULE: /usr/bin/python2.7
When changing DIR_EXE we should probably also change DIR_MODULE to the same value. The question is what will be implications of overriding these paths. What would be better? a) to create a patch for CEF to expose a new function CefOverridePath in path_util.impl.cc and then override DIR_EXE and DIR_MODULE paths before calling CefInitialize b) or maybe just modify those two lines of code in Chromium and replace DIR_EXE with DIR_CURRENT
Note also the warning in path_service.h > Override:
// WARNING: Consumers of PathService::Get may expect paths to be constant
// over the lifetime of the app, so this method should be used with caution.
So when overriding path it should be done as early as possible.
In "chrome/test/base/chrome_test_suite.cc" there is already a case for overrriding DIR_EXE and DIR_MODULE, so it should work fine:
if (!browser_dir_.empty()) {
PathService::Override(base::DIR_EXE, browser_dir_);
PathService::Override(base::DIR_MODULE, browser_dir_);
}
Fixed in commit 2e9928d72f107427db9d336b9320dbe6547503b5. New issue231 patch added to patches/.
Merge issue231 patch into upstream to allow for using Spotify binaries with cefpython. Pull request was already created some time ago with a reworked version of the patch that was to be accepted, but there was an issue with unit tests. The patch required another rework. See upstream Pull request #66 and upstream Issue #1936.
Alternative pull request for CEF on GitHub: https://github.com/chromiumembedded/cef/pull/4
Fixed in upstream in commit https://bitbucket.org/chromiumembedded/cef/commits/602c163 - needs testing.
Another related commit in upstream: https://bitbucket.org/chromiumembedded/cef/commits/942899d2fc3d
Both required commits are available in the latest 3945 branch (v79). This will allow to use Spotify binaries with cefpython on Linux.
Hi, I'm actually using CEF with C++ and I found this due to my own build error I'm having.
How did you end up solving this?
Tried running pygtk_.py and wxpython.py both fail. Stack trace:
cefclient and cefsimple do run fine however. Looks like it might be an issue with CHECK failing because it can't find the "icudtl.dat" resource. If file "icudtl.dat" is removed then cefclient also fails with the same stack trace.
cefpython logs:
New error message, more descriptive in CEF 51: