Repository navigation
Open
Description
Hi, i have this following kotlin code
sRuntime.getWebExtensionController().ensureBuiltIn(
EXTENSION_LOCATION,
"uBlock0@raymondhill.net"
).accept(
{ extension ->
// Use Log to print information about the installed extension
Log.i("MessageDelegate", "Extension installed: " + extension)
},
{ e ->
// Handle error if registering the WebExtension fails
Log.e("MessageDelegate", "Error registering WebExtension", e)
}
)and this location.
But this doesn't register and the log has some weird things in it:
E/GeckoConsole( 5168): _g
I/GeckoConsole( 5168): 1716030203919 addons.webextension.uBlock0@raymondhill.net WARN Loading extension 'uBlock0@raymondhill.net': Reading manifest: Warning processing permissions: Error processing permissions.2: Value "menus" must either: must either [must either [must either [be one of ["idle"], be one of ["activeTab"], be one of ["cookies"], be one of ["scripting"], or be one of ["webRequest", "webRequestAuthProvider", "webRequestBlocking", "webRequestFilterResponse", "webRequestFilterResponse.serviceWorkerScript"]], must either [be one of ["mozillaAddons"], be one of ["geckoViewAddons", "nativeMessagingFromContent"], be one of ["activityLog"], be one of ["networkStatus"], or be one of ["telemetry"]], be one of ["alarms", "storage", "unlimitedStorage"], be one of ["contextualIdentities"], be one of ["declarativeNetRequestWithHostAccess"], be one of ["dns"], or be one of ["theme"]], must either [must either [be one of ["idle"], be one of ["activeTab"], be one of ["cookies"], be one of ["scripting"], or be one of ["webRequest", "
I/GeckoConsole( 5168): 1716030203920 addons.webextension.uBlock0@raymondhill.net WARN Loading extension 'uBlock0@raymondhill.net': Reading manifest: Warning processing commands: An unexpected property was found in the WebExtension manifest.
E/MessageDelegate( 5168): Error registering WebExtension
E/MessageDelegate( 5168): java.lang.Exception: Unexpected error: Error: Extension is invalid
E/MessageDelegate( 5168): at org.mozilla.geckoview.WebExtensionController$$ExternalSyntheticLambda15.onException(Unknown Source:0)
E/MessageDelegate( 5168): at org.mozilla.geckoview.GeckoResult.lambda$map$1(GeckoResult.java:419)
E/MessageDelegate( 5168): at org.mozilla.geckoview.GeckoResult$$ExternalSyntheticLambda9.onException(Unknown Source:2)
E/MessageDelegate( 5168): at org.mozilla.geckoview.GeckoResult.lambda$thenInternal$6(GeckoResult.java:593)
E/MessageDelegate( 5168): at org.mozilla.geckoview.GeckoResult.$r8$lambda$nsAzyhhKgAo0Ha3SEAUSdsKADo8(Unknown Source:0)
E/MessageDelegate( 5168): at org.mozilla.geckoview.GeckoResult$$ExternalSyntheticLambda5.run(Unknown Source:8)
E/MessageDelegate( 5168): at org.mozilla.geckoview.GeckoResult.lambda$dispatchLocked$7(GeckoResult.java:792)
E/MessageDelegate( 5168): at org.mozilla.geckoview.GeckoResult$$ExternalSyntheticLambda1.run(Unknown Source:2)
E/MessageDelegate( 5168): at android.os.Handler.handleCallback(Handler.java:958)
E/MessageDelegate( 5168): at android.os.Handler.dispatchMessage(Handler.java:99)
E/MessageDelegate( 5168): at android.os.Looper.loopOnce(Looper.java:205)
E/MessageDelegate( 5168): at android.os.Looper.loop(Looper.java:294)
E/MessageDelegate( 5168): at android.app.ActivityThread.main(ActivityThread.java:8177)
E/MessageDelegate( 5168): at java.lang.reflect.Method.invoke(Native Method)
E/MessageDelegate( 5168): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
E/MessageDelegate( 5168): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:97Is there any way i can load extensions such as ublock Origin into my android GeckoView?
thanks a lot in advance
Reacted by JulienMeziere and decryptable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Priority
None yet
Activity
decryptable commentedon Jan 12, 2025
Have you found a solution yet? I'm also having the same problem. I tried several solutions and suggestions from different forums, but I haven't been able to resolve it.
baseplate-admin commentedon Jan 12, 2025
Yep,
Please check out this code, and it has to have this folder too
decryptable commentedon Jan 15, 2025
From what I've seen, it looks like it's the same as my project in how it's done. What exactly is the main problem?
baseplate-admin commentedon Jan 15, 2025
Does your app include ublock orgin folder?
Decapitated commentedon Jul 1, 2025
I had the same problem as OP. After some searching, I found this Reddit comment.
So basically,