mohak1283/Instagram-Clone

App Crashes when Location Permission is granted

mtwn105 opened this issue · 0 comments

E/AndroidRuntime(26145): FATAL EXCEPTION: AsyncTask #2 E/AndroidRuntime(26145): Process: com.mohak.instagram, PID: 26145 E/AndroidRuntime(26145): java.lang.RuntimeException: An error occurred while executing doInBackground() E/AndroidRuntime(26145): at android.os.AsyncTask$3.done(AsyncTask.java:354) E/AndroidRuntime(26145): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383) E/AndroidRuntime(26145): at java.util.concurrent.FutureTask.setException(FutureTask.java:252) E/AndroidRuntime(26145): at java.util.concurrent.FutureTask.run(FutureTask.java:271) E/AndroidRuntime(26145): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) E/AndroidRuntime(26145): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) E/AndroidRuntime(26145): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) E/AndroidRuntime(26145): at java.lang.Thread.run(Thread.java:764) E/AndroidRuntime(26145): Caused by: java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: AsyncTask #2 E/AndroidRuntime(26145): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:605) E/AndroidRuntime(26145): at io.flutter.embedding.engine.FlutterJNI.invokePlatformMessageResponseCallback(FlutterJNI.java:556) E/AndroidRuntime(26145): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:131) Lost connection to device. E/AndroidRuntime(26145): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:225) E/AndroidRuntime(26145): at com.aloisdeniel.geocoder.GeocoderPlugin$2.doInBackground(GeocoderPlugin.java:109) E/AndroidRuntime(26145): at com.aloisdeniel.geocoder.GeocoderPlugin$2.doInBackground(GeocoderPlugin.java:102) E/AndroidRuntime(26145): at android.os.AsyncTask$2.call(AsyncTask.java:333) E/AndroidRuntime(26145): at java.util.concurrent.FutureTask.run(FutureTask.java:266) E/AndroidRuntime(26145): ... 4 more