728x90
반응형
잘 사용하고 있던 웹뷰 페이지가 어느 순간 SUPPRESS_ERROR_PAGE Error를 뱉어내며 페이지가 보이지 않는 문제가 발생했습니다.
물론 Flutter를 최신 버전으로 upgrade 하면서 flutter_inappwebview를 6.0.0으로 migration하면서 발생한 문제였던것 같습니다.
E/MethodChannel#flutter/platform_views( 3411): Failed to handle method call
E/MethodChannel#flutter/platform_views( 3411): java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE
E/MethodChannel#flutter/platform_views( 3411): at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:649)
E/MethodChannel#flutter/platform_views( 3411): at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:618)
E/MethodChannel#flutter/platform_views( 3411): at androidx.webkit.WebViewFeature.isFeatureSupported(WebViewFeature.java:611)
E/MethodChannel#flutter/platform_views( 3411): at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebView.prepare(InAppWebView.java:436)
E/MethodChannel#flutter/platform_views( 3411): at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.FlutterWebView.<init>(FlutterWebView.java:82)
E/MethodChannel#flutter/platform_views( 3411): at com.pichillilorenzo.flutter_inappwebview_android.webview.FlutterWebViewFactory.create(FlutterWebViewFactory.java:67)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:525)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsController.java:170)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:105)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:55)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#flutter/platform_views( 3411): at android.os.Handler.handleCallback(Handler.java:938)
E/MethodChannel#flutter/platform_views( 3411): at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#flutter/platform_views( 3411): at android.os.Looper.loop(Looper.java:246)
E/MethodChannel#flutter/platform_views( 3411): at android.app.ActivityThread.main(ActivityThread.java:8625)
E/MethodChannel#flutter/platform_views( 3411): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter/platform_views( 3411): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
E/MethodChannel#flutter/platform_views( 3411): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
E/flutter ( 3411): [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
아직 flutter_inappwebview 라이브러리 내부에서는 수정되지는 않은것 같지만 다른 사람들이 올려놓은 workaround를 알아내게되어 이렇게 공유드립니다.
그럼 바로 해결 방법 공개
1. pubspec.yaml 파일에 dependency_overrides 적용
dependency_overrides:
webview_flutter_android: 3.16.1
2. project/build.gradle 파일에 resolutionStrategy 적용
allprojects {
repositories {
. . .
configurations.all {
resolutionStrategy {
force 'androidx.webkit:webkit:1.8.0'
}
}
. . .
}
}
끝
728x90
반응형
'Development > Flutter' 카테고리의 다른 글
[해결방법] contains bitcode 오류 (0) | 2024.12.11 |
---|---|
[해결방법] Error: CocoaPods not installed or not in valid state (0) | 2024.08.23 |
[Tips] build.gradle 구조 개선하기 (local.properties 사용) (0) | 2024.08.19 |
[해결방법] dSYM 누락을 감지했습니다 (0) | 2024.08.16 |
[해결방법] 대상 API 수준을 업데이트 하는 방법 (0) | 2024.08.13 |