ZXing.Mobile.Forms Crashing with UNHANDED EXCEPTION - xamarin.forms

I am using the ZXing.Mobile.Forms Scanning Libary and I am getting the following error
The strange thing is its works for scans in a row but on the fourth scan it boms out
09-28 15:37:59.887 E/mono-rt ( 8983): [ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.RuntimeException: getParameters failed (empty parameters)
09-28 15:37:59.887 E/mono-rt ( 8983): [ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.RuntimeException: getParameters failed (empty parameters)
09-28 15:37:59.887 E/mono-rt ( 8983): at Java.Interop.JniEnvironment+InstanceMethods.CallObjectMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00069] in <f13ae3cb9fcf47aa8f3adccd03288827>:0
09-28 15:37:59.887 E/mono-rt ( 8983): at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in <f13ae3cb9fcf47aa8f3adccd03288827>:0
09-28 15:37:59.887 E/mono-rt ( 8983): at Android.Hardware.Camera.GetParameters () [0x0000a] in <3d3cf2a3639e4422aea8bb417e71ff8d>:0
09-28 15:37:59.887 E/mono-rt ( 8983): at ZXing.Mobile.CameraAccess.CameraController.ApplyCameraSettings () [0x00033] in <819b29aa6d91462699e19a679be55a44>:0
09-28 15:37:59.887 E/mono-rt ( 8983): at ZXing.Mobile.CameraAccess.CameraController.RefreshCamera () [0x00010] in <819b29aa6d91462699e19a679be55a44>:0
09-28 15:37:59.887 E/mono-rt ( 8983): at ZXing.Mobile.CameraAccess.CameraAnalyzer.RefreshCamera () [0x00001] in <819b29aa6d91462699e19a679be55a44>:0
09-28 15:37:59.887 E/mono-rt ( 8983): at ZXing.Mobile.ZXingSurfaceView.OnWindowFocusChanged (System.Boolean hasWindowFocus) [0x0008f] in <819b29aa6d91462699e19a679be55a44>:0
09-28 15:37:59.887 E/mono-rt ( 8983): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.41(intptr,intptr)
09-28 15:37:59.887 E/mono-rt ( 8983): at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.41(intptr,intptr)
09-28 15:37:59.887 E/mono-rt ( 8983): --- End of stack trace from previous location where exception was thrown ---
09-28 15:37:59.887 E/mono-rt ( 8983):
I am using the following to capture the scan on button click and this does work but only for the first 3 scanns.
public string BarCode { get; set; }
var scanPage = new ZXingScannerPage();
scanPage.ToggleTorch();
await Navigation.PushAsync(scanPage);
scanPage.OnScanResult += (result) =>
{
// Stop scanning
scanPage.IsScanning = false;
// Pop the page and show the result
Device.BeginInvokeOnMainThread(async () =>
{
await Navigation.PopAsync();
BarCode = result.Text;
}
//I call my save function here.
StockTakeTransaction stockTake = new StockTakeTransaction();
stockTake.StockTakeCountSheetItemId = item.StocktakeCountShtItemID;
stockTake.Quantity = 1;
stockTake.MobileDeviceCode = settings.DeviceID.ToString();
stockTake.WarehouseId = WarehouseId;
stockTake.MobileDeviceUser = settings.UserName.ToString();
transferList.Add(stockTake);
SaveFunction(sender, e, stockTake);
}
The save function here is called from the above method
private async void SaveFunction(object sender, EventArgs e, StockTakeTransaction StockTakeitem)
{
Device.BeginInvokeOnMainThread(async () => {
BtnScanStockTakeItem_Clicked(sender, e); });
}
I do some postback to api which works so I am not keeping it here
I then click the btn for a scan again. It's quite odd that its happening like this was QA testing that picked it up

Related

Flutter compare num with dynamic from Firebase

I want to compare the App's version manually through Firebase Firestore. In Firestore, I have a collection(system) with a document(update) with a field: newest_v_app = number 7. I want to access this field on a page in my app and want to compare it to a number. If the number in firestore is higher than the number in the app, I want a bool to set to true.
The Code I tried (to explain what I mean):
UpdatePage.dart
class UpdatePage extends StatefulWidget {
#override
_UpdatePageState createState() => _UpdatePageState();
}
class _UpdatePageState extends State<UpdatePage> {
bool update_available = false;
num current_version = 7;
dynamic newest_version_from_firebase = 7;
Future<dynamic> _getUpdateAvailable() async {
final DocumentReference document = FirebaseFirestore.instance.collection('system').doc('update');
print('Success GetUpdate 1');
await document.get().then<dynamic>((DocumentSnapshot snapshot) async {
setState(() {
newest_version_from_firebase = snapshot.data;
});
});
print('Success GetUpdate 2');
compareUpdate(context);
print('Success GetUpdate 3');
testUpdateComparer();
}
void compareUpdate(BuildContext context) {
if (newest_version_from_firebase > current_version) {
setState(() {
update_available = true;
});
} else {
setState(() {
update_available = false;
});
}
}
void testUpdateComparer() {
if (update_available == true) {
print('Success AvailableBool');
} else {
print('No AvailableBool');
}
}
#override
void initState() {
super.initState();
print('Success Init');
_getUpdateAvailable();
}
#override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
]);
return Scaffold(
);
}
}
Console & Error:
I/flutter (15814): Success Init
I/flutter (15814): Success GetUpdate 1
W/DynamiteModule(15814): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(15814): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(15814): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
I/flutter (15814): Success GetUpdate 2
I/flutter (15814): No AvailableBool
E/flutter (15814): [ERROR:flutter/lib/ui/ui_dart_state.cc(213)] Unhandled Exception: NoSuchMethodError: Closure call with mismatched arguments: function '>'
E/flutter (15814): Receiver: Closure: () => Map<String, dynamic>? from Function 'data':.
E/flutter (15814): Tried calling: >(7)
E/flutter (15814): Found: >() => Map<String, dynamic>?
E/flutter (15814): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:63:5)
E/flutter (15814): #1 _UpdatePageState.compareUpdate (package:myapp/UpdatePage/UpdatePage.dart:44:38)
E/flutter (15814): #2 _UpdatePageState._getUpdateAvailable (package:myapp/UpdatePage/UpdatePage.dart:38:5)
E/flutter (15814): <asynchronous suspension>
E/flutter (15814):
Flutter 2.3.0-17.0.pre.19 • channel master • https://github.com/flutter/flutter.git
Framework • revision bcf05f4587 (4 months ago) • 2021-05-23 02:19:02 -0400
Engine • revision 8cd4cf0a67
Tools • Dart 2.14.0 (build 2.14.0-143.0.dev)
The snapshot.data returns a Map<String, dynamic> from firestore and you're trying to assign it to the variable newest_version_from_firebase that you're trying to use as a number, which is not possible.
snaposhot.data returns a Document in which your have your version number probably stored as a key value pair, like: {"versionNumber": 7}
to access it your should do, for example:
newest_version_from_firebase = snapshot.data["versionNumber"] as int;
Solved it:
Changed num to int
late DocumentSnapshot snapshot;
int current_version = 7;
int newest_version_from_firebase = 7;
void getUpdateAvailable() async {
final data = await FirebaseFirestore.instance.collection("system").doc("update").get() as DocumentSnapshot;
snapshot = data as DocumentSnapshot;
setState(() {
newest_version_from_firebase = snapshot["newest_version"] as int;
});
print(newest_version_from_firebase.toString());
compareUpdate(context);
}

App crashes upon phone authentication after changing package name - Flutter

I wanted to change the package name of my project so I changed the applicationId in build.gradle and in android.xml.
I changed package name using below guide
https://medium.com/#skyblazar.cc/how-to-change-the-package-name-of-your-flutter-app-4529e6e6e6fc
Firebase database was linked with my project so I thought I had to change the package name in Firebase too. So, I added new app in Firebase with UPDATED package name of the project and added SHA key as required. After doing all this I started to test my app. Everything is working fine except phone authentication. Google authentication is working fine.
I don't know why, while phone authentication, I get below error and app get crashed. Build in function FirebaseAuth.instance.verifyPhoneNumber never executed. I'm wondering why?
Error before termination of the app
I/flutter (15570): New user result at the end before await: null
E/zzf (15570): Problem retrieving SafetyNet Token: 7:
W/ActivityThread(15570): handleWindowVisibility: no activity for token android.os.BinderProxy#7518a38
D/ViewRootImpl#9a0d0b4[MainActivity](15570): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager(15570): prepareNavigationBarInfo() DecorView#b62e3fa[MainActivity]
D/InputMethodManager(15570): getNavigationBarColor() -855310
I/DecorView(15570): createDecorCaptionView >> DecorView#1ec25a[], isFloating: false, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: true
W/System (15570): Ignoring header X-Firebase-Locale because its value was null.
I/System.out(15570): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(15570): (HTTPLog)-Static: isSBSettingEnabled false
D/InputTransport(15570): Input channel constructed: fd=97
D/ViewRootImpl#141d474[RecaptchaActivity](15570): setView = DecorView#1ec25a[RecaptchaActivity] TM=true MM=false
D/ViewRootImpl#141d474[RecaptchaActivity](15570): dispatchAttachedToWindow
D/ViewRootImpl#141d474[RecaptchaActivity](15570): Relayout returned: old=[0,0][1080,2220] new=[0,0][1080,2220] result=0x7 surface={valid=true 545211748352} changed=true
D/OpenGLRenderer(15570): eglCreateWindowSurface = 0x7efbe16f80, 0x7ef1271010
D/ViewRootImpl#141d474[RecaptchaActivity](15570): MSG_RESIZED: frame=Rect(0, 0 - 1080, 2220) ci=Rect(0, 63 - 0, 0) vi=Rect(0, 63 - 0, 0) or=1
D/InputTransport(15570): Input channel destroyed: fd=132
D/AndroidRuntime(15570): Shutting down VM
E/AndroidRuntime(15570): FATAL EXCEPTION: main
E/AndroidRuntime(15570): Process: com.xxxxx.xxxxx, PID: 15570
E/AndroidRuntime(15570): java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/browser/customtabs/CustomTabsIntent$Builder;
E/AndroidRuntime(15570): at com.google.firebase.auth.internal.RecaptchaActivity.zza(com.google.firebase:firebase-auth##20.0.1:13)
E/AndroidRuntime(15570): at com.google.android.gms.internal.firebase-auth-api.zzth.zzb(com.google.firebase:firebase-auth##20.0.1:7)
E/AndroidRuntime(15570): at com.google.android.gms.internal.firebase-auth-api.zzth.onPostExecute(Unknown Source:2)
E/AndroidRuntime(15570): at android.os.AsyncTask.finish(AsyncTask.java:695)
E/AndroidRuntime(15570): at android.os.AsyncTask.access$600(AsyncTask.java:180)
E/AndroidRuntime(15570): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
E/AndroidRuntime(15570): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(15570): at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime(15570): at android.app.ActivityThread.main(ActivityThread.java:7073)
E/AndroidRuntime(15570): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(15570): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
E/AndroidRuntime(15570): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
E/AndroidRuntime(15570): Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.browser.customtabs.CustomTabsIntent$Builder" on path: DexPathList[[zip file "/data/app/com.storeifie.storeify-DOxHXgyJA9JAe6BK8YeeWA==/base.apk"],nativeLibraryDirectories=[/data/app/com.storeifie.storeify-DOxHXgyJA9JAe6BK8YeeWA==/lib/arm64, /data/app/com.storeifie.storeify-DOxHXgyJA9JAe6BK8YeeWA==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
E/AndroidRuntime(15570): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
E/AndroidRuntime(15570): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(15570): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime(15570): ... 12 more
I/Process (15570): Sending signal. PID: 15570 SIG: 9
Lost connection to device.
Exited (sigterm)
Below is the code snippet of verifyPhone function.
In below code snippet await FirebaseAuth.instance.verifyPhoneNumber never ran.
verificationComplete and smsCodeSent never got executed. I'm wondering why? It was working fine before changing package name
Future<dynamic> verifyPhone(phoneNo, BuildContext context) async {
var completer = Completer<dynamic>();
dynamic newUserResult;
Future<String> getOTPresult() async {
print("Dialog shown");
await showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
builder: (context) => Container(
height: 270,
child: OTPBottomSheet(controller: _otpController),
),
);
return _otpController.text;
}
// >>>>>>>>>>>>> On Complete
final PhoneVerificationCompleted verificationComplete =
(AuthCredential authCred) async {
print(" I N S I D E C O M P L E T E ");
newUserResult = await signInWithPhoneNumber(authCred);
completer.complete(newUserResult);
};
// >>>>>>>>>>>>> On Timeout
final PhoneCodeAutoRetrievalTimeout autoRetrieve = (String verID) {
print("\n2. Auto retrieval time out");
completer.complete(newUserResult);
};
// >>>>>>>>>>>>> On manual code verification
final PhoneCodeSent smsCodeSent =
(String verID, [int forceCodeResend]) async {
print(" I N S I D E C O D E S E N T");
var OTPDialogResult = await getOTPresult();
if (OTPDialogResult != null) {
AuthCredential authCred = PhoneAuthProvider.credential(
verificationId: verID, smsCode: OTPDialogResult);
newUserResult = AuthService().signInWithPhoneNumber(authCred);
if (!completer.isCompleted) {
completer.complete(newUserResult);
}
}
};
// >>>>>>>>>>>>> On Ver failed
final PhoneVerificationFailed verificationFailed =
(Exception authException) {
completer.complete(newUserResult);
};
await FirebaseAuth.instance
.verifyPhoneNumber(
phoneNumber: phoneNo,
timeout: Duration(seconds: 50),
verificationCompleted: verificationComplete,
verificationFailed: verificationFailed,
codeSent: smsCodeSent,
codeAutoRetrievalTimeout: autoRetrieve,
).catchError((error) {
print(error.toString());
});
print("New user result at the end before await: " + newUserResult.toString());
newUserResult = await completer.future;
print("New user result at the end after await: " + newUserResult.toString());
return newUserResult;
}
signInWithPhoneNumber function
Future signInWithPhoneNumber(AuthCredential authCreds) async {
try {
UserCredential result = await FirebaseAuth.instance.signInWithCredential(authCreds);
User customUser = result.user;
return _userFormFirebaseUser(customUser).getuid;
}
CustData _userFormFirebaseUser(User user) {
print("----> Inside _userFormFirebaseUser and user ID: " + user.uid);
return user != null
? CustData(
custId: user.uid,
)
: null;
}
// --- CustData model class
class CustData {
String custId;
String custName;
String custPhNo;
String custContactNO;
DateTime custDateOfBirth;
Map<String, dynamic> address;
String cartID;
CustData({
this.custId,
this.custName,
this.custPhNo,
this.custDateOfBirth,
this.address,
this.cartID,
this.custContactNO,
});
CustData.initial() : custId = '';
String get getuid => this.custId;
}
I solved the problem by simply adding below line into app/build.gradle dependencies.
implementation "androidx.browser:browser:1.2.0"

How to delete specific data from firebase

I'm trying to implement a function that deletes specific data (based on id) from the server.
My function looks like this:
Future<bool> deleteData(int index) {
_data.removeAt(index);
notifyListeners();
return http
.delete(
'https://*my address*/${_data[index].id}.json')
.then((http.Response response) {
return true;
}).catchError((error) {
print(error);
return false;
});
}
The data is deleted locally, but not deleted on the server.
Instead I get this error:
I/flutter ( 5517): ══╡ EXCEPTION CAUGHT BY GESTURE
╞═══════════════════════════════════════════════════════════════════
I/flutter ( 5517): The following RangeError was thrown while handling
a gesture: I/flutter ( 5517): RangeError (index): Invalid value: Valid
value range is empty: 0
I found a solution to my problem -
Future<bool> deleteData(int index) {
selectedDataId = _data[index].id //new line
_data.removeAt(index);
notifyListeners();
return http
.delete(
'https://*my address*/${selectedDataId}.json')
.then((http.Response response) {
return true;
}).catchError((error) {
print(error);
return false;
});
}
Because i deleted my data locally, i needed to stroe it before in var and then use this var

Using parse.netstandard2

I have a Xamarin application with Visual Studio 2017 for Android. I have added Parse.NETStandard2 version 2.0.0 to the main app.
I have another .NET core app that uses Parse 1.7, all the below works on the .NET core version.
If I add the standard Parse to the Xamarin code it complains that not NET Standard 2 compatable which is why I switch to the other version of Parse.
Question: Any idea why it can't find the entry point? Note the ParseClient is not throwing an error.
Xamarin version:
I added the following to the main App to initialize the parse connection:
ParseClient.Initialize(new ParseClient.Configuration
{
ApplicationId = "...",
WindowsKey = "...",
Server = #"http://...:80/parse/"
});
When I run this code:
try
{
var q = ParseObject.GetQuery("Category");
var t = q.FirstOrDefaultAsync();
t.Wait();
System.Diagnostics.Debug.WriteLine(t.Result);
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex);
}
I get this error:
[0:] System.AggregateException: One or more errors occurred. ---> System.EntryPointNotFoundException: GetModuleFileName
at (wrapper managed-to-native) StandardStorage.StorageUtilities.GetModuleFileName(System.Runtime.InteropServices.HandleRef,System.Text.StringBuilder,int)
at StandardStorage.StorageUtilities.GetModuleFileNameLongPath (System.Runtime.InteropServices.HandleRef hModule) [0x00042] in <492e9128255c4fa2885761586862f4f3>:0
at StandardStorage.StorageUtilities.get_ExecutablePath () [0x00021] in <492e9128255c4fa2885761586862f4f3>:0
at StandardStorage.StorageUtilities.GetAppFileVersionInfo () [0x00046] in <492e9128255c4fa2885761586862f4f3>:0
at StandardStorage.StorageUtilities.get_CompanyName () [0x00042] in <492e9128255c4fa2885761586862f4f3>:0
at StandardStorage.StorageUtilities.GetAppSpecificStoragePathFromBasePath (System.String basePath) [0x00000] in <492e9128255c4fa2885761586862f4f3>:0
at StandardStorage.FileSystem.get_LocalStorage () [0x00007] in <492e9128255c4fa2885761586862f4f3>:0
at Parse.Common.Internal.StorageController+<>c.<.ctor>b__5_1 (System.Threading.Tasks.Task _) [0x00006] in <bafb02353d284fa488514259b803efcb>:0
at System.Threading.Tasks.ContinuationResultTaskFromTask`1[TResult].InnerInvoke () [0x00024] in <fe08c003e91342eb83df1ca48302ddbb>:0
at System.Threading.Tasks.Task.Execute () [0x00000] in <fe08c003e91342eb83df1ca48302ddbb>:0
--- End of stack trace from previous location where exception was thrown ---
at Parse.Common.Internal.InternalExtensions+<>c__DisplayClass7_0`1[TResult].<OnSuccess>b__0 (System.Threading.Tasks.Task t) [0x0003c] in <bafb02353d284fa488514259b803efcb>:0
at System.Threading.Tasks.ContinuationResultTaskFromTask`1[TResult].InnerInvoke () [0x00024] in <fe08c003e91342eb83df1ca48302ddbb>:0
at System.Threading.Tasks.Task.Execute () [0x00000] in <fe08c003e91342eb83df1ca48302ddbb>:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <fe08c003e91342eb83df1ca48302ddbb>:0
at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in <fe08c003e91342eb83df1ca48302ddbb>:0
at System.Threading.Tasks.Task.Wait () [0x00000] in <fe08c003e91342eb83df1ca48302ddbb>:0
at Parse.ParseUser.get_CurrentUser () [0x00007] in <bafb02353d284fa488514259b803efcb>:0
at Parse.ParseQuery`1[T].FirstOrDefaultAsync (System.Threading.CancellationToken cancellationToken) [0x0000d] in <bafb02353d284fa488514259b803efcb>:0
at Parse.ParseQuery`1[T].FirstOrDefaultAsync () [0x00006] in <bafb02353d284fa488514259b803efcb>:0
at TheBabyQuoteApp.Views.MainPage..ctor () [0x0001b] in D:\WebSites\TheBabyQuote_Projects\TheBabyQuoteApp\TheBabyQuoteApp\TheBabyQuoteApp\Views\MainPage.xaml.cs:22
---> (Inner Exception #0) System.EntryPointNotFoundException: GetModuleFileName
at (wrapper managed-to-native) StandardStorage.StorageUtilities.GetModuleFileName(System.Runtime.InteropServices.HandleRef,System.Text.StringBuilder,int)
at StandardStorage.StorageUtilities.GetModuleFileNameLongPath (System.Runtime.InteropServices.HandleRef hModule) [0x00042] in <492e9128255c4fa2885761586862f4f3>:0
at StandardStorage.StorageUtilities.get_ExecutablePath () [0x00021] in <492e9128255c4fa2885761586862f4f3>:0
at StandardStorage.StorageUtilities.GetAppFileVersionInfo () [0x00046] in <492e9128255c4fa2885761586862f4f3>:0
at StandardStorage.StorageUtilities.get_CompanyName () [0x00042] in <492e9128255c4fa2885761586862f4f3>:0
at StandardStorage.StorageUtilities.GetAppSpecificStoragePathFromBasePath (System.String basePath) [0x00000] in <492e9128255c4fa2885761586862f4f3>:0
at StandardStorage.FileSystem.get_LocalStorage () [0x00007] in <492e9128255c4fa2885761586862f4f3>:0
at Parse.Common.Internal.StorageController+<>c.<.ctor>b__5_1 (System.Threading.Tasks.Task _) [0x00006] in <bafb02353d284fa488514259b803efcb>:0
at System.Threading.Tasks.ContinuationResultTaskFromTask`1[TResult].InnerInvoke () [0x00024] in <fe08c003e91342eb83df1ca48302ddbb>:0
at System.Threading.Tasks.Task.Execute () [0x00000] in <fe08c003e91342eb83df1ca48302ddbb>:0
--- End of stack trace from previous location where exception was thrown ---
at Parse.Common.Internal.InternalExtensions+<>c__DisplayClass7_0`1[TResult].<OnSuccess>b__0 (System.Threading.Tasks.Task t) [0x0003c] in <bafb02353d284fa488514259b803efcb>:0
at System.Threading.Tasks.ContinuationResultTaskFromTask`1[TResult].InnerInvoke () [0x00024] in <fe08c003e91342eb83df1ca48302ddbb>:0
at System.Threading.Tasks.Task.Execute () [0x00000] in <fe08c003e91342eb83df1ca48302ddbb>:0 <---
Error if I add Parse 1.7.0 to the Xamarin app:
Warning NU1701 Package 'Parse 1.7.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

Xamarin caused by: Android.Views.WindowManagerBadTokenException

I received that exception in my Xamarin.Forms App (Android, HTC Desire 510) on OS Android: 4.1.2but it's not very expressive and I don't know where to start investigation:
Xamarin caused by: Android.Views.WindowManagerBadTokenException:
Unable to add window -- token android.os.BinderProxy#4174fee8 is not
valid; is your activity running? at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
[0x0000c] in :0 at
Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod
(Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo
method, Java.Interop.JniArgumentValue* args) [0x00084] in
:0 at
Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod
(System.String encodedMember, Java.Interop.IJavaPeerable self,
Java.Interop.JniArgumentValue* parameters) [0x0002f] in
:0 at Android.App.Dialog.Show ()
[0x0000a] in <79e6945a2f4a4e2f844e36c860dfb012>:0 at
Acr.UserDialogs.UserDialogsImpl+<>c__DisplayClass24_0.b__0 ()
[0x00011] in <435daf83b740428697641f6937603702>:0 at
Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in
<79e6945a2f4a4e2f844e36c860dfb012>:0 at
Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr
native__this) [0x00009] in <79e6945a2f4a4e2f844e36c860dfb012>:0 at
(wrapper dynamic-method)
System.Object:c03c2323-76c4-49c2-96eb-2a4f82e62e78 (intptr,intptr)
Hope someone can point me in the right direction.
Eric

Resources