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

ASN1ParseError on iOS #631

Closed
5 tasks done
daniwaxman opened this issue Dec 28, 2020 · 5 comments
Closed
5 tasks done

ASN1ParseError on iOS #631

daniwaxman opened this issue Dec 28, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@daniwaxman
Copy link

Environment

Technology Version
Flutter version 1.22.4
Plugin version 4.0.0+4
Android version
iOS version 12.
Xcode version 11.4.1

Device information:

Description

When asset is loaded an error is thrown on ios only. The asset being loaded is on YouTube and has a valid SSL cert. The code that seems to be throwing the error is:
X509Certificate x509certificate = X509Certificate.fromData( data: sslCertificateMap["x509Certificate"]);

Expected behavior:
Asset should load without error

I saw a similar issue referenced here but the issue is closed.
#524
Current behavior:

Steps to reproduce

Images

Stacktrace/Logcat

flutter: Instance of 'ASN1ParseError'
flutter: #0      X509Certificate.fromDerData
package:flutter_inappwebview/…/X509Certificate/x509_certificate.dart:58
#1      X509Certificate.fromData
package:flutter_inappwebview/…/X509Certificate/x509_certificate.dart:42
#2      InAppWebViewController.handleMethod
package:flutter_inappwebview/src/in_app_webview_controller.dart:476
#3      MethodChannel._handleAsMethodCall
package:flutter/…/services/platform_channel.dart:430
#4      MethodChannel.setMethodCallHandler.<anonymous closure>
package:flutter/…/services/platform_channel.dart:383
#5      _DefaultBinaryMessenger.handlePlatformMessage
package:flutter/…/services/binding.dart:283
#6      _invoke3.<anonymous closure> (dart:ui/hooks.dart:280:15)
#7      _rootRun (dart:async/zone.dart:1190:13)
#8      _CustomZone.run (dart:async/zone.dart:1093:19)
#9      _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#10     _invoke3 (dart:ui/hooks.dart:279:10)
#11     _dispatchPlatformMessage (dart:ui/hooks.dart:154:5)
@daniwaxman daniwaxman added the bug Something isn't working label Dec 28, 2020
@pawangjain
Copy link

pawangjain commented Jan 21, 2021

We are also facing this issue, is there any workaround?

Technology Version
Flutter version 1.22.5
Plugin version 4.0.0+4
Android version  
iOS version Any
Xcode version 11.3.1

2021-01-21 16:54:23.540156+0530 Runner[252:5749] flutter: Instance of 'ASN1ParseError'
2021-01-21 16:54:23.541198+0530 Runner[252:5749] flutter: #0 X509Certificate.fromDerData (package:flutter_inappwebview/src/X509Certificate/x509_certificate.dart:58)
#1 X509Certificate.fromData (package:flutter_inappwebview/src/X509Certificate/x509_certificate.dart:42)
#2 InAppWebViewController.handleMethod (package:flutter_inappwebview/src/in_app_webview_controller.dart:476)
#3 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:430)
#4 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:383)
#5 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:283)
#6 _invoke3. (dart:ui/hooks.dart:280)
#7 _rootRun (dart:async/zone.dart:1190)
#8 _CustomZone.run (dart:async/zone.dart:1093)
#9 _CustomZone.runGuarded (dart:async/zone.dart:997)
#10 _invoke3 (dart:ui/hooks.dart:279)
#11 _dispatchPlatformMessage (dart:ui/hooks.dart:154)
2021-01-21 16:54:23.730865+0530 Runner[252:5749] flutter: Instance of 'ASN1ParseError'
2021-01-21 16:54:23.731303+0530 Runner[252:5749] flutter: #0 X509Certificate.fromDerData (package:flutter_inappwebview/src/X509Certificate/x509_certificate.dart:58)
#1 X509Certificate.fromData (package:flutter_inappwebview/src/X509Certificate/x509_certificate.dart:42)
#2 InAppWebViewController.handleMethod (package:flutter_inappwebview/src/in_app_webview_controller.dart:476)
#3 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:430)
#4 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:383)
#5 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:283)
#6 _invoke3. (dart:ui/hooks.dart:280)
#7 _rootRun (dart:async/zone.dart:1190)
#8 _CustomZone.run (dart:async/zone.dart:1093)
#9 _CustomZone.runGuarded (dart:async/zone.dart:997)
#10 _invoke3 (dart:ui/hooks.dart:279)
#11 _dispatchPlatformMessage (dart:ui/hooks.dart:154)
2021-01-21 16:54:26.425382+0530 Runner[252:5749] flutter: Instance of 'ASN1ParseError'
2021-01-21 16:54:26.425917+0530 Runner[252:5749] flutter: #0 X509Certificate.fromDerData (package:flutter_inappwebview/src/X509Certificate/x509_certificate.dart:58)
#1 X509Certificate.fromData (package:flutter_inappwebview/src/X509Certificate/x509_certificate.dart:42)
#2 InAppWebViewController.handleMethod (package:flutter_inappwebview/src/in_app_webview_controller.dart:476)
#3 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:430)
#4 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:383)
#5 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:283)
#6 _invoke3. (dart:ui/hooks.dart:280)
#7 _rootRun (dart:async/zone.dart:1190)
#8 _CustomZone.run (dart:async/zone.dart:1093)
#9 _CustomZone.runGuarded (dart:async/zone.dart:997)
#10 _invoke3 (dart:ui/hooks.dart:279)
#11 _dispatchPlatformMessage (dart:ui/hooks.dart:154)
2021-01-21 16:54:27.393411+0530 Runner[252:5749] flutter: Instance of 'ASN1ParseError'
2021-01-21 16:54:27.393839+0530 Runner[252:5749] flutter: #0 X509Certificate.fromDerData (package:flutter_inappwebview/src/X509Certificate/x509_certificate.dart:58)
#1 X509Certificate.fromData (package:flutter_inappwebview/src/X509Certificate/x509_certificate.dart:42)
#2 InAppWebViewController.handleMethod (package:flutter_inappwebview/src/in_app_webview_controller.dart:476)
#3 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:430)
#4 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:383)
#5 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:283)
#6 _invoke3. (dart:ui/hooks.dart:280)
#7 _rootRun (dart:async/zone.dart:1190)
#8 _CustomZone.run (dart:async/zone.dart:1093)
#9 _CustomZone.runGuarded (dart:async/zone.dart:997)
#10 _invoke3 (dart:ui/hooks.dart:279)
#11 _dispatchPlatformMessage (dart:ui/hooks.dart:154)
InAppWebView - dealloc

@pichillilorenzo
Copy link
Owner

Please, post some examples with a reproducible error, otherwise, I cannot test it and try to fix the problem. Thanks!

@no-response
Copy link

no-response bot commented Apr 4, 2021

This issue has been automatically closed because it was marked as "answered", and there wasn't any recent activity on this issue.

@no-response no-response bot closed this as completed Apr 4, 2021
@Nabouste
Copy link

Please, post some examples with a reproducible error, otherwise, I cannot test it and try to fix the problem. Thanks!

why this issues closed?
im facing same issue.

lutter: Instance of 'ASN1ParseError'
flutter: #0 X509Certificate.fromDerData (package:flutter_inappwebview/src/x509_certificate/x509_certificate.dart:57:5)
#1 X509Certificate.fromData (package:flutter_inappwebview/src/x509_certificate/x509_certificate.dart:41:30)
#2 SslCertificate.fromMap (package:flutter_inappwebview/src/types.dart:5293:41)
#3 URLProtectionSpace.fromMap (package:flutter_inappwebview/src/types.dart:1647:38)
#4 ServerTrustChallenge.fromMap (package:flutter_inappwebview/src/types.dart:1365:43)
#5 InAppWebViewController.handleMethod (package:flutter_inappwebview/src/in_app_webview/in_app_webview_controller.dart:523:36)
#6 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:435:55)
#7 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:382:34)
#8 _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:284:33)
#9 _invoke3. (dart:ui/hooks.dart:223:15)
#10 _rootRun (dart:async/zone.dart:1354:13)
#11 _CustomZone.run (dart:async/zone.dart:1258:19)
#12 _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
#13 _invoke3 (dart:ui/hooks.dart:222:10)
#14 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:520:7)
#15 _dispatchPlatformMessage (dart:ui/hooks.dart:90:31)
flutter: Page finished loading: {protectionSpace: {host: uat-bpi-proxy.tellybayad.com, protocol: null, realm: null, port: 443, sslCertificate: null, sslError: {androidError: null, iosError: 5, message: Indicates a trust policy failure which can be overridden by the user.}, iosAuthenticationMethod: NSURLAuthenticationMethodServerTrust, iosDistinguishedNames: null, iosReceivesCredentialSecurely: true, iosIsProxy: false, iosProxyType: null}}

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 14, 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

4 participants