Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

[Bug] Android App only runs the first time #56

Closed
apead opened this issue Oct 23, 2017 · 17 comments
Closed

[Bug] Android App only runs the first time #56

apead opened this issue Oct 23, 2017 · 17 comments
Milestone

Comments

@apead
Copy link

apead commented Oct 23, 2017

The app works once. On re-opening the app receive "Microsoft MVP has stopped".

Most likely related to the Auth token, as if I sign out before closing the app, I am able to run the app a second time (and follow the complete login process again).

@apead apead changed the title Android App only runs the first time [Bug] Android App only runs the first time Oct 23, 2017
@jamesmontemagno
Copy link
Member

Do you see the "refreshing" token on the screen?

@apead
Copy link
Author

apead commented Oct 23, 2017

Doesn't get that far. Splash Screen -> "Microsoft MVP has stopped".

If there's a "Sign Out" before closing the app, then the app starts fine and goes to "Login" screen.

@apead
Copy link
Author

apead commented Oct 23, 2017

Tried another device and it works on second run and logs in. Android 7.1.1

Issue is repeatable on an Oreo 8.0 device.

@jamesmontemagno
Copy link
Member

What device is it?

@apead
Copy link
Author

apead commented Oct 23, 2017

Device is a Nexus 5X

@jamesmontemagno
Copy link
Member

Also if you can get a logcat that would be great!

@jamesmontemagno
Copy link
Member

Hmmmm and it is full 8.0 or a preview? I will try on an emulator and see if I can reproduce.

@apead
Copy link
Author

apead commented Oct 23, 2017

Official 8.0.0 Security Patch Level: 5 October 2017. Will gather a logcat.

@apead
Copy link
Author

apead commented Oct 31, 2017

Should have a chance to investigate further today.

@jamesmontemagno jamesmontemagno added this to the v1 milestone Nov 2, 2017
@jamesmontemagno
Copy link
Member

I was unable to reproduce this on the emulator today :(

@apead
Copy link
Author

apead commented Nov 2, 2017

Aah sorry got busy. Let me see what I can find on this device.

@apead
Copy link
Author

apead commented Nov 2, 2017

Looks like it's having a problem parsing the date.

11-02 21:10:23.223: I/ActivityManager(3551): START u0 {cmp=com.microsoft.mvp/md5584215f15ed8e93f0dfef8d45e290dc2.MainActivity} from uid 10390
11-02 21:10:23.960: A/MobileCenter(30505): Mobile Center SDK configured successfully.
11-02 21:10:24.024: I/MonoDroid(30505): UNHANDLED EXCEPTION:
11-02 21:10:24.039: I/MonoDroid(30505): System.FormatException: String was not recognized as a valid DateTime.
11-02 21:10:24.039: I/MonoDroid(30505): at System.DateTimeParse.Parse (System.String s, System.Globalization.DateTimeFormatInfo dtfi, System.Globalization.DateTimeStyles styles) [0x00029] in <367770f04baf4d97ba4a464908816274>:0
11-02 21:10:24.039: I/MonoDroid(30505): at System.DateTime.Parse (System.String s, System.IFormatProvider provider) [0x00007] in <367770f04baf4d97ba4a464908816274>:0
11-02 21:10:24.039: I/MonoDroid(30505): at System.Convert.ToDateTime (System.String value, System.IFormatProvider provider) [0x0000b] in <367770f04baf4d97ba4a464908816274>:0
11-02 21:10:24.039: I/MonoDroid(30505): at Microsoft.Mvp.ViewModels.LogOnViewModel.get_IsLoggedIn () [0x00046] in :0
11-02 21:10:24.039: I/MonoDroid(30505): at Microsoft.Mvpui.App..ctor () [0x000bc] in :0
11-02 21:10:24.039: I/MonoDroid(30505): at Microsoft.Mvp.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00027] in <4fc2ec3e041c4b829fec8517133fbebb>:0
11-02 21:10:24.039: I/MonoDroid(30505): at Android.Support.V4.App.FragmentActivity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x0000f] in <1e89c43d3c7d48b5ba69bfc0b1bdf114>:0
11-02 21:10:24.039: I/MonoDroid(30505): at (wrapper dynamic-method) System.Object:760524c8-05f2-46ef-b024-4edfbe94d611 (intptr,intptr,intptr)
11-02 21:10:24.094: D/ClClient(24598): Not sending keepalive. Current connection state=STOPPED
11-02 21:10:24.149: W/zygote64(30505): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
11-02 21:10:24.151: D/AndroidRuntime(30505): Shutting down VM
11-02 21:10:24.151: E/AndroidRuntime(30505): FATAL EXCEPTION: main
11-02 21:10:24.151: E/AndroidRuntime(30505): Process: com.microsoft.mvp, PID: 30505
11-02 21:10:24.151: E/AndroidRuntime(30505): android.runtime.JavaProxyThrowable: System.FormatException: String was not recognized as a valid DateTime.
11-02 21:10:24.151: E/AndroidRuntime(30505): at System.DateTimeParse.Parse (System.String s, System.Globalization.DateTimeFormatInfo dtfi, System.Globalization.DateTimeStyles styles) [0x00029] in <367770f04baf4d97ba4a464908816274>:0
11-02 21:10:24.151: E/AndroidRuntime(30505): at System.DateTime.Parse (System.String s, System.IFormatProvider provider) [0x00007] in <367770f04baf4d97ba4a464908816274>:0
11-02 21:10:24.151: E/AndroidRuntime(30505): at System.Convert.ToDateTime (System.String value, System.IFormatProvider provider) [0x0000b] in <367770f04baf4d97ba4a464908816274>:0
11-02 21:10:24.151: E/AndroidRuntime(30505): at Microsoft.Mvp.ViewModels.LogOnViewModel.get_IsLoggedIn () [0x00046] in :0
11-02 21:10:24.151: E/AndroidRuntime(30505): at Microsoft.Mvpui.App..ctor () [0x000bc] in :0
11-02 21:10:24.151: E/AndroidRuntime(30505): at Microsoft.Mvp.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00027] in <4fc2ec3e041c4b829fec8517133fbebb>:0
11-02 21:10:24.151: E/AndroidRuntime(30505): at Android.Support.V4.App.FragmentActivity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x0000f] in <1e89c43d3c7d48b5ba69bfc0b1bdf114>:0
11-02 21:10:24.151: E/AndroidRuntime(30505): at (wrapper dynamic-method) System.Object:760524c8-05f2-46ef-b024-4edfbe94d611 (intptr,intptr,intptr)
11-02 21:10:24.151: E/AndroidRuntime(30505): at md5584215f15ed8e93f0dfef8d45e290dc2.MainActivity.n_onCreate(Native Method)
11-02 21:10:24.151: E/AndroidRuntime(30505): at md5584215f15ed8e93f0dfef8d45e290dc2.MainActivity.onCreate(MainActivity.java:30)
11-02 21:10:24.151: E/AndroidRuntime(30505): at android.app.Activity.performCreate(Activity.java:6975)
11-02 21:10:24.151: E/AndroidRuntime(30505): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
11-02 21:10:24.151: E/AndroidRuntime(30505): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
11-02 21:10:24.151: E/AndroidRuntime(30505): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
11-02 21:10:24.151: E/AndroidRuntime(30505): at android.app.ActivityThread.-wrap11(Unknown Source:0)
11-02 21:10:24.151: E/AndroidRuntime(30505): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
11-02 21:10:24.151: E/AndroidRuntime(30505): at android.os.Handler.dispatchMessage(Handler.java:105)
11-02 21:10:24.151: E/AndroidRuntime(30505): at android.os.Looper.loop(Looper.java:164)
11-02 21:10:24.151: E/AndroidRuntime(30505): at android.app.ActivityThread.main(ActivityThread.java:6541)
11-02 21:10:24.151: E/AndroidRuntime(30505): at java.lang.reflect.Method.invoke(Native Method)
11-02 21:10:24.151: E/AndroidRuntime(30505): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
11-02 21:10:24.151: E/AndroidRuntime(30505): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
11-02 21:10:24.159: W/ActivityManager(3551): Force finishing activity com.microsoft.mvp/md5584215f15ed8e93f0dfef8d45e290dc2.MainActivity

@apead
Copy link
Author

apead commented Nov 2, 2017

Changing from English (UK) to English (US) makes the app start.

@jamesmontemagno
Copy link
Member

Interesting.... <3 cools
Good catch!!!

@jamesmontemagno
Copy link
Member

Pushing out new build, i think i fixed it.

@apead
Copy link
Author

apead commented Nov 3, 2017

Version 1.1 (65) Nov 3 2017 starts up consistently with English (UK) set.

@apead apead closed this as completed Nov 3, 2017
@jamesmontemagno
Copy link
Member

YAY!!!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants