Android | [FATAL:resource_bundle.cc(1122)] | crash after initializing a ibrary inside SplitChromeApplication->OnCreate()

88 views
Skip to first unread message

Deepak Kumar

unread,
Apr 14, 2022, 2:15:03 PM4/14/22
to Chromium-dev
Hello Everyone,
I am working on a chromium based Android browser and usring 99.0.4844.88 tag of chromium as a base.
Recently I had a requirement of adding an Ad Library to browser and show ads.
As per document of ad library we need to intialize SDK inside Application class, and did the same, initialized inside SplitChromeApplication->onCreate().. Like below

 @Override
    public void onCreate() {
        finishPreload(CHROME_SPLIT_NAME);
        super.onCreate();
        Runa.init(this);
    }

But after this implementation the app is crashing and giving below fatal error
-----------------------------------------------------------------------------------------------
[FATAL:resource_bundle.cc(1122)] Check failed: !data.empty(). Unable to find resource: 465. If this happens in a browser test running on Windows, it may be that dead-code elimination stripped out the code that uses the resource, causing the resource to be stripped out because the resource is not used by chrome.dll. See https://crbug.com/1181150.
--------------------------------------------------------------------------------------------------

But when I tried to intialize same inside NewTabPage, it didin't crashed but the webpages stopped rendering and giving "Aw Snap" error. Also this lbrary uses webview internally to show ads.

The same library works perfectly with traditional Android studio projects.

Does anyone have any idea how to deal with the situation. It will great help if anyone suggest me some way forward to deal with it, currently I have no way to deal with the situation.

Thanks,
Deepak

Torne (Richard Coles)

unread,
Apr 14, 2022, 3:01:16 PM4/14/22
to kr.dee...@gmail.com, Chromium-dev
WebView does not support being loaded into a process that already contains the Chromium code - this causes problems with resources/assets that have the same names in both, as WebView has to add its own assets to the calling app's asset path for things to work correctly.

For this to not cause problems you would need to rename all resources/assets in your version of Chromium that might clash with those defined by WebView; at minimum the various .pak files and other Android assets that get bundled into your APK. There may be other things that conflict as well, but if so I don't know what they are, and this also may change over time.

--
--
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/73feea0b-327c-43b5-97a1-624a7862baf2n%40chromium.org.

Deepak Kumar

unread,
Apr 14, 2022, 3:15:29 PM4/14/22
to Torne (Richard Coles), Chromium-dev
Thanks for the response Torne,
Will definitely try your suggestion.
Reply all
Reply to author
Forward
0 new messages