Is work when the URL is available, the problem is when URL down make a long time ~1min to start another media.
I try to exit the Future after 4 seconds that print the warning and the app stay frozen
for ~1 min.
How I can handle this exception and avoid stopping the application?
Future<void> selectStation(Station item) async {
Future.delayed(const Duration(milliseconds: 500), () async {
try {
await _assetsAudioPlayer.open(Audio.liveStream(
item.url,
));
//_assetsAudioPlayer.onErrorDo = (handler) {
// handler.player.stop();
//};
} catch (e) {
await _assetsAudioPlayer.stop();
return;
}
}).timeout(Duration(seconds: 4), onTimeout: () async {
await _assetsAudioPlayer.stop();
CoolAlert.show(
context: context,
type: CoolAlertType.error,
text:
"the station ${item.title} is no available, try later <timeout>!",
);
return;
});
}
log flutter :
W/MediaPlayer( 7297): Couldn't open https://test.tt/media.mp3
W/MediaPlayer( 7297): java.io.FileNotFoundException: No content provider: https://test.tt/media.mp3
W/MediaPlayer( 7297): at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1690)
W/MediaPlayer( 7297): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1520)
W/MediaPlayer( 7297): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1437)
W/MediaPlayer( 7297): at android.media.MediaPlayer.attemptDataSource(MediaPlayer.java:1174)
W/MediaPlayer( 7297): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1146)
W/MediaPlayer( 7297): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1170)
W/MediaPlayer( 7297): at com.github.florent37.assets_audio_player.playerimplem.PlayerImplemMediaPlayer$open$2.invokeSuspend(PlayerImplemMediaPlayer.kt:129)
W/MediaPlayer( 7297): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
W/MediaPlayer( 7297): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
W/MediaPlayer( 7297): at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
W/MediaPlayer( 7297): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
W/MediaPlayer( 7297): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
W/MediaPlayer( 7297): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
I/OppoMediaPlayer( 7297): setDataSource(path, headers) isOppoCreate=false
V/MediaHTTPService( 7297): MediaHTTPService(android.media.MediaHTTPService#ddd12ca): Cookies: null
I/OppoMediaPlayer( 7297): prepare() isOppoCreate=false
V/MediaHTTPService( 7297): makeHTTPConnection: CookieManager created: java.net.CookieManager#516bc3b
V/MediaHTTPService( 7297): makeHTTPConnection(android.media.MediaHTTPService#ddd12ca): cookieHandler: java.net.CookieManager#516bc3b Cookies: null
E/MediaPlayerNative( 7297): error (1, -2147483648)
W/System.err( 7297): java.io.IOException: Prepare failed.: status=0x1
W/System.err( 7297): at android.media.MediaPlayer._prepare(Native Method)
W/System.err( 7297): at android.media.MediaPlayer.prepare(MediaPlayer.java:1414)
W/System.err( 7297): at com.github.florent37.assets_audio_player.playerimplem.PlayerImplemMediaPlayer$open$2.invokeSuspend(PlayerImplemMediaPlayer.kt:185)
W/System.err( 7297): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
W/System.err( 7297): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
W/System.err( 7297): at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
W/System.err( 7297): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
W/System.err( 7297): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
W/System.err( 7297): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
I/OppoMediaPlayer( 7297): handleMediaPlayerError() mCurrentState=4
I/OppoMediaPlayer( 7297): handleMediaPlayerError() mNotUsingOppoMedia is true
I/MediaPlayer( 7297): prepare failed ,throw IOException to app
I/OppoMediaPlayer( 7297): release() isOppoCreate =false
D/OppoMediaPlayer( 7297): closeFd()
V/MediaPlayer( 7297): resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer( 7297): cleanDrmObj: mDrmObj=null mDrmSessionId=null
D/MediaPlayer( 7297): _release native called
D/MediaPlayer( 7297): _release native finished
W/System.err( 7297): com.github.florent37.assets_audio_player.playerimplem.PlayerFinder$NoPlayerFoundException
W/System.err( 7297): at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder._findWorkingPlayer(PlayerFinder.kt:70)
W/System.err( 7297): at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder._findWorkingPlayer(PlayerFinder.kt:88)
W/System.err( 7297): at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder$_findWorkingPlayer$1.invokeSuspend(Unknown Source:12)
W/System.err( 7297): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
W/System.err( 7297): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
W/System.err( 7297): at android.os.Handler.handleCallback(Handler.java:883)
W/System.err( 7297): at android.os.Handler.dispatchMessage(Handler.java:100)
W/System.err( 7297): at android.os.Looper.loop(Looper.java:237)
W/System.err( 7297): at android.app.ActivityThread.main(ActivityThread.java:7830)
W/System.err( 7297): at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 7297): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
W/System.err( 7297): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1040)
I/flutter ( 7297): PlatformException(OPEN, null, null, null)
Any help is welcome.
Player crashes when track file in invalid instead of giving some message.
https://github.com/florent37/Flutter-AssetsAudioPlayer/issues/627
I change the plugin.
Related
2022-11-23 16:22:26.428 688-688/? W/keymaster_tee: [WRN]begin req PARAMS: A32 B32 P1
2022-11-23 16:22:26.431 687-29628/? I/keystore2: keystore2::security_level: In create_operation. Success to create IKeystoreOperation. 10565, None
2022-11-23 16:22:26.433 688-688/? W/keymaster_tee: [WRN]Cmd 10, err -30
2022-11-23 16:22:26.433 687-29628/? E/keystore2: keystore2::error: In KeystoreOperation::finish
Caused by:
0: In finish: KeyMint::finish failed.
1: Error::Km(ErrorCode(-30))
2022-11-23 16:22:26.434 7907-7907/? W/b: encountered a potentially transient KeyStore error, will wait and retry
javax.crypto.AEADBadTagException
at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:617)
at javax.crypto.Cipher.doFinal(Cipher.java:2114)
at f.d.c.a.v.a.b.c(Unknown Source:32)
at f.d.c.a.v.a.b.b(Unknown Source:0)
at f.d.c.a.i.c(Unknown Source:11)
at f.d.c.a.i.j(Unknown Source:9)
at f.d.c.a.v.a.a$b.e(Unknown Source:6)
at f.d.c.a.v.a.a$b.f(Unknown Source:0)
at f.d.c.a.v.a.a$b.d(Unknown Source:11)
at e.m.a.a.b(Unknown Source:47)
at e.m.a.a.a(Unknown Source:4)
at com.navercorp.nid.oauth.a.h(Unknown Source:14)
at com.navercorp.nid.oauth.a.b(Unknown Source:0)
at com.navercorp.nid.oauth.a$a.a(Unknown Source:2)
at com.navercorp.nid.oauth.a$a.invoke(Unknown Source:0)
at kotlin.t.getValue(Unknown Source:22)
at com.navercorp.nid.oauth.a.f(Unknown Source:2)
at com.navercorp.nid.oauth.a.d(Unknown Source:6)
at com.navercorp.nid.oauth.h.c(Unknown Source:5)
at f.g.a.a.i(Unknown Source:0)
at f.g.a.a.a(Unknown Source:15)
at f.j.a.b.d(Unknown Source:18)
at f.j.a.b.onMethodCall(Unknown Source:20)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(Unknown Source:18)
at io.flutter.embedding.engine.dart.DartMessenger.a(Unknown Source:20)
at io.flutter.embedding.engine.dart.a.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8741)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by: android.security.KeyStoreException: Signature/MAC verification failed (internal Keystore code: -30 message: In KeystoreOperation::finish
Caused by:
0: In finish: KeyMint::finish failed.
1: Error::Km(ErrorCode(-30))) (public error code: 10 internal Keystore code: -30)
at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:418)
at android.security.KeyStoreOperation.handleExceptions(KeyStoreOperation.java:78)
at android.security.KeyStoreOperation.finish(KeyStoreOperation.java:128)
at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer$MainDataStream.finish(KeyStoreCryptoOperationChunkedStreamer.java:228)
at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:181)
at android.security.keystore2.AndroidKeyStoreAuthenticatedAESCipherSpi$BufferAllOutputUntilDoFinalStreamer.doFinal(AndroidKeyStoreAuthenticatedAESCipherSpi.java:396)
at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:609)
... 34 more
2022-11-23 16:22:26.443 688-688/? W/keymaster_tee: [WRN]begin req PARAMS: A32 B32 P1
2022-11-23 16:22:26.446 687-29628/? I/keystore2: keystore2::security_level: In create_operation. Success to create IKeystoreOperation. 10565, None
2022-11-23 16:22:26.449 688-688/? W/keymaster_tee: [WRN]Cmd 10, err -30
2022-11-23 16:22:26.450 687-29628/? E/keystore2: keystore2::error: In KeystoreOperation::finish
Caused by:
0: In finish: KeyMint::finish failed.
1: Error::Km(ErrorCode(-30))
2022-11-23 16:22:26.450 7907-7907/? W/a: cannot decrypt keyset:
javax.crypto.AEADBadTagException
at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:617)
at javax.crypto.Cipher.doFinal(Cipher.java:2114)
at f.d.c.a.v.a.b.c(Unknown Source:32)
at f.d.c.a.v.a.b.b(Unknown Source:18)
at f.d.c.a.i.c(Unknown Source:11)
at f.d.c.a.i.j(Unknown Source:9)
at f.d.c.a.v.a.a$b.e(Unknown Source:6)
at f.d.c.a.v.a.a$b.f(Unknown Source:0)
at f.d.c.a.v.a.a$b.d(Unknown Source:11)
at e.m.a.a.b(Unknown Source:47)
at e.m.a.a.a(Unknown Source:4)
at com.navercorp.nid.oauth.a.h(Unknown Source:14)
at com.navercorp.nid.oauth.a.b(Unknown Source:0)
at com.navercorp.nid.oauth.a$a.a(Unknown Source:2)
at com.navercorp.nid.oauth.a$a.invoke(Unknown Source:0)
at kotlin.t.getValue(Unknown Source:22)
at com.navercorp.nid.oauth.a.f(Unknown Source:2)
at com.navercorp.nid.oauth.a.d(Unknown Source:6)
at com.navercorp.nid.oauth.h.c(Unknown Source:5)
at f.g.a.a.i(Unknown Source:0)
at f.g.a.a.a(Unknown Source:15)
at f.j.a.b.d(Unknown Source:18)
at f.j.a.b.onMethodCall(Unknown Source:20)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(Unknown Source:18)
at io.flutter.embedding.engine.dart.DartMessenger.a(Unknown Source:20)
at io.flutter.embedding.engine.dart.a.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8741)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by: android.security.KeyStoreException: Signature/MAC verification failed (internal Keystore code: -30 message: In KeystoreOperation::finish
Caused by:
0: In finish: KeyMint::finish failed.
1: Error::Km(ErrorCode(-30))) (public error code: 10 internal Keystore code: -30)
at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:418)
at android.security.KeyStoreOperation.handleExceptions(KeyStoreOperation.java:78)
at android.security.KeyStoreOperation.finish(KeyStoreOperation.java:128)
at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer$MainDataStream.finish(KeyStoreCryptoOperationChunkedStreamer.java:228)
at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:181)
at android.security.keystore2.AndroidKeyStoreAuthenticatedAESCipherSpi$BufferAllOutputUntilDoFinalStreamer.doFinal(AndroidKeyStoreAuthenticatedAESCipherSpi.java:396)
at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:609)
... 34 more
2022-11-23 16:22:26.451 7907-7907/? E/DartMessenger: Uncaught exception in binary message listener
f.d.c.a.z.a.c0: Protocol message contained an invalid tag (zero).
at f.d.c.a.z.a.z.K(Unknown Source:74)
at f.d.c.a.z.a.z.G(Unknown Source:2)
at f.d.c.a.y.c0.X(Unknown Source:2)
at f.d.c.a.v.a.d.a(Unknown Source:8)
at f.d.c.a.b.a(Unknown Source:0)
at f.d.c.a.v.a.a$b.e(Unknown Source:29)
at f.d.c.a.v.a.a$b.f(Unknown Source:0)
at f.d.c.a.v.a.a$b.d(Unknown Source:11)
at e.m.a.a.b(Unknown Source:47)
at e.m.a.a.a(Unknown Source:4)
at com.navercorp.nid.oauth.a.h(Unknown Source:14)
at com.navercorp.nid.oauth.a.b(Unknown Source:0)
at com.navercorp.nid.oauth.a$a.a(Unknown Source:2)
at com.navercorp.nid.oauth.a$a.invoke(Unknown Source:0)
at kotlin.t.getValue(Unknown Source:22)
at com.navercorp.nid.oauth.a.f(Unknown Source:2)
at com.navercorp.nid.oauth.a.d(Unknown Source:6)
at com.navercorp.nid.oauth.h.c(Unknown Source:5)
at f.g.a.a.i(Unknown Source:0)
at f.g.a.a.a(Unknown Source:15)
at f.j.a.b.d(Unknown Source:18)
at f.j.a.b.onMethodCall(Unknown Source:20)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(Unknown Source:18)
at io.flutter.embedding.engine.dart.DartMessenger.a(Unknown Source:20)
at io.flutter.embedding.engine.dart.a.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8741)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
2022-11-23 16:22:26.451 7907-7966/? I/flutter: naver login error MissingPluginException(No implementation found for method logIn on channel flutter_naver_login)
If I try to login with Naver, I see this log and get an error.
Appears only on one specific device (Galaxy S21)
Other Galaxy s21s do not generate errors, but only on one device.
If you press the button, it doesn't respond.
I think FlutterNaverLogin.login() doesn't work when I press the Login button.
dependency : onesignal_flutter: ^3.4.1
Getting error when intialize onesignal service,
i am receiving pushnotifications but when i receive any this will be the log or when i click to open or listen it , this will be the error , please help.
W/SQLiteLog( 8133): (28) double-quoted string literal: "notification"
W/System.err( 8133): java.lang.ClassNotFoundException: com.company.NotificationServiceExtension
W/System.err( 8133): at java.lang.Class.classForName(Native Method)
W/System.err( 8133): at java.lang.Class.forName(Class.java:454)
W/System.err( 8133): at java.lang.Class.forName(Class.java:379)
W/System.err( 8133): at com.onesignal.OSNotificationController.setupNotificationServiceExtension(OSNotificationController.java:190)
W/System.err( 8133): at com.onesignal.OneSignal.init(OneSignal.java:819)
W/System.err( 8133): at com.onesignal.OneSignal.setAppId(OneSignal.java:737)
W/System.err( 8133): at com.onesignal.OneSignal.initWithContext(OneSignal.java:769)
W/System.err( 8133): at com.onesignal.OSNotificationRestoreWorkManager$NotificationRestoreWorker.doWork(OSNotificationRestoreWorkManager.java:64)
W/System.err( 8133): at androidx.work.Worker$1.run(Worker.java:86)
W/System.err( 8133): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/System.err( 8133): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/System.err( 8133): at java.lang.Thread.run(Thread.java:923)
W/System.err( 8133): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.company.NotificationServiceExtension" on path: DexPathList[[zip file "/data/app/~~HoPiaGdWkTctR32PvHQv5w==/com.dukanor-bATfBGE6hTOPr_LqS0AWZw==/base.apk"],nativeLibraryDirectories=[/data/app/~~HoPiaGdWkTctR32PvHQv5w==/com.dukanor-bATfBGE6hTOPr_LqS0AWZw==/lib/arm64, /data/app/~~HoPiaGdWkTctR32PvHQv5w==/com.dukanor-bATfBGE6hTOPr_LqS0AWZw==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
W/System.err( 8133): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
W/System.err( 8133): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
W/System.err( 8133): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
W/System.err( 8133): ... 12 more
here is the example i did.
initializeOneSignal([String? newEmail,String? store])async{
await OneSignal.shared.setLogLevel(OSLogLevel.verbose, OSLogLevel.none);
await OneSignal.shared.setAppId("xyz");
await OneSignal.shared.consentGranted(true);
await OneSignal.shared
.promptUserForPushNotificationPermission(fallbackToSettings: true);
await OneSignal.shared.setRequiresUserPrivacyConsent(true);
bool val=await OneSignal.shared.userProvidedPrivacyConsent();
print(val);
await OneSignal.shared.setExternalUserId(store??"" + ";" + newEmail.toString());
OneSignal.shared.setSubscriptionObserver((OSSubscriptionStateChanges changes) {});
OneSignal.shared.setNotificationWillShowInForegroundHandler((OSNotificationReceivedEvent event) {
Get.log('${DateTime.now()} [SignInController.onesingle] ${event.notification.additionalData}');
event.complete(event.notification);
});
OneSignal.shared.setNotificationOpenedHandler(
(OSNotificationOpenedResult result) async {
print('NOTIFICATION OPENED HANDLER CALLED WITH: $result');
print(
"Opened notification: ${result.notification.jsonRepresentation().replaceAll("\\n", "\n")}");
try {
var id = await result.notification.additionalData!["campaignId"];
if(id!=null){
getCampaign(id);
}
Get.log('${DateTime.now()} [SignInController.onesingle] setNotificationOpenedHandler id : $id ');
} catch (e) {
print(e.toString());
}
});
}
I can get the content of the notification, but I will exit the APP
immediately after receiving the message
I have tried to change the permissions, but it is still unable to solve this problem
This is how I get notifications
class _MyHomePageState extends State<MyHomePage> {
#override
void initState() {
super.initState();
FirebaseMessaging.instance.subscribeToTopic('message');
FirebaseMessaging.instance.getToken().then((value) {
print(value);
});
FirebaseMessaging.onMessage.listen((event) {
print(event.notification.title);
widget.title = event.notification.title;
setState(() {});
});
}
#override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Firebase message'),
),
body: Center(
child: Text(widget.title),
),
);
}
}
This is my error
D/FLTFireMsgReceiver(28007): broadcast received for message
W/om.example.try(28007): Accessing hidden method Landroid/os/WorkSource;->add(I)Z (greylist,test-api, reflection, allowed)
W/om.example.try(28007): Accessing hidden method Landroid/os/WorkSource;->add(ILjava/lang/String;)Z (greylist,test-api, reflection, allowed)
W/om.example.try(28007): Accessing hidden method Landroid/os/WorkSource;->get(I)I (greylist, reflection, allowed)
W/om.example.try(28007): Accessing hidden method Landroid/os/WorkSource;->getName(I)Ljava/lang/String; (greylist, reflection, allowed)
D/AndroidRuntime(28007): Shutting down VM
E/AndroidRuntime(28007): FATAL EXCEPTION: main
E/AndroidRuntime(28007): Process: com.example.try2, PID: 28007
E/AndroidRuntime(28007): java.lang.RuntimeException: Unable to create service com.example.try2.java.MyFirebaseMessagingService: java.lang.ClassNotFoundException: Didn't find class "com.example.try2.java.MyFirebaseMessagingService" on path: DexPathList[[zip file "/data/app/~~miA_E951nYH_yhkMq_5LQw==/com.example.try2-KPYqGUQO218syRAWeGkXrw==/base.apk"],nativeLibraryDirectories=[/data/app/~~miA_E951nYH_yhkMq_5LQw==/com.example.try2-KPYqGUQO218syRAWeGkXrw==/lib/arm64, /data/app/~~miA_E951nYH_yhkMq_5LQw==/com.example.try2-KPYqGUQO218syRAWeGkXrw==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64, /product/lib64]]
E/AndroidRuntime(28007): at android.app.ActivityThread.handleCreateService(ActivityThread.java:4198)
E/AndroidRuntime(28007): at android.app.ActivityThread.access$1500(ActivityThread.java:237)
E/AndroidRuntime(28007): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
E/AndroidRuntime(28007): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(28007): at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime(28007): at android.app.ActivityThread.main(ActivityThread.java:7664)
E/AndroidRuntime(28007): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(28007): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime(28007): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/AndroidRuntime(28007): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.try2.java.MyFirebaseMessagingService" on path: DexPathList[[zip file "/data/app/~~miA_E951nYH_yhkMq_5LQw==/com.example.try2-KPYqGUQO218syRAWeGkXrw==/base.apk"],nativeLibraryDirectories=[/data/app/~~miA_E951nYH_yhkMq_5LQw==/com.example.try2-KPYqGUQO218syRAWeGkXrw==/lib/arm64, /data/app/~~miA_E951nYH_yhkMq_5LQw==/com.example.try2-KPYqGUQO218syRAWeGkXrw==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64, /product/lib64]]
E/AndroidRuntime(28007): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
E/AndroidRuntime(28007): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(28007): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime(28007): at android.app.AppComponentFactory.instantiateService(AppComponentFactory.java:129)
E/AndroidRuntime(28007): at androidx.core.app.CoreComponentFactory.instantiateService(CoreComponentFactory.java:66)
E/AndroidRuntime(28007): at android.app.ActivityThread.handleCreateService(ActivityThread.java:4177)
E/AndroidRuntime(28007): ... 8 more
I/Process (28007): Sending signal. PID: 28007 SIG: 9
Lost connection to device.
I have a Flutter project which has very simple functionality it basically has an AppBar and a WebView Here is the link for this dependency
Here is what I have so far
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
void main() => runApp(Almahdyoon());
class Almahdyoon extends StatelessWidget {
const Almahdyoon({Key key}) : super(key: key);
#override
Widget build(BuildContext context) {
WebViewController _controller;
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text("Almahdyoon"),
),
body: Container(
child: PageView(
children: <Widget>[
WebView(
initialUrl: 'https://almahdyoon.com',
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (WebViewController webViewController) {
_controller = webViewController;
},
),
],
),
),
),
);
}
}
And this is the Crash Report
W/System.err( 3827): java.lang.ClassCastException: $Proxy0 cannot be cast to android.view.WindowManagerImpl
W/System.err( 3827): at android.view.Window.setWindowManager(Window.java:793)
W/System.err( 3827): at android.view.Window.setWindowManager(Window.java:775)
W/System.err( 3827): at android.app.Dialog.<init>(Dialog.java:207)
W/System.err( 3827): at android.app.AlertDialog.<init>(AlertDialog.java:204)
W/System.err( 3827): at android.app.AlertDialog$Builder.create(AlertDialog.java:1105)
W/System.err( 3827): at qy.<init>(PG:6)
W/System.err( 3827): at org.chromium.content.browser.input.SelectPopup.show(PG:12)
W/System.err( 3827): at android.os.MessageQueue.nativePollOnce(Native Method)
W/System.err( 3827): at android.os.MessageQueue.next(MessageQueue.java:335)
W/System.err( 3827): at android.os.Looper.loop(Looper.java:176)
W/System.err( 3827): at android.app.ActivityThread.main(ActivityThread.java:7506)
W/System.err( 3827): at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 3827): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
W/System.err( 3827): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:956)
F/chromium( 3827): [FATAL:jni_android.cc(249)] Please include Java exception stack in crash report
F/libc ( 3827): Fatal signal 5 (SIGTRAP), code -6 (SI_TKILL) in tid 3827 (mple.almahdyoon), pid 3827 (mple.almahdyoon)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sdk_gphone_x86/generic_x86_arm:R/RPP1.200123.019/6239754:userdebug/dev-keys'
Revision: '0'
ABI: 'x86'
Timestamp: 2020-04-29 08:38:56+0300
pid: 3827, tid: 3827, name: mple.almahdyoon >>> com.example.almahdyoon <<<
uid: 10159
signal 5 (SIGTRAP), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:jni_android.cc(249)] Please include Java exception stack in crash report
'
eax 00000000 ebx ca629aa8 ecx 00000081 edx 7fffffff
edi ffd23110 esi ec4596c4
ebp ffd23590 esp ffd23110 eip c62ee3ff
backtrace:
#00 pc 008493ff /product/app/TrichromeLibrary/TrichromeLibrary.apk!libmonochrome.so (offset 0x665000) (BuildId: d06485c6257dc0307dac1d873bb515827815a934)
Lost connection to device.
Exited (sigterm)
Can you help me solve this in Flutter? I saw articles on how to solve this in Android/Java but haven't in Flutter
I had this problem when using the AVD emulator. The solution is to be able to use the emulator again by wipe data via the menu AVD Manager > Actions > Wipe Data
My app is experiencing the crash below:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: tech.vgts.lmes, PID: 4228
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
at java.lang.Class.forName(Class.java:378)
at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common##17.0.0:78)
at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common##17.0.0:71)
at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common##17.0.0:468)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common##17.0.0:354)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common##17.0.0:321)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common##17.0.0:305)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common##17.0.0:53)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common##17.0.0:47)
at android.app.ActivityThread.installProvider(ActivityThread.java:6239)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5805)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5722)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.ClassNotFoundException: com.google.firebase.auth.internal.InternalAuthProvider
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
at java.lang.Class.forName(Class.java:378)
at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common##17.0.0:78)
at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common##17.0.0:71)
at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common##17.0.0:468)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common##17.0.0:354)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common##17.0.0:321)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common##17.0.0:305)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common##17.0.0:53)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common##17.0.0:47)
at android.app.ActivityThread.installProvider(ActivityThread.java:6239)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5805)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5722)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/internal/InternalTokenProvider;
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
at java.lang.Class.forName(Class.java:378)
at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common##17.0.0:78)
at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common##17.0.0:71)
at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common##17.0.0:468)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common##17.0.0:354)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common##17.0.0:321)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common##17.0.0:305)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common##17.0.0:53)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common##17.0.0:47)
at android.app.ActivityThread.installProvider(ActivityThread.java:6239)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5805)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5722)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
I changed my dependency from:
firebase_auth:
to:
firebase_auth: 0.11.1