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

Unable to obtain a JavascriptEngine #329

Open
aliexalter opened this issue Sep 10, 2024 · 1 comment
Open

Unable to obtain a JavascriptEngine #329

aliexalter opened this issue Sep 10, 2024 · 1 comment

Comments

@aliexalter
Copy link

Describe the bug
Running application on device with real AdUnits and on simulator with Test Ad Units. I counter an error saying
Sending plugin error: {"save":false,"callbackId":"33634438","pluginId":"AdMob","methodName":"prepareInterstitial","success":false,"error":{"message":"Unable to obtain a JavascriptEngine."}}
Ad failed to load : 0
File: https://localhost/main.46b33a8cc361aa8b.js - Line 1 - Msg: ERROR Error: Unable to obtain a JavascriptEngine.

To Reproduce
Run the demo in android studio using ionic cap open android and chose latest android 14.0 in simulators. User will see no Ads loaded.

Expected behavior
Ad should be loaded

Desktop (please complete the following information):
None

Smartphone (please complete the following information):

  • Device: Pixel 7 Pro API 34
  • OS: Android 14
  • Browser chrome
  • Version "@capacitor-community/admob": "^5.3.1"

Additional context
It is related to WebView in latest Android versions.

@aliexalter
Copy link
Author

this might fix but I have not tested on device yet but its working on android 14 simulator.

dependencies {
    implementation("androidx.javascriptengine:javascriptengine:1.0.0-beta01")
}

variable.gradle
minSdkVersion = 26

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

No branches or pull requests

1 participant