jeremiahlukus / flutter_template

template with tests, login flow, riverpod, logging ect.
MIT License
24 stars 5 forks source link

Sign in connection refused on Android #21

Closed gradycsjohnson closed 2 years ago

gradycsjohnson commented 2 years ago

Me again :P

NOTE: running directly from VSCode, not through Docker.

I'm running on an android emulator (Pixel 2 - API 25), and I'm getting the following error when I click the sign in button:

image

Here's the log output:

Launching lib/main_development.dart on Android SDK built for x86 in debug mode...
lib/main_development.dart:1
✓  Built build/app/outputs/flutter-apk/app-development-debug.apk.
W/FlutterActivityAndFragmentDelegate( 7255): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
Connecting to VM Service at ws://127.0.0.1:37045/5-1YxSY8wrM=/ws
D/NetworkSecurityConfig( 7255): No Network Security Config specified, using platform default
D/skia    ( 7255): Shader compilation error
D/skia    ( 7255): ------------------------
D/skia    ( 7255): Errors:
D/skia    ( 7255): link failed but did not provide an info log
2
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008741
D/skia    ( 7255): Shader compilation error
D/skia    ( 7255): ------------------------
D/skia    ( 7255): Errors:
D/skia    ( 7255): link failed but did not provide an info log
2
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008741
D/EGL_emulation( 7255): eglCreateContext: 0x9e7ab1e0: maj 3 min 0 rcv 3
D/EGL_emulation( 7255): eglMakeCurrent: 0x9e7ab1e0: ver 3 0 (tinfo 0x8c17d250)
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008cdf
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008824
I/VideoCapabilities( 7255): Unsupported profile 4 for video/mp4v-es
D/EGL_emulation( 7255): eglCreateContext: 0x9e7acd40: maj 3 min 0 rcv 3
D/EGL_emulation( 7255): eglMakeCurrent: 0x9e7acd40: ver 3 0 (tinfo 0x8c17d250)
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008cdf
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008824
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008a34
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x00008073
E/eglCodecCommon( 7255): glUtilsParamSize: unknow param 0x000088ff
3
W/cr_BindingManager( 7255): Cannot call determinedVisibility() - never saw a connection for the pid: 7255
W/art     ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art     ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art     ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art     ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art     ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art     ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art     ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art     ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art     ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)
W/art     ( 7255): Attempt to remove non-JNI local reference, dumping thread
2
D/EGL_emulation( 7255): eglMakeCurrent: 0x9c9da600: ver 3 0 (tinfo 0x9c9c9a50)

flutter doctor output:

> flutter doctor -v
[✓] Flutter (Channel stable, 3.0.5, on Ubuntu 20.04.4 LTS
    5.15.0-41-generic, locale en_CA.UTF-8)
    • Flutter version 3.0.5 at /home/gj/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (3 weeks ago), 2022-07-13 11:24:16
      -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version
    32.0.0)
    • Android SDK at /home/gj/Android/Sdk
    • Platform android-31, build-tools 32.0.0
    • ANDROID_HOME = /home/gj/Android/Sdk
    • Java binary at: /opt/android-studio-4.0/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /usr/bin/google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2
    • pkg-config version 0.29.1

[✓] Android Studio (version 4.0)
    • Android Studio at /opt/android-studio-4.0/android-studio
    • Flutter plugin version 51.0.1
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] Android Studio
    • Android Studio at /opt/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] Android Studio
    • Android Studio at /home/gj/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      11.0.10+0-b96-7249189)

[✓] VS Code (version 1.69.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.44.0

[✓] Connected device (3 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    •
      Android 7.1.1 (API 25) (emulator)
    • Linux (desktop)                    • linux         • linux-x64      •
      Ubuntu 20.04.4 LTS 5.15.0-41-generic
    • Chrome (web)                       • chrome        • web-javascript •
      Google Chrome 103.0.5060.134

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
jeremiahlukus commented 2 years ago

Yep so that is expected. That webview url is pointing to local host (I have a backend server running locally)

https://github.com/jeremiahlukus/flutter_template#to-replace-the-signin-screen-url

you have to replace that url with your url or your oauth signin provider (google Facebook GitHub ect..)

jeremiahlukus commented 2 years ago

If you wanted to use a short cut you can setup

https://github.com/excid3/jumpstart

And run your rails sever this is the setup I use (rails backend). Im on vacation now but when I get back I’ll make a quick video on how to get everything running.

jeremiahlukus commented 2 years ago

https://drive.google.com/file/d/1xDEjONG7z0wo4XjT8N9vjDXJr6VmRgDC/view?usp=drivesdk

here is a video of what it should look like

gradycsjohnson commented 1 year ago

Cool. Thanks! I will give that a try :)