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

android app crash after adding package on flutter 2.3 #6

Closed
codigo47 opened this issue Apr 1, 2018 · 7 comments
Closed

android app crash after adding package on flutter 2.3 #6

codigo47 opened this issue Apr 1, 2018 · 7 comments

Comments

@codigo47
Copy link

codigo47 commented Apr 1, 2018

Hi Liro, I updated Flutter to 2.3 and the android app crashes on the startup.

When I remove flutter_twitter_login: "^1.0.1", the app works well.

@roughike
Copy link
Owner

roughike commented Apr 1, 2018

Hi!

Are you using Dart 2? If yes, did you try the version 1.1.0, which is the only Dart 2 compatible version so far?

If not, could you:

  1. copy-paste the stack trace you have when the app crashes
  2. run flutter doctor and copy-paste the output here?

I'll have time to investigate this tomorrow, but any more context would help.

@codigo47
Copy link
Author

codigo47 commented Apr 1, 2018

Hi, I'm using Dart 2.0, I tried flutter_twitter_login: "^1.1.0", but I got the same result,

image

Debug

C:\Sistemas\flutter\flutter1> flutter run --trace-startup
Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle... 1,1s
Resolving dependencies... 1,7s
Running 'gradlew assembleDebug'... 5,3s
Built build\app\outputs\apk\debug\app-debug.apk (27.3MB).
Installing build\app\outputs\apk\app.apk... 2,9s

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.2.3, on Microsoft Windows [Version 10.0.16299.309], locale es-AR)[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[√] Android Studio (version 3.0)
[√] Connected devices (1 available)

• No issues found!
PS C:\Sistemas\flutter\flutter1> flutter doctor -v
[√] Flutter (Channel beta, v0.2.3, on Microsoft Windows [Version 10.0.16299.309], locale es-AR) • Flutter version 0.2.3 at C:\Users\codigo47\flutter
• Framework revision 5a58b36e36 (3 weeks ago), 2018-03-13 13:20:13 -0700
• Engine revision e61bb9ac3a
• Dart version 2.0.0-dev.35.flutter-290c576264

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at C:\Users\codigo47\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
• All Android licenses accepted.

[√] Android Studio (version 3.0)
• Android Studio at D:\Program Files\Android\Android Studio
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] Connected devices (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.0 (API 24) (emulator)
• No issues found!

Thanks

@roughike
Copy link
Owner

roughike commented Apr 1, 2018

Thanks!

If you can, could you open Android Studio and see the logcat output as well? Seems like it could be a crash on the native Android side.

I'll try to reproduce with the same stack as you have when I can anyway, but if you could do that, I would be sure that I'm reproducing the same issue.

@codigo47
Copy link
Author

codigo47 commented Apr 1, 2018

Logcat:

04-01 18:10:08.424 15322-15351/? W/common.FileUtils: Failed to set dir world executable: java.io.FileNotFoundException: /data/user_de/0/com.google.android.gms/files/gmscore_global_dirs.txt: open failed: EACCES (Permission denied)
04-01 18:10:08.425 15322-15351/? W/common.FileUtils: Failed to set dir world executable: java.io.FileNotFoundException: /data/user_de/0/com.google.android.gms/files/gmscore_global_dirs.txt: open failed: EACCES (Permission denied)
04-01 18:10:08.428 15322-15351/? W/common.FileUtils: Failed to set dir world executable: java.io.FileNotFoundException: /data/user_de/0/com.google.android.gms/files/gmscore_global_dirs.txt: open failed: EACCES (Permission denied)
04-01 18:10:08.428 15322-15351/? W/common.FileUtils: Failed to set dir world executable: java.io.FileNotFoundException: /data/user_de/0/com.google.android.gms/files/gmscore_global_dirs.txt: open failed: EACCES (Permission denied)
04-01 18:10:08.429 15322-15351/? W/linker: /data/app/com.google.android.gms-1/lib/x86/libconscrypt_gmscore_jni.so: unused DT entry: type 0xf arg 0x91
04-01 18:10:08.430 15322-15351/? V/NativeCrypto: Registering com/google/android/gms/org/conscrypt/NativeCrypto's 279 native methods...
04-01 18:10:08.440 15322-15351/? D/NetworkSecurityConfig: No Network Security Config specified, using platform default
04-01 18:10:08.442 15322-15351/? I/ProviderInstaller: Installed default security provider GmsCore_OpenSSL
04-01 18:10:11.025 4486-4486/? I/WearableService: Wearable Services stopping
04-01 18:10:11.160 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.JobSchedulerEngine$PhoneskyJobSchedulerJobService.onStartJob(9): onJobSchedulerWakeup
04-01 18:10:11.164 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.p.a(22): Scheduling fallback in 43199996 (absolute: 55848042)
04-01 18:10:11.170 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.p.a(22): Scheduling fallback in 64799994 (absolute: 77448046)
04-01 18:10:11.178 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.w.handleMessage(32): DeviceState: DeviceState{currentTime=1522617011175, isCharging=true, isIdle=false, netAny=true, netNotRoaming=true, netUnmetered=false}
04-01 18:10:11.185 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.r.a(88): Running job: 1 (12)
04-01 18:10:11.186 15246-15246/? I/Finsky: [1] com.google.android.finsky.ah.c.a(41): ContentSyncJob started
04-01 18:10:11.188 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.r.a(160): RunningQueue size: 1
04-01 18:10:11.188 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.r.a(161): PendingQueue size: 0
04-01 18:10:11.282 15246-15286/? I/Finsky: [659] com.google.android.finsky.n.c.a(25): Completed 0 account content syncs with 0 successful.
04-01 18:10:11.282 15246-15246/? I/Finsky: [1] com.google.android.finsky.ah.c.a(5): Installation state replication succeeded.
04-01 18:10:11.284 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.aq.b(12): jobFinished: 1 12
04-01 18:10:11.286 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.r.a(185): Job 1 (12) finished
04-01 18:10:11.292 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.r.a(160): RunningQueue size: 0
04-01 18:10:11.293 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.r.a(161): PendingQueue size: 0
04-01 18:10:11.293 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.w.handleMessage(220): Executor finished
04-01 18:10:11.324 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.JobSchedulerEngine.a(126): Cancelling existing job with id: 9001
04-01 18:10:11.325 15246-15246/? I/Finsky: [1] com.google.android.finsky.scheduler.JobSchedulerEngine.a(61): Scheduling job with id: 9000

Console

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running 'gradlew assembleDebug'...
Note: C:\Users\codigo47\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\flutter_twitter_login-1.1.0\android\src\main\java\com\roughike\fluttertwitterlogin\fluttertwitterlogin\TwitterLoginPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Built build\app\outputs\apk\debug\app-debug.apk (27.3MB).
Installing build\app\outputs\apk\app.apk...
Syncing files to device Android SDK built for x86...

@roughike
Copy link
Owner

roughike commented Apr 7, 2018

Hey, I just tried to reproduce this on an Android emulator, with API level 24 and same Flutter version as you did. No luck there.

Does cloning this repo and running the sample app crash as well?

@codigo47
Copy link
Author

codigo47 commented Apr 10, 2018

Hey, sorry the delay, I updated Flutter and Android SDK (using API Level 26) and it works fine now!, thanks for your help!

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.2.8, on Microsoft Windows [Version 10.0.16299.309], locale es-AR)
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[√] Android Studio (version 3.1)
[√] VS Code, 64-bit edition (version 1.22.1)
[√] Connected devices (1 available)
• No issues found!

@roughike
Copy link
Owner

Hey, that's nice to hear! Please comment if the crash happens again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants