Conveyor with Flutter - Handshake error when running .net web app locally

1

I am using Conveyor (a Visual Studio 2019 extension) to have my ASP.NET Core available to android emulators. This has worked perfectly up until now. I have developed Xamarin apps, UWP apps and used it before for a native Android app at which this works fine. But on the current flutter app this isn't working.

Conveyor does provide a tutorial to install the certificate on an android device: https://conveyor.cloud/Help/SSL

After following those instructions, I could load the web page normally:

valid certificate android emulator

This has also been done on Windows (the machine running the web app) but this is done automatically by the Conveyor extension, nevertheless:

issued certificate

I run this Dart code to call the API:

Future login(String email, String password) async {

var response = await http
    .post("$_url/login", body: {email: email, password: password});//_url= https://192.168.0.148:45455/api

if (response.statusCode == 200) {
  var token = LoginResult.fromJson(json.decode(response.body));
  _authToken = token.token;
  return token.token;
}
throw Exception(
    "Login failed: ${response.statusCode} body: ${response.body}");

}

The exception that occurs:

HandshakeException (HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(handshake.cc:354)))

Note the 354 number that is different from errors I have seen elsewhere before. I can't really find specific error numbers for these exceptions.

flutter doctor seems to run fine, had to take additional steps to solve the license issue:

C:\>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.657], locale nl-NL)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.6)
[√] VS Code, 64-bit edition (version 1.42.1)
[√] Connected device (1 available)

• No issues found!

Already found relevant issues:

  • https://stackoverflow.com/a/54359013/2901207 Not only does this add much more code for a simple post request, which I just cannot accept. I would want to stick with http.post() and avoid any code-workarounds. I do not see this as a 'solution'.
  • I've looked through all the relevant github issues, none seem to come with a good solution. Most of the issues are doing a deep-dive into self-signed certificates that seem to be relevant more to servers already being hosted instead of localhost. I believe Conveyor should have already solved the certificate issue but for flutter not correctly it seems like. Issues seen: #50699, #47262, #37655, #23045

The last one includes a similar solution using IOClient. Same here I don't see this as a solution. I rather find a solution that avoids any code adjustments at all. So I guess the focus is on Conveyor to adjust this correctly or to run flutter correctly to accept certificates from convoyer.

Below the entire log for flutter run --verbose can be found. I have seen the flutter team asking for this on every github issue, so perhaps it solves anything.

[  +27 ms] executing: [C:\flutter\] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +70 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 0b8abb4724aa590dd0f429683339b1e045a1594d
[        ] executing: [C:\flutter\] git describe --match v*.*.* --first-parent --long --tags
[  +43 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.12.13+hotfix.8-0-g0b8abb472
[   +8 ms] executing: [C:\flutter\] git rev-parse --abbrev-ref --symbolic @{u}
[  +45 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [C:\flutter\] git ls-remote --get-url origin
[  +40 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +78 ms] executing: [C:\flutter\] git rev-parse --abbrev-ref HEAD
[  +43 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[ +100 ms] executing: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[  +25 ms] Exit code 0 from: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[        ] List of devices attached
           emulator-5554          device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86
           transport_id:1
[  +17 ms] C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell getprop
[  +54 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +6 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +109 ms] Found plugin url_launcher at C:\flutter\.pub-cache\hosted\pub.dartlang.org\url_launcher-4.2.0+3\
[  +82 ms] Found plugin url_launcher at C:\flutter\.pub-cache\hosted\pub.dartlang.org\url_launcher-4.2.0+3\
[  +40 ms] Generating
C:\Users\USER\source\repos\P2PortfolioApp\P2PortfolioApp\android\app\src\main\java\io\flutter\plugins\GeneratedPluginReg
istrant.java
[  +46 ms] ro.hardware = ranchu
[  +32 ms] Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider
enabling
           software rendering with "--enable-software-rendering".
[  +17 ms] Launching lib\main.dart on Android SDK built for x86 in debug mode...
[   +7 ms] executing: C:\Users\USER\AppData\Local\Android\sdk\build-tools\29.0.3\aapt dump xmltree
C:\Users\USER\source\repos\P2PortfolioApp\P2PortfolioApp\build\app\outputs\apk\app.apk AndroidManifest.xml
[  +17 ms] Exit code 0 from: C:\Users\USER\AppData\Local\Android\sdk\build-tools\29.0.3\aapt dump xmltree
C:\Users\USER\source\repos\P2PortfolioApp\P2PortfolioApp\build\app\outputs\apk\app.apk AndroidManifest.xml
[   +2 ms] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1c
               A: android:compileSdkVersionCodename(0x01010573)="9" (Raw: "9")
               A: package="com.example.p2portfolio" (Raw: "com.example.p2portfolio")
               A: platformBuildVersionCode=(type 0x10)0x1c
               A: platformBuildVersionName=(type 0x10)0x9
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1c
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: application (line=22)
                 A: android:label(0x01010001)="p2portfolio" (Raw: "p2portfolio")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw:
                 "io.flutter.app.FlutterApplication")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw:
                 "androidx.core.app.CoreComponentFactory")
                 E: activity (line=28)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.example.p2portfolio.MainActivity" (Raw:
                   "com.example.p2portfolio.MainActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: intent-filter (line=35)
                     E: action (line=36)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=38)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw:
                       "android.intent.category.LAUNCHER")
                 E: meta-data (line=45)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
                 E: activity (line=49)
                   A: android:theme(0x01010000)=@0x01030007
                   A: android:name(0x01010003)="io.flutter.plugins.urllauncher.UrlLauncherPlugin$WebViewActivity" (Raw:
                   "io.flutter.plugins.urllauncher.UrlLauncherPlugin$WebViewActivity")
                   A: android:exported(0x01010010)=(type 0x12)0x0
[   +8 ms] executing: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v
time -t 1
[  +48 ms] Exit code 0 from: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell -x
logcat -v time -t 1
[   +2 ms] --------- beginning of main
           03-08 12:13:03.586 E/GnssHAL_GnssInterface( 1764): gnssSvStatusCb: b: input svInfo.flags is 8
[   +8 ms] executing: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe version
[   +1 ms] executing: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 logcat -v time -T
03-08 12:13:03.586
[  +44 ms] Android Debug Bridge version 1.0.41
           Version 29.0.6-6198805
           Installed as C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe
[   +4 ms] executing: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe start-server
[  +63 ms] Building APK
[  +20 ms] Running Gradle task 'assembleDebug'...
[   +3 ms] gradle.properties already sets `android.enableR8`
[   +5 ms] Using gradle from C:\Users\USER\source\repos\P2PortfolioApp\P2PortfolioApp\android\gradlew.bat.
[   +7 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ +101 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
[   +4 ms] openjdk version "1.8.0_212-release"
           OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
           OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
[   +4 ms] executing: [C:\Users\USER\source\repos\P2PortfolioApp\P2PortfolioApp\android\]
C:\Users\USER\source\repos\P2PortfolioApp\P2PortfolioApp\android\gradlew.bat -Pverbose=true
-Ptarget=C:\Users\USER\source\repos\P2PortfolioApp\P2PortfolioApp\lib\main.dart -Ptrack-widget-creation=true
-Pfilesystem-scheme=org-dartlang-root -Ptarget-platform=android-x86 assembleDebug
[ +592 ms] Welcome to Gradle 5.6.2!
[   +2 ms] Here are the highlights of this release:
[   +1 ms]  - Incremental Groovy compilation
[   +3 ms]  - Groovy compile avoidance
[   +1 ms]  - Test fixtures for Java projects
[        ]  - Manage plugin versions via settings script
[   +1 ms] For more details see https://docs.gradle.org/5.6.2/release-notes.html
[+1184 ms] > Task :app:compileFlutterBuildDebug UP-TO-DATE
[   +3 ms] > Task :app:packLibsflutterBuildDebug UP-TO-DATE
[   +1 ms] > Task :app:preBuild UP-TO-DATE
[   +3 ms] > Task :app:preDebugBuild UP-TO-DATE
[   +1 ms] > Task :url_launcher:preBuild UP-TO-DATE
[   +3 ms] > Task :url_launcher:preDebugBuild UP-TO-DATE
[   +1 ms] > Task :url_launcher:compileDebugAidl NO-SOURCE
[   +3 ms] > Task :app:compileDebugAidl NO-SOURCE
[   +1 ms] > Task :url_launcher:packageDebugRenderscript NO-SOURCE
[   +4 ms] > Task :app:compileDebugRenderscript NO-SOURCE
[   +1 ms] > Task :app:checkDebugManifest UP-TO-DATE
[   +2 ms] > Task :app:generateDebugBuildConfig UP-TO-DATE
[   +1 ms] > Task :app:cleanMergeDebugAssets
[   +1 ms] > Task :app:mergeDebugShaders UP-TO-DATE
[   +2 ms] > Task :app:compileDebugShaders UP-TO-DATE
[   +1 ms] > Task :app:generateDebugAssets UP-TO-DATE
[   +3 ms] > Task :url_launcher:mergeDebugShaders UP-TO-DATE
[  +56 ms] > Task :url_launcher:compileDebugShaders UP-TO-DATE
[   +2 ms] > Task :url_launcher:generateDebugAssets UP-TO-DATE
[   +3 ms] > Task :url_launcher:packageDebugAssets UP-TO-DATE
[   +1 ms] > Task :app:mergeDebugAssets
[ +292 ms] > Task :app:copyFlutterAssetsDebug
[   +2 ms] > Task :app:mainApkListPersistenceDebug UP-TO-DATE
[   +3 ms] > Task :app:generateDebugResValues UP-TO-DATE
[   +1 ms] > Task :app:generateDebugResources UP-TO-DATE
[   +1 ms] > Task :url_launcher:generateDebugResValues UP-TO-DATE
[   +2 ms] > Task :url_launcher:compileDebugRenderscript NO-SOURCE
[   +1 ms] > Task :url_launcher:generateDebugResources UP-TO-DATE
[   +2 ms] > Task :url_launcher:packageDebugResources UP-TO-DATE
[        ] > Task :app:mergeDebugResources UP-TO-DATE
[   +1 ms] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
[        ] > Task :url_launcher:checkDebugManifest UP-TO-DATE
[  +81 ms] > Task :url_launcher:processDebugManifest UP-TO-DATE
[   +3 ms] > Task :app:processDebugManifest UP-TO-DATE
[   +3 ms] > Task :url_launcher:parseDebugLibraryResources UP-TO-DATE
[   +1 ms] > Task :url_launcher:generateDebugRFile UP-TO-DATE
[   +2 ms] > Task :app:processDebugResources UP-TO-DATE
[   +3 ms] > Task :url_launcher:generateDebugBuildConfig UP-TO-DATE
[   +2 ms] > Task :url_launcher:javaPreCompileDebug UP-TO-DATE
[   +1 ms] > Task :url_launcher:compileDebugJavaWithJavac UP-TO-DATE
[   +1 ms] > Task :url_launcher:bundleLibCompileDebug UP-TO-DATE
[  +86 ms] > Task :app:compileDebugKotlin UP-TO-DATE
[   +2 ms] > Task :app:javaPreCompileDebug UP-TO-DATE
[   +3 ms] > Task :app:compileDebugJavaWithJavac UP-TO-DATE
[   +1 ms] > Task :app:compileDebugSources UP-TO-DATE
[   +1 ms] > Task :app:processDebugJavaRes NO-SOURCE
[   +3 ms] > Task :url_launcher:processDebugJavaRes NO-SOURCE
[   +1 ms] > Task :url_launcher:bundleLibResDebug UP-TO-DATE
[   +3 ms] > Task :app:mergeDebugJavaResource UP-TO-DATE
[   +6 ms] > Task :url_launcher:bundleLibRuntimeDebug UP-TO-DATE
[   +4 ms] > Task :url_launcher:createFullJarDebug UP-TO-DATE
[   +1 ms] > Task :app:checkDebugDuplicateClasses UP-TO-DATE
[  +64 ms] > Task :app:desugarDebugFileDependencies UP-TO-DATE
[   +2 ms] > Task :app:mergeExtDexDebug UP-TO-DATE
[   +3 ms] > Task :app:transformClassesWithDexBuilderForDebug UP-TO-DATE
[   +1 ms] > Task :app:mergeDexDebug UP-TO-DATE
[   +1 ms] > Task :app:validateSigningDebug UP-TO-DATE
[   +1 ms] > Task :app:signingConfigWriterDebug UP-TO-DATE
[   +3 ms] > Task :app:mergeDebugJniLibFolders UP-TO-DATE
[   +1 ms] > Task :url_launcher:mergeDebugJniLibFolders UP-TO-DATE
[   +5 ms] > Task :url_launcher:mergeDebugNativeLibs UP-TO-DATE
[   +5 ms] > Task :url_launcher:stripDebugDebugSymbols UP-TO-DATE
[   +4 ms] > Task :url_launcher:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
[  +63 ms] > Task :app:mergeDebugNativeLibs UP-TO-DATE
[   +2 ms] > Task :app:stripDebugDebugSymbols UP-TO-DATE
[   +2 ms] Compatible side by side NDK version was not found.
[   +1 ms] > Task :app:packageDebug UP-TO-DATE
[        ] > Task :app:assembleDebug UP-TO-DATE
[        ] > Task :url_launcher:extractDebugAnnotations UP-TO-DATE
[        ] > Task :url_launcher:mergeDebugGeneratedProguardFiles UP-TO-DATE
[   +2 ms] > Task :url_launcher:mergeDebugConsumerProguardFiles UP-TO-DATE
[        ] > Task :url_launcher:prepareLintJarForPublish UP-TO-DATE
[   +2 ms] > Task :url_launcher:mergeDebugJavaResource UP-TO-DATE
[   +1 ms] > Task :url_launcher:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
[        ] > Task :url_launcher:transformNativeLibsWithSyncJniLibsForDebug UP-TO-DATE
[        ] > Task :url_launcher:bundleDebugAar UP-TO-DATE
[        ] > Task :url_launcher:compileDebugSources UP-TO-DATE
[   +2 ms] > Task :url_launcher:assembleDebug UP-TO-DATE
[        ] BUILD SUCCESSFUL in 2s
[   +2 ms] 58 actionable tasks: 3 executed, 55 up-to-date
[ +350 ms] Running Gradle task 'assembleDebug'... (completed in 3,1s)
[  +30 ms] calculateSha: LocalDirectory:
'C:\Users\USER\source\repos\P2PortfolioApp\P2PortfolioApp\build\app\outputs\apk'/app.apk
[  +41 ms] calculateSha: reading file took 38us
[ +445 ms] calculateSha: computing sha took 443us
[   +7 ms] √ Built build\app\outputs\apk\debug\app-debug.apk.
[   +7 ms] executing: C:\Users\USER\AppData\Local\Android\sdk\build-tools\29.0.3\aapt dump xmltree
C:\Users\USER\source\repos\P2PortfolioApp\P2PortfolioApp\build\app\outputs\apk\app.apk AndroidManifest.xml
[  +21 ms] Exit code 0 from: C:\Users\USER\AppData\Local\Android\sdk\build-tools\29.0.3\aapt dump xmltree
C:\Users\USER\source\repos\P2PortfolioApp\P2PortfolioApp\build\app\outputs\apk\app.apk AndroidManifest.xml
[   +2 ms] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1c
               A: android:compileSdkVersionCodename(0x01010573)="9" (Raw: "9")
               A: package="com.example.p2portfolio" (Raw: "com.example.p2portfolio")
               A: platformBuildVersionCode=(type 0x10)0x1c
               A: platformBuildVersionName=(type 0x10)0x9
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1c
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: application (line=22)
                 A: android:label(0x01010001)="p2portfolio" (Raw: "p2portfolio")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw:
                 "io.flutter.app.FlutterApplication")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw:
                 "androidx.core.app.CoreComponentFactory")
                 E: activity (line=28)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.example.p2portfolio.MainActivity" (Raw:
                   "com.example.p2portfolio.MainActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: intent-filter (line=35)
                     E: action (line=36)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=38)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw:
                       "android.intent.category.LAUNCHER")
                 E: meta-data (line=45)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
                 E: activity (line=49)
                   A: android:theme(0x01010000)=@0x01030007
                   A: android:name(0x01010003)="io.flutter.plugins.urllauncher.UrlLauncherPlugin$WebViewActivity" (Raw:
                   "io.flutter.plugins.urllauncher.UrlLauncherPlugin$WebViewActivity")
                   A: android:exported(0x01010010)=(type 0x12)0x0
[   +4 ms] Stopping app 'app.apk' on Android SDK built for x86.
[   +1 ms] executing: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell am
force-stop com.example.p2portfolio
[  +54 ms] executing: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell pm list
packages com.example.p2portfolio
[  +52 ms] package:com.example.p2portfolio
[   +4 ms] executing: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell cat
/data/local/tmp/sky.com.example.p2portfolio.sha1
[  +36 ms] 768e24b43bd762cc7b46297693baa55fc0695949
[   +2 ms] Latest build already installed.
[   +2 ms] Android SDK built for x86 startApp
[   +2 ms] executing: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell am start -a
android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez
enable-checked-mode true --ez verify-entry-points true com.example.p2portfolio/com.example.p2portfolio.MainActivity
[ +100 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.p2portfolio/.MainActivity
(has extras) }
[   +3 ms] Waiting for observatory port to be available...
[ +500 ms] D/FlutterActivity( 8233): Using the launch theme as normal theme.
[   +7 ms] D/FlutterActivityAndFragmentDelegate( 8233): Setting up FlutterEngine.
[   +1 ms] D/FlutterActivityAndFragmentDelegate( 8233): No preferred FlutterEngine was provided. Creating a new
FlutterEngine for this FlutterFragment.
[ +359 ms] D/FlutterActivityAndFragmentDelegate( 8233): Attaching FlutterEngine to the Activity that owns this Fragment.
[  +57 ms] D/FlutterView( 8233): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@23f561f
[  +27 ms] D/FlutterActivityAndFragmentDelegate( 8233): Executing Dart entrypoint: main, and sending initial route: /
[ +196 ms] Observatory URL on device: http://127.0.0.1:36511/H9d_JaoyPI4=/
[  +18 ms] executing: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:0
tcp:36511
[ +128 ms] 9700
[  +15 ms] Forwarded host port 9700 to device port 36511 for Observatory
[  +78 ms] Connecting to service protocol: http://127.0.0.1:9700/H9d_JaoyPI4=/
[+1320 ms] Successfully connected to service protocol: http://127.0.0.1:9700/H9d_JaoyPI4=/
[   +4 ms] Sending to VM service: getVM({})
[   +6 ms] Result: {type: VM, name: vm, architectureBits: 32, hostCPU: Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz,
operatingSystem: android, targetCPU: ia32, version: 2.7.0 (Fri Dec 6 16:26:51 2019 +0100) on "android_ia32",
_profilerMode: VM, _nativeZoneMemoryUsage: ...
[   +6 ms] Sending to VM service: getIsolate({isolateId: isolates/4001318716464607})
[   +4 ms] Sending to VM service: _flutter.listViews({})
[   +7 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0xf3332210, isolate: {type:
@Isolate, fixedId: true, id: isolates/4001318716464607, name: main.dart$main-4001318716464607, number:
4001318716464607}}]}
[   +6 ms] DevFS: Creating new filesystem on the device (null)
[   +2 ms] Sending to VM service: _createDevFS({fsName: P2PortfolioApp})
[  +40 ms] Result: {type: FileSystem, name: P2PortfolioApp, uri:
file:///data/user/0/com.example.p2portfolio/code_cache/P2PortfolioAppQQIXEI/P2PortfolioApp/}
[   +2 ms] DevFS: Created new filesystem on the device
(file:///data/user/0/com.example.p2portfolio/code_cache/P2PortfolioAppQQIXEI/P2PortfolioApp/)
[   +4 ms] Updating assets
[ +160 ms] Syncing files to device Android SDK built for x86...
[   +4 ms] Scanning asset files
[   +4 ms] <- reset
[   +4 ms] Compiling dart to kernel with 0 updated files
[   +9 ms] C:\flutter\bin\cache\dart-sdk\bin\dart.exe
C:\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter
-Ddart.developer.causal_async_stacks=true --output-dill
C:\Users\USER\AppData\Local\Temp\flutter_tool.c68a6d6d-612d-11ea-ae76-d07e35d5bcd0\app.dill --packages
C:\Users\USER\source\repos\P2PortfolioApp\P2PortfolioApp\.packages -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoi
d-closure-call-instructions --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root
[   +5 ms] D/EGL_emulation( 8233): eglMakeCurrent: 0xe7fb3240: ver 2 0 (tinfo 0xc8c55440)
[   +7 ms] <- compile package:p2portfolio/main.dart
[  +21 ms] Result: {type: Isolate, id: isolates/4001318716464607, name: main, number: 4001318716464607, _originNumber:
4001318716464607, startTime: 1583665988595, _heaps: {new: {type: HeapSpace, name: new, vmName: Scavenger, collections:
2, avgCollectionPeriodMillis...
[  +24 ms] I/Choreographer( 8233): Skipped 117 frames!  The application may be doing too much work on its main thread.
[ +224 ms] D/EGL_emulation( 8233): eglMakeCurrent: 0xdff1a240: ver 2 0 (tinfo 0xdff0f740)
[+1077 ms] W/IInputConnectionWrapper( 8233): getTextBeforeCursor on inactive InputConnection
[   +2 ms] W/IInputConnectionWrapper( 8233): getSelectedText on inactive InputConnection
[   +1 ms] W/IInputConnectionWrapper( 8233): getTextAfterCursor on inactive InputConnection
[  +19 ms] W/IInputConnectionWrapper( 8233): beginBatchEdit on inactive InputConnection
[   +2 ms] W/IInputConnectionWrapper( 8233): endBatchEdit on inactive InputConnection
[+4401 ms] Updating files
[ +148 ms] DevFS: Sync finished
[   +4 ms] Syncing files to device Android SDK built for x86... (completed in 5.961ms, longer than expected)
[   +2 ms] Synced 0.9MB.
[   +3 ms] Sending to VM service: _flutter.listViews({})
[   +4 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0xf3332210, isolate: {type:
@Isolate, fixedId: true, id: isolates/4001318716464607, name: main.dart$main-4001318716464607, number:
4001318716464607}}]}
[   +2 ms] <- accept
[   +1 ms] Connected to _flutterView/0xf3332210.
[   +3 ms] 🔥  To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
[   +3 ms] An Observatory debugger and profiler on Android SDK built for x86 is available at:
http://127.0.0.1:9700/H9d_JaoyPI4=/
[   +4 ms] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
android
ssl
flutter
dart
asked on Stack Overflow Mar 8, 2020 by CularBytes

2 Answers

0

Are you used requests package ?

https://pub.dev/packages/requests

Here the example:

var r = await Requests.get('https://expired.badssl.com/', **verify: false**);
r.raiseForStatus();
answered on Stack Overflow Mar 25, 2020 by Felipe • edited Mar 25, 2020 by Dharman
0

best way for skip problem of ssl certification.

class MyHttpOverrides extends HttpOverrides{
  @override
  HttpClient createHttpClient(SecurityContext context){
    return super.createHttpClient(context)
      ..badCertificateCallback = (X509Certificate cert, String host, int port)=> true;
    }
  }

void main(){
    HttpOverrides.global = new MyHttpOverrides();
    runApp(new MyApp());
}
answered on Stack Overflow Apr 9, 2020 by Sathish Gadde

User contributions licensed under CC BY-SA 3.0