• 카테고리

    질문 & 답변
  • 세부 분야

    모바일 앱 개발

  • 해결 여부

    미해결

안녕하세요. Firebase와 Google sign_in 사용중입니다..

20.06.02 15:51 작성 조회수 1.1k

0

선생님, 안녕하세요. 

지금까지의 Flutter 강의 잘 보았습니다. 정말 큰 도움이 됐습니다. 감사합니다.

현재, Firebase로 Firestore, 인증, Firebase사용중입니다.

이슈는

1. 에뮬레이터에서는 Firebase로의 Data를 얻어오지만,

- flutter build apk 를 해서 얻은 apk로 제 스마트폰에 설치하였을 때는, 로드가 되지 않습니다.

2. 에뮬레이터로 실행했을 때, Android studio가 여러가지 에러메세지를 보여줍니다.

1.

스크린샷은 아래 링크에 있습니다.

https://drive.google.com/drive/folders/1I-B6PyK0msCKc9rbdUzUZ8kSRW4NkinU?usp=sharing

https://github.com/KKimj/Let-s-Ink/tree/dev/letsink_dev

Flutter Project는 위에 Github에 있습니다.

2-

아래는 에러메세지 입니다.

---

Launching lib/main.dart on sdk gphone x86 in debug mode...

Running Gradle task 'assembleDebug'...

✓ Built build/app/outputs/flutter-apk/app-debug.apk.

Waiting for sdk gphone x86 to report its views...

W/etsink.childre(30292): Verification of boolean com.google.android.gms.measurement.internal.zzfu.zzb() took 100.333ms (627.91 bytecodes/s) (1904B approximate peak alloc)

I/FA      (30292): App measurement initialized, version: 21028

I/FA      (30292): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE

I/FA      (30292): To enable faster debug mode event logging run:

I/FA      (30292):   adb shell setprop debug.firebase.analytics.app com.letsink.children

Debug service listening on ws://127.0.0.1:59737/GUJWHriCrs4=/ws

Syncing files to device sdk gphone x86...

W/etsink.childre(30292): JNI critical lock held for 20.796ms on Thread[22,tid=30325,Runnable,Thread*=0xe4fcb880,peer=0x134051e0,"GoogleApiHandler"]

W/etsink.childre(30292): JNI critical lock held for 17.763ms on Thread[20,tid=30316,Runnable,Thread*=0xe4ff36f0,peer=0x13400670,"Measurement Worker"]

I/FA      (30292): Tag Manager is not found and thus will not be used

W/etsink.childre(30292): JNI critical lock held for 32.744ms on Thread[22,tid=30325,Runnable,Thread*=0xe4fcb880,peer=0x134051e0,"GoogleApiHandler"]

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

I/OpenGLRenderer(30292): Davey! duration=5868ms; Flags=1, IntendedVsync=36070958792285, Vsync=36070958792285, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=36070968550750, AnimationStart=36070968932750, PerformTraversalsStart=36070968985750, DrawStart=36076504357750, SyncQueued=36076505935750, SyncStart=36076515188750, IssueDrawCommandsStart=36076521288750, SwapBuffers=36076738009750, FrameCompleted=36076836564750, DequeueBufferDuration=33482000, QueueBufferDuration=8806000, GpuCompleted=0, 

I/Choreographer(30292): Skipped 351 frames!  The application may be doing too much work on its main thread.

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c0b00: ver 3 0 (tinfo 0xeaba19f0)

I/flutter (30292): rootPage

I/flutter (30292): AuthProvider - FirebaseAuth - onAuthStateChanged - FirebaseUser(Instance of 'PlatformUser')

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

D/EGL_emulation(30292): eglMakeCurrent: 0xc07c1430: ver 3 0 (tinfo 0xeab99b30)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->getUnsafe()Lsun/misc/Unsafe; (greylist,core-platform-api, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J (greylist,core-platform-api, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)

I/BiChannelGoogleApi(30292): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzaq@64f7ca8

D/FirebaseAuth(30292): Notifying id token listeners about user ( Jzx13TmFUpgw7wVSqAjmRWR6sE13 ).

I/flutter (30292): signed in 김지운

I/flutter (30292): FirebaseUser(Instance of 'PlatformUser')

W/DynamiteModule(30292): Local module descriptor class for providerinstaller not found.

I/DynamiteModule(30292): Considering local module providerinstaller:0 and remote module providerinstaller:0

W/ProviderInstaller(30292): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I (greylist,core-platform-api, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->copyMemory(JJJ)V (greylist, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->getByte(J)B (greylist,core-platform-api, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->getByte(Ljava/lang/Object;J)B (greylist,core-platform-api, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->getLong(J)J (greylist,core-platform-api, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->putByte(JB)V (greylist,core-platform-api, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->putByte(Ljava/lang/Object;JB)V (greylist,core-platform-api, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, reflection, allowed)

W/etsink.childre(30292): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, reflection, allowed)

W/etsink.childre(30292): Accessing hidden field Ljava/nio/Buffer;->address:J (greylist, reflection, allowed)

I/etsink.childre(30292): The ClassLoaderContext is a special shared library.

I/flutter (30292): https://firebasestorage.googleapis.com/v0/b/lets-ink-kids.appspot.com/o/test_swiper%2FKakaoTalk_20200404_223302954_01.jpg?alt=media&token=296b5bdf-818f-49ef-89c5-55bdf1ccdaaf

I/flutter (30292): https://firebasestorage.googleapis.com/v0/b/lets-ink-kids.appspot.com/o/test_swiper%2FKakaoTalk_20200404_223302954_02.jpg?alt=media&token=66c889a4-54dc-45d1-b50f-79e549b0e038

I/flutter (30292): https://firebasestorage.googleapis.com/v0/b/lets-ink-kids.appspot.com/o/test_swiper%2FKakaoTalk_20200404_223320066.jpg?alt=media&token=b665f1fa-6195-4cb6-b029-802589b2e8a9

I/etsink.childre(30292): The ClassLoaderContext is a special shared library.

V/NativeCrypto(30292): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 286 native methods...

W/etsink.childre(30292): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (greylist, reflection, allowed)

I/ProviderInstaller(30292): Installed default security provider GmsCore_OpenSSL

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════

The following assertion was thrown while applying parent data.:

Incorrect use of ParentDataWidget.

The ParentDataWidget Expanded(flex: 1) wants to apply ParentData of type FlexParentData to a RenderObject, which has been set up to accept ParentData of incompatible type ParentData.

Usually, this means that the Expanded widget has the wrong ancestor RenderObjectWidget. Typically, Expanded widgets are placed directly inside Flex widgets.

The offending Expanded is currently placed inside a RepaintBoundary widget.

The ownership chain for the RenderObject that received the incompatible parent data was:

  ConstrainedBox ← Container ← StreamBuilder<QuerySnapshot> ← Expanded ← ImageSwiper ← RepaintBoundary ← IndexedSemantics ← NotificationListener<KeepAliveNotification> ← KeepAlive ← AutomaticKeepAlive ← ⋯

When the exception was thrown, this was the stack: 

#0      RenderObjectElement._updateParentData.<anonymous closure> (package:flutter/src/widgets/framework.dart:5649:11)

#1      RenderObjectElement._updateParentData (package:flutter/src/widgets/framework.dart:5665:6)

#2      RenderObjectElement.attachRenderObject (package:flutter/src/widgets/framework.dart:5686:7)

#3      RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5380:5)

#4      SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5833:11)

...

════════════════════════════════════════════════════════════════════════════════════════════════════

W/etsink.childre(30292): Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (greylist, reflection, allowed)

W/etsink.childre(30292): Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (greylist,core-platform-api, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (greylist,core-platform-api, linking, allowed)

W/etsink.childre(30292): Accessing hidden field Ljava/io/FileDescriptor;->descriptor:I (greylist, JNI, allowed)

W/etsink.childre(30292): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (greylist, reflection, allowed)

W/etsink.childre(30292): Accessing hidden method Ldalvik/system/BlockGuard;->getThreadPolicy()Ldalvik/system/BlockGuard$Policy; (greylist,core-platform-api, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Ldalvik/system/BlockGuard$Policy;->onNetwork()V (greylist, linking, allowed)

W/etsink.childre(30292): Accessing hidden method Ldalvik/system/CloseGuard;->close()V (greylist,core-platform-api, linking, allowed)

지금까지 해결을 위해

* Firebase 보안 설정 수정, 인증된 사람만 read/write 할 수 있도록

* settings.gradle 수정

https://stackoverflow.com/questions/61732409/plugin-project-firebase-core-web-not-found

* pubspec.yaml 버전 최신으로 수정

이후 남은 시도는

* Firebase 프로젝트 이전.

* Flutter code refactoring

으로 생각하고 있습니다.

제 이메일은

ziun79@gmail.com입니다. 필요하신 말씀있으시면, 편하게 연락부탁드립니다!

답변 주신다면 굉장히 감사하겠습니다.

이상입니다. 좋은 하루 보내시고, 건강하세요!

답변 4

·

답변을 작성해보세요.

1

음.. 아무리 생각해 봐도 어떤 문제인지 가늠이 잘 되지 않네요.

혹시 해결 되시면 공유 부탁드리겠습니다.

저도 한번 어떤 문제일지 고민해 보겠습니다.

1

flutter build apk 를 실행했다면 release 빌드를 수행하신 것이군요.

혹시 Firebase 콘솔에서 release signing key 에 대한 sha1 을 등록하셨는지 확인 부탁드립니다.

강좌에서는 안드로이드 디버그키 (Android Studio 설치 후 앱 실행시 자동생성되는 키)에 대한 sha1 인증서 지문을 등록했습니다.

따라서 릴리즈키에 대한 sha1 인증서 지문을 추가로 등록해야 그 인증서로 서명한 apk를 설치했을 때도 잘 됩니다.

참고하시라고 검색한 블로그 공유 드립니다.

https://prince-mint.tistory.com/11

0

kkimj님의 프로필

kkimj

질문자

2020.06.05

답변 감사합니다.

연락드리겠습니다. 6월 말에 코드 refactoring을 할 예정입니다.

좋은 주말보내세요!

0

kkimj님의 프로필

kkimj

질문자

2020.06.04

답변감사합니다!

이 작업은 진행했습니다.

- Playstore에 등록하기 위해서는 필수로 해야 되는 과정이더라구요.

* Firebase 사용중

에뮬레이터와, 실제 apk 설치 후 데이터 로드가 다름.

에뮬레이터 Ok

실제 기기 No

* 에뮬레이터와 실제 기기가 다른 결과를 보이는 걸 본적이 없어서 문의 드립니다.. ㅠㅠ

감사합니다.