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

jetified-appcompat-resources-1.7.0-runtime.jar: D8: java.lang.NullPointerException: Cannot invoke "String.length() Error happened after updating new version #2297

Closed
ijascookee opened this issue Sep 25, 2024 · 20 comments
Labels
bug Something isn't working

Comments

@ijascookee
Copy link

ijascookee commented Sep 25, 2024

Environment

Technology Version
Flutter version 3.24.1
Plugin version 6.1.0+1

ERROR:/Users/Apple/.gradle/caches/transforms-3/772418b938aa555c88328e65887df653/transformed/jetified-appcompat-resources-1.7.0-runtime.jar: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "" is null

ERROR:/Users/Apple/.gradle/caches/transforms-3/6f430dba7a9d0caec54877b72ee5cd99/transformed/appcompat-1.7.0-runtime.jar: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "" is null

This error happened while running application after new update

Tried overriding flutter_inappweview_android package with older version,

dependency_overrides:
  flutter_inappwebview_android: 1.0.13

then this error gone and app runs but some functionalities not working like in youtube_player_flutter package. Also i have checked this player's source code to ensure it is using latest flutter_inappwebview package.

The folllowing exception also showing i am not sure about this is related to youtube_player_flutter package or flutter_inappwebview package

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, Unknown feature SUPPRESS_ERROR_PAGE, null, java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE

@ijascookee ijascookee added the bug Something isn't working label Sep 25, 2024
Copy link

👋 @ijascookee

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!

@sagarZodage
Copy link

sagarZodage commented Sep 25, 2024

I have facing same problem . Please suggest alternatives

environment:
sdk: '>=3.5.0 <4.0.0'

flutter_inappwebview:
^6.1.0+1

Error when run the app

  • What went wrong:
    Execution failed for task ':app:mergeExtDexDevelopmentDebug'.

Could not resolve all files for configuration ':app:developmentDebugRuntimeClasspath'.
Failed to transform clevertap-android-sdk-6.2.1.aar (com.clevertap.android:clevertap-android-sdk:6.2.1) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.category=library, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=androidJvm}.
> Execution failed for DexingWithClasspathTransform: /Users/sagar/.gradle/caches/transforms-3/0abb8eb65bb7cd16a59253399295a78c/transformed/jetified-clevertap-android-sdk-6.2.1-runtime.jar.
> Error while dexing.
Failed to transform material-1.4.0.aar (com.google.android.material:material:1.4.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingWithClasspathTransform: /Users/sagar/.gradle/caches/transforms-3/2f80e288a098e85fa5fc55d5c74e0003/transformed/material-1.4.0-runtime.jar.
> Error while dexing.
Failed to transform appcompat-resources-1.7.0.aar (androidx.appcompat:appcompat-resources:1.7.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingWithClasspathTransform: /Users/sagar/.gradle/caches/transforms-3/bca8e20ba65df973336ed9bdc59ed57d/transformed/jetified-appcompat-resources-1.7.0-runtime.jar.
> Error while dexing.
Failed to transform appcompat-1.7.0.aar (androidx.appcompat:appcompat:1.7.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingWithClasspathTransform: /Users/sagar/.gradle/caches/transforms-3/965f7dd51f9b8cef9e0c1dadd510629a/transformed/appcompat-1.7.0-runtime.jar.
> Error while dexing.
Uploading Screenshot 2024-09-25 at 8.58.22 PM.png…

Uploading Screenshot 2024-09-25 at 8.58.22 PM.png…

@ZoftPranav
Copy link

ZoftPranav commented Sep 25, 2024

any fix for this ? @sagarZodage seems like version is highly unstable

@sagarZodage
Copy link

Not Yet . @ZoftPranav Please let me know if anyone find any solution

@pichillilorenzo
Copy link
Owner

I will try to downgrade to the previous version for the Android native appcompat dependency.

@sagarZodage
Copy link

I have also tried but not working below version I am currently working .

    **_'androidx.appcompat:appcompat:1.3.1'_**

@pichillilorenzo
Copy link
Owner

pichillilorenzo commented Sep 25, 2024

@sagarZodage which version of Flutter are you using? androidx.appcompat 1.3.1 seems to be pretty old (check https://mvnrepository.com/artifact/androidx.appcompat/appcompat).
The previous version used by the plugin was 1.6.0

@sagarZodage
Copy link

Also tried with 'androidx.appcompat:appcompat:1.7.0' version not working

@pichillilorenzo
Copy link
Owner

@sagarZodage 1.7.0 is the current version, have you tried with 1.6.0? It’s the version used by flutter_inappwebview 6.0.0

@adityapatil18
Copy link

@sagarZodage which version of Flutter are you using? androidx.appcompat 1.3.1 seems to be pretty old (check https://mvnrepository.com/artifact/androidx.appcompat/appcompat). The previous version used by the plugin was 1.6.0

I have also tried but not working . Its not the androidx.appcompat issue this issue is occuring becasue of the unstable flutter_inappwebview. and I used this
dependency_overrides:
flutter_inappwebview_android: 1.0.13
still its causing the same issue.

@pichillilorenzo
Copy link
Owner

Have you tried to upgrade the Android gradle version? Check #2290 (comment)

@ijascookee
Copy link
Author

ijascookee commented Sep 25, 2024

Have you tried to upgrade the Android gradle version? Check #2290 (comment)

Yes, tried...
flutter_inappwebview_android
is using old appcompat version and it is is not supported by latest version of flutter.

@pichillilorenzo
Copy link
Owner

Released new flutter_inappwebview_android version 1.1.0+1 with the fix. You can run flutter pub upgrade.

@ijascookee
Copy link
Author

@pichillilorenzo
Thank you, But, There is another issue, I don't know is it related to the package or not could you please help me to identify what it the following error means. In this error log, error is coming from the package.

W/cr_SupportWebSettings( 6167): setForceDarkBehavior() is a no-op in an app with targetSdkVersion>=T
E/MethodChannel#flutter/platform_views( 6167): Failed to handle method call
E/MethodChannel#flutter/platform_views( 6167): java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE
E/MethodChannel#flutter/platform_views( 6167): 	at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:649)
E/MethodChannel#flutter/platform_views( 6167): 	at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:618)
E/MethodChannel#flutter/platform_views( 6167): 	at androidx.webkit.WebViewFeature.isFeatureSupported(WebViewFeature.java:611)
E/MethodChannel#flutter/platform_views( 6167): 	at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebView.prepare(InAppWebView.java:436)
E/MethodChannel#flutter/platform_views( 6167): 	at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.FlutterWebView.<init>(FlutterWebView.java:82)
E/MethodChannel#flutter/platform_views( 6167): 	at com.pichillilorenzo.flutter_inappwebview_android.webview.FlutterWebViewFactory.create(FlutterWebViewFactory.java:67)
E/MethodChannel#flutter/platform_views( 6167): 	at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:523)
E/MethodChannel#flutter/platform_views( 6167): 	at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsController.java:168)
E/MethodChannel#flutter/platform_views( 6167): 	at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:105)
E/MethodChannel#flutter/platform_views( 6167): 	at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:55)
E/MethodChannel#flutter/platform_views( 6167): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#flutter/platform_views( 6167): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#flutter/platform_views( 6167): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#flutter/platform_views( 6167): 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#flutter/platform_views( 6167): 	at android.os.Handler.handleCallback(Handler.java:958)
E/MethodChannel#flutter/platform_views( 6167): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#flutter/platform_views( 6167): 	at android.os.Looper.loopOnce(Looper.java:205)
E/MethodChannel#flutter/platform_views( 6167): 	at android.os.Looper.loop(Looper.java:294)
E/MethodChannel#flutter/platform_views( 6167): 	at android.app.ActivityThread.main(ActivityThread.java:8177)
E/MethodChannel#flutter/platform_views( 6167): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter/platform_views( 6167): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
E/MethodChannel#flutter/platform_views( 6167): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
 

.

E/flutter ( 6167): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, Unknown feature SUPPRESS_ERROR_PAGE, null, java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE
E/flutter ( 6167): 	at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:649)
E/flutter ( 6167): 	at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:618)
E/flutter ( 6167): 	at androidx.webkit.WebViewFeature.isFeatureSupported(WebViewFeature.java:611)
E/flutter ( 6167): 	at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebView.prepare(InAppWebView.java:436)
E/flutter ( 6167): 	at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.FlutterWebView.<init>(FlutterWebView.java:82)
E/flutter ( 6167): 	at com.pichillilorenzo.flutter_inappwebview_android.webview.FlutterWebViewFactory.create(FlutterWebViewFactory.java:67)
E/flutter ( 6167): 	at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:523)
E/flutter ( 6167): 	at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsController.java:168)
E/flutter ( 6167): 	at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:105)
E/flutter ( 6167): 	at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:55)
E/flutter ( 6167): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/flutter ( 6167): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/flutter ( 6167): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/flutter ( 6167): 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/flutter ( 6167): 	at android.os.Handler.handleCallback(Handler.java:958)
E/flutter ( 6167): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/flutter ( 6167): 	at android.os.Looper.loopOnce(Looper.java:205)
E/flutter ( 6167): 	at android.os.Looper.loop(Looper.java:294)
E/flutter ( 6167): 	at android.app.ActivityThread.main(ActivityThread.java:8177)
E/flutter ( 6167): 	at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 6167): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
E/flutter ( 6167): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
E/flutter ( 6167): )
E/flutter ( 6167): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648:7)
E/flutter ( 6167): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)
E/flutter ( 6167): <asynchronous suspension>
E/flutter ( 6167): #2      ExpensiveAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1104:5)
E/flutter ( 6167): <asynchronous suspension>
E/flutter ( 6167): #3      AndroidViewController.create (package:flutter/src/services/platform_views.dart:827:5)
E/flutter ( 6167): <asynchronous suspension>
E/flutter ( 6167): 

@pichillilorenzo
Copy link
Owner

The SUPPRESS_ERROR_PAGE unsupported feature has been already removed on the new plugin version, so use flutter_inappwebview 6.1.0.
If you are already using 6.1.0, run flutter pub upgrade

@ijascookee
Copy link
Author

The SUPPRESS_ERROR_PAGE unsupported feature has been already removed on the new plugin version, so use flutter_inappwebview 6.1.0. If you are already using 6.1.0, run flutter pub upgrade

Thanks now its working fine😍

@sagarZodage
Copy link

I am currently trying to upload a new build to the Google Play Store and have encountered the following issue.

Screenshot 2024-09-26 at 12 38 34 PM

@pichillilorenzo
Copy link
Owner

@sagarZodage I don’t know what is your zc.b$b.onReceive. You should check your native code or other dependencies.

@JeffTyfoom
Copy link

Released new flutter_inappwebview_android version 1.1.0+1 with the fix. You can run flutter pub upgrade.

Thanks it's working!

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants