Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

Xamarin.Forms java.lang.reflect.InvocationTargetException woes

$
0
0

Hi

So the situation for my application is that when loading my app for the first time, It does a check to see if data has been cached, and if so, can it be used to authenticate correctly with a server. If so, then proceed to the main app content. If Not, then present the Login screen.

The main problem here is that if the app does not have any cached data. When the user logs in and is presented with the main content, If they then click a button to proceed, the app crashes out with a java.lang.reflect.InvocationTargetException. I've been staring at this bug for hours and it's getting ridiculous. Can you help? Am I missing something stupid, because I can't help but wonder if the answer is staring me right in the face.

Here is a more complete error:

Java.Lang.RuntimeException: java.lang.reflect.InvocationTargetException
  at --- End of managed exception stack trace ---
  at java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
  at Caused by: java.lang.reflect.InvocationTargetException
  at at java.lang.reflect.Method.invoke(Native Method)
  at at java.lang.reflect.Method.invoke(Method.java:372)
  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
  at ... 1 more
  at Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object
  at at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <IL 0x00011, 0x00078>
  at at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (object) <IL 0x00006, 0x0006b>
  at Android.App.SyncContext/<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/1780/3518c4ce/source/monodroid/src/Mono.Android/src/Android.App/SyncContext.cs:18
  at Java.Lang.Thread/RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/1780/3518c4ce/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:36
  at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) [0x00009] in /Users/builder/data/lanes/1780/3518c4ce/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Java.Lang.IRunnable.cs:71
  at at (wrapper dynamic-method) object.ce0ecbd7-bb8d-4311-af4e-8ba205c5f40f (intptr,intptr) <IL 0x00011, 0x0004b>
  at at mono.java.lang.RunnableImplementor.n_run(Native Method)
  at at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:29)
  at at android.os.Handler.handleCallback(Handler.java:739)
  at at android.os.Handler.dispatchMessage(Handler.java:95)
  at at android.os.Looper.loop(Looper.java:135)
  at at android.app.ActivityThread.main(ActivityThread.java:5254)
  at ... 4 more

Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>