Bug 55704 - cannot run app using 15.2 preview when using fast deployment (debug)
Summary: cannot run app using 15.2 preview when using fast deployment (debug)
Status: NEEDINFO
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 7.3 (15.2)
Hardware: PC Windows
: --- blocker
Target Milestone: 15.6
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2017-04-27 21:55 UTC by philip
Modified: 2017-09-29 17:39 UTC (History)
4 users (show)

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


Attachments

Description philip 2017-04-27 21:55:48 UTC
# Steps to reproduce
Open app in VS2017 using15.2 preview (this is the same project that was debugging/running properly with 15.0)
If I turn off Fast Deployment the app runs properly again (but it takes forever to launch)

# Expected behavior
Project runs just like in 15.0 even when using fast deployment

# Actual behavior
Crash when running app.  I cannot even stop at a break point at the beginning of the activity, so none of my code is executed.

# Supplemental info (logs, images, videos)
04-27 17:52:01.745 D/AndroidRuntime(11387): Shutting down VM
04-27 17:52:06.991 E/AndroidRuntime(11387): FATAL EXCEPTION: main
04-27 17:52:06.991 E/AndroidRuntime(11387): Process: com.ptdsp.android, PID: 11387
04-27 17:52:06.991 E/AndroidRuntime(11387): java.lang.RuntimeException: Unable to get provider com.facebook.FacebookContentProvider: java.lang.ClassNotFoundException: Didn't find class "com.facebook.FacebookContentProvider" on path: DexPathList[[zip file "/data/app/com.ptdsp.android-1/base.apk"],nativeLibraryDirectories=[/data/app/com.ptdsp.android-1/lib/x86, /data/app/com.ptdsp.android-1/base.apk!/lib/x86, /vendor/lib, /system/lib]]
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at android.app.ActivityThread.installProvider(ActivityThread.java:5156)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at android.app.ActivityThread.-wrap1(ActivityThread.java)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at android.os.Handler.dispatchMessage(Handler.java:102)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at android.os.Looper.loop(Looper.java:148)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at android.app.ActivityThread.main(ActivityThread.java:5417)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at java.lang.reflect.Method.invoke(Native Method)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
04-27 17:52:06.991 E/AndroidRuntime(11387): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.FacebookContentProvider" on path: DexPathList[[zip file "/data/app/com.ptdsp.android-1/base.apk"],nativeLibraryDirectories=[/data/app/com.ptdsp.android-1/lib/x86, /data/app/com.ptdsp.android-1/base.apk!/lib/x86, /vendor/lib, /system/lib]]
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	at android.app.ActivityThread.installProvider(ActivityThread.java:5141)
04-27 17:52:06.991 E/AndroidRuntime(11387): 	... 10 more
04-27 17:52:06.991 E/AndroidRuntime(11387): 	Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.facebook.FacebookContentProvider" on path: DexPathList[[dex file "/storage/emulated/0/Android/data/com.ptdsp.android/files/.__override__/dexes/mono.android.dex", dex file "/storage/emulated/0/Android/data/com.ptdsp.android/files/.__override__/dexes/classes.dex"],nativeLibraryDirectories=[/data/app/com.ptdsp.android-1/lib/x86, /vendor/lib, /system/lib]]
04-27 17:52:06.991 E/AndroidRuntime(11387): 		at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
04-27 17:52:06.991 E/AndroidRuntime(11387): 		at mono.android.incrementaldeployment.IncrementalClassLoader$DelegateClassLoader.findClass(IncrementalClassLoader.java:59)
04-27 17:52:06.991 E/AndroidRuntime(11387): 		at mono.android.incrementaldeployment.IncrementalClassLoader.findClass(IncrementalClassLoader.java:45)
04-27 17:52:06.991 E/AndroidRuntime(11387): 		at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
04-27 17:52:06.991 E/AndroidRuntime(11387): 		at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
04-27 17:52:06.991 E/AndroidRuntime(11387): 		... 12 more
04-27 17:52:06.991 E/AndroidRuntime(11387): 		Suppressed: java.lang.ClassNotFoundException: com.facebook.FacebookContentProvider
04-27 17:52:06.991 E/AndroidRuntime(11387): 			at java.lang.Class.classForName(Native Method)
04-27 17:52:06.991 E/AndroidRuntime(11387): 			at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
04-27 17:52:06.991 E/AndroidRuntime(11387): 			at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
04-27 17:52:06.991 E/AndroidRuntime(11387): 			at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
04-27 17:52:06.991 E/AndroidRuntime(11387): 			... 13 more
04-27 17:52:06.991 E/AndroidRuntime(11387): 		Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available


# Test environment (full version information)
Microsoft Visual Studio Enterprise 2017 Preview (2)
Version 15.2 (26424.2-Preview) Preview
VisualStudio.15.Preview/15.2.0-Preview+26424.2
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Enterprise

Visual Basic 2017   00369-60000-00001-AA047
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA047
Microsoft Visual C# 2017

Visual C++ 2017   00369-60000-00001-AA047
Microsoft Visual C++ 2017

Visual F# 4.1   00369-60000-00001-AA047
Microsoft Visual F# 4.1

ASP.NET and Web Tools 2017   15.0.30404.0
ASP.NET and Web Tools 2017

ASP.NET Web Frameworks and Tools 2017   5.2.50303.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30209.0
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.2.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Common Azure Tools   1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Fabric.DiagnosticEvents   1.0
Fabric Diagnostic Events

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript UWP Project System   2.0
JavaScript UWP Project System

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure Hive Query Language Service   2.2.5000.0
Language service for Hive query

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50131.1

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   Mono.Debugging.VisualStudio
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   4.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Redgate ReadyRoll   1.13.23.3401
Extend DevOps processes to your SQL Server databases and safely automate database deployments.
    
Visit https://www.red-gate.com/readyroll for more information.

Copyright (C) 2011 Red Gate Software Ltd. All rights reserved.
  
This software contains components from Component Owl.
SQL Server is a registered trademark of Microsoft Corporation. 
Visual Studio is a registered trademark of Microsoft Corporation. 

ReadyRoll contains code from the following open source software:

NuGet https://www.nuget.org/
SQL LocalDB Wrapper https://github.com/martincostello/sqllocaldb
Autofac https://autofac.org/
Json.NET https://json.net/
MahApps.Metro http://mahapps.com/
SemVer https://github.com/maxhauser/semver
Menees Diff Controls http://www.menees.com/
Log4Net http://logging.apache.org/log4net/
Extended WPF Toolkit https://wpftoolkit.codeplex.com/
Code InfoBox VSX http://www.codeproject.com/Articles/55196/Code-InfoBox-Visual-Studio-Extension-VSX
OctoPack https://github.com/OctopusDeploy/OctoPack
SQLite https://sqlite.org/

This product contains icons from http://www.visualpharm.com distributed under a free backlink license.

For license details or other notices relating to the above software, please see NOTICE.TXT and EULA.rtf in the ReadyRoll application folder.
    

Redgate SQL Prompt   7.5.1.1087
Write, format, and refactor SQL effortlessly

Redgate SQL Search   2.4.2.1305
Search functionality for SQL Server databases, from within Visual Studio

SQL Server Data Tools   15.1.61702.140
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   2.2.2.0
TypeScript tools for Visual Studio

Visual Studio tools for CMake   1.0
Visual Studio tools for CMake

Visual Studio Tools for Universal Windows Apps   15.0.26424.02
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin   4.5.0.415 (6caf703)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.3.0.11 (3e46412)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.10.0.19 (586c18e)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Comment 1 philip 2017-04-29 19:15:31 UTC
I forgot to mention that this only happens when also using

<AndroidFastDeploymentType>Assemblies:Dexes</AndroidFastDeploymentType>
Comment 2 Mark McLemore 2017-06-26 21:52:07 UTC
Unfortunately, we’re unable to reproduce this issue using 15.2 (non-preview version) on a simple Android app. Can you try this with the latest version (15.2)? 

If that doesn't solve the problem, please attach a reproduction to the bug by starting with a clean Xamarin.Android project, adding just the code necessary to demonstrate the issue. Thanks!
Comment 3 philip 2017-06-27 10:04:22 UTC
Mark, still the same problem even in the latest 15.3 bits.  I'm afraid I won't have time to create a sample so I hope the stack trace I provided will be sufficient to find the problem.  For now I just don't enable Assemblies:Dexes.
Comment 4 philip 2017-09-29 17:39:51 UTC
This appears to be fixed in Visual Studio 15.4.0 preview 3

Note You need to log in before you can comment on or make changes to this bug.