Bug 24942 - PushModalAsync() - Android L (5). Modal Not Appearing.
Summary: PushModalAsync() - Android L (5). Modal Not Appearing.
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.3
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-11-30 20:19 UTC by Chris Riesgo
Modified: 2014-12-04 04:16 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Repro Case (69 bytes, text/plain)
2014-11-30 20:21 UTC, Chris Riesgo
Details
Another Sample App (25 bytes, text/plain)
2014-12-01 05:14 UTC, James
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Chris Riesgo 2014-11-30 20:19:45 UTC
As mentioned in this forum post: https://forums.xamarin.com/discussion/28198/pushmodalasync-android-l-5#latest

I've noticed apps have stopped working for devices that have updated to Android 5 (Lollipop).

I've narrowed it down to the Navigation.PushModalAsync() calls. The exception/Stack Trace I'm seeing is..

No known package when getting value for resource number 0xff303030

11-20 10:44:20.730 I/MonoDroid( 2962): UNHANDLED EXCEPTION:
11-20 10:44:20.769 I/MonoDroid( 2962): Android.Content.Res.Resources+NotFoundException: Exception of type 'Android.Content.Res.Resources+NotFoundException' was thrown.
11-20 10:44:20.769 I/MonoDroid( 2962):   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
11-20 10:44:20.769 I/MonoDroid( 2962):   at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (IntPtr jobject, IntPtr jclass, IntPtr jmethod, Android.Runtime.JValue[] parms) [0x00084] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/5474129a/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:896 
11-20 10:44:20.769 I/MonoDroid( 2962):   at Android.Views.View.SetBackgroundResource (Int32 resid) [0x00070] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/5474129a/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.Views.View.cs:14992 
11-20 10:44:20.769 I/MonoDroid( 2962):   at Xamarin.Forms.Platform.Android.Platform.PresentModal (Xamarin.Forms.Page modal) [0x00000] in <filename unknown>:0 
11-20 10:44:20.769 I/MonoDroid( 2962):   at Xamarin.Forms.Platform.Android.Platform+<PushModalAsync>d__e.MoveNext () [0x00000] in <filename unknown>:0
I've updated the nuget packages and the Android sdk tools, not sure what else to try.

It happens for all modal navigation, but NOT non modal, i.e. Navigation.PushAsync() works as expected.
Comment 1 Chris Riesgo 2014-11-30 20:21:18 UTC
Created attachment 8912 [details]
Repro Case

This is a simple reproduction of the issue.
Comment 2 Rajneesh Kumar 2014-12-01 02:14:37 UTC
I have checked this issue but not able to reproduce it. I try to reproduce this issue help and instruction provided in bug description.

Steps I followed:

1. Open attached test (TestLollipopForms) case in XS.
2. Build the app and deploy it on API 21 emulator.
3. Observed that it deploy successfully.
4. Now, deploy it on Android L device.
5. Observed that it deploy successfully.

Screencast(API 21 Emulator): http://www.screencast.com/t/8eoSu2Hpuyz
Build O/P: https://gist.github.com/Rajneesh360Logica/35e56ae115f95be17e6b
Application O/P: https://gist.github.com/Rajneesh360Logica/4b24b713f098dd201097

Screencast(Device): http://www.screencast.com/t/xpM9Ng49wDO
Build O/P: https: https://gist.github.com/Rajneesh360Logica/6e72822162e6e4d50454
Application O/P: https://gist.github.com/Rajneesh360Logica/2bc4530a9e73e12b5753

I observed that I am able to deploy attached test case on device and simulator. Could you please provide us your environment info, steps to reproduce this issue?Or what steps I am missing to reproduce this issue? Also could you please provide us your environment info and IDE logs. That will be very helpful to reproduce this issue at our end.

You can get Ide logs and Environment Info from here:
Env Info: xamarin Studio=>About Xamarin studio=>Show details=>Copy Information
Logs: Help=>Open Log Directory=>Ide.log (choose latest)

XS Logs: http://www.screencast.com/t/xQG8xstfIyBa

Please let me know if I am missing anything?
Environment Info:

=== Xamarin Studio ===

Version 5.5.4 (build 15)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.10.0 ((detached/92c4884)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000031

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.iOS ===

Version: 8.4.0.43 (Business Edition)
Hash: 840a925
Branch: 
Build date: 2014-11-16 21:03:22-0500

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Build Information ===

Release ID: 505040015
Git revision: f93940a35458a18052f1a25e106e62ca970d9c40
Build date: 2014-11-19 15:32:41-05
Xamarin addins: dc23cbd91a3a0e1d326328e1229e86c942a49ec8

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 3 James 2014-12-01 05:14:55 UTC
Created attachment 8917 [details]
Another Sample App

Chris' test app didnt work for me, but i've seen the issue with my own apps.

I've modified his sample, and now on a Nexus 5 device with Lollipop and a Nexus 5 emulator with Lollipop the error occurs. But a Nexus 5 emulator with android 4.4.2 the app works as expected.

Build and deploy the app, run and click the button, the app should navigate you away to a modal page, but on Android 5/Lollipop devices it does not, just throws the previously mentioned error in the output.

Thanks,
James.
Comment 4 Chris Riesgo 2014-12-01 10:08:01 UTC
@Rajneesh -- In your screencast of the API 21 Emulator, I didn't see the modal appear. 

This is how I expect the app to behave:

1. App deploys
2. "Hello Forms!" page should appear
3. OnResume of Activity should trigger a PushModalAsync "Forms Modal" screen -- which does not appear.
Comment 5 Chase Florell 2014-12-01 10:50:10 UTC
I can also confirm the bug. For me, it's when running Android 5.0 (Lollipop) on a Nexus 5.
Comment 6 Jason Smith [MSFT] 2014-12-01 13:42:37 UTC
Should be fixed in the next pre-release