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());
}
});
}
Related
I have some users who have my production app who crash when he interact with. I have no idea where the problem come from.
Fatal Exception: java.lang.RuntimeException: Internal error in Cloud Firestore (24.2.2).
at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(AsyncQueue.java:1)
at com.google.firebase.firestore.util.-$$Lambda$AsyncQueue$jx84dqgUsF4ojecSMurRqFLFD1Y.run(-.java:1)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8051)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)
Caused by g.c.a.b.h.j: java.lang.RuntimeException: java.lang.ExceptionInInitializerError
at com.google.android.gms.tasks.zzw.getResult(zzw.java:3)
at com.google.firebase.firestore.remote.FirestoreChannel.lambda$runBidiStreamingRpc$0(FirestoreChannel.java:1)
at com.google.firebase.firestore.remote.-$$Lambda$FirestoreChannel$ThFui-hvcsrVGYxlBtcTH5vVbvE.onComplete(-.java:6)
at com.google.android.gms.tasks.zzi.run(zzi.java:21)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(AsyncQueue.java:15)
at java.lang.Thread.run(Thread.java:923)
Caused by java.lang.ExceptionInInitializerError:
at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:1)
at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:2)
at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(GrpcCallProvider.java:2)
at com.google.firebase.firestore.remote.-$$Lambda$GrpcCallProvider$SCD5iiibQ8l4haiO8ofSfE0wIJg.call(-.java:2)
at com.google.android.gms.tasks.zzz.run(zzz.java:4)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java:1)
at com.google.firebase.firestore.util.-$$Lambda$ThrottledForwardingExecutor$MfIJbVuxZtLwosAgPzPA-cU66Ko.run(-.java:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Caused by java.lang.RuntimeException: java.lang.NoSuchMethodException: j.b.I1.values []
at java.lang.Enum.enumValues(Enum.java:270)
at java.lang.Enum.access$000(Enum.java:61)
at java.lang.Enum$1.create(Enum.java:277)
at java.lang.Enum$1.create(Enum.java:275)
at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
at java.lang.Enum.getSharedConstants(Enum.java:289)
at java.lang.Class.getEnumConstantsShared(Class.java:2428)
at java.util.EnumSet.getUniverse(EnumSet.java:407)
at java.util.EnumSet.noneOf(EnumSet.java:109)
at java.util.EnumSet.of(EnumSet.java:235)
at io.grpc.okhttp.OkHttpChannelBuilder.<clinit>(OkHttpChannelBuilder.java:91)
at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:1)
at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:2)
at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(GrpcCallProvider.java:2)
at com.google.firebase.firestore.remote.-$$Lambda$GrpcCallProvider$SCD5iiibQ8l4haiO8ofSfE0wIJg.call(-.java:2)
at com.google.android.gms.tasks.zzz.run(zzz.java:4)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java:1)
at com.google.firebase.firestore.util.-$$Lambda$ThrottledForwardingExecutor$MfIJbVuxZtLwosAgPzPA-cU66Ko.run(-.java:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Caused by java.lang.NoSuchMethodException: j.b.I1.values []
at java.lang.Class.getMethod(Class.java:2072)
at java.lang.Class.getDeclaredMethod(Class.java:2050)
at java.lang.Enum.enumValues(Enum.java:267)
at java.lang.Enum.access$000(Enum.java:61)
at java.lang.Enum$1.create(Enum.java:277)
at java.lang.Enum$1.create(Enum.java:275)
at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
at java.lang.Enum.getSharedConstants(Enum.java:289)
at java.lang.Class.getEnumConstantsShared(Class.java:2428)
at java.util.EnumSet.getUniverse(EnumSet.java:407)
at java.util.EnumSet.noneOf(EnumSet.java:109)
at java.util.EnumSet.of(EnumSet.java:235)
at io.grpc.okhttp.OkHttpChannelBuilder.<clinit>(OkHttpChannelBuilder.java:91)
at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:1)
at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:2)
at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(GrpcCallProvider.java:2)
at com.google.firebase.firestore.remote.-$$Lambda$GrpcCallProvider$SCD5iiibQ8l4haiO8ofSfE0wIJg.call(-.java:2)
at com.google.android.gms.tasks.zzz.run(zzz.java:4)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java:1)
at com.google.firebase.firestore.util.-$$Lambda$ThrottledForwardingExecutor$MfIJbVuxZtLwosAgPzPA-cU66Ko.run(-.java:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
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.
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