Bug 59037 - Error type 3: Activity class does not exist.
Summary: Error type 3: Activity class does not exist.
Status: NEEDINFO
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger (show other bugs)
Version: 7.4 (15.3)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-08-25 11:41 UTC by jzeferino
Modified: 2017-10-11 14:05 UTC (History)
4 users (show)

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


Attachments

Description jzeferino 2017-08-25 11:41:51 UTC
The problem is:

1 - Connect two devices via usb at the same time to the computer (Device1, Device2).
2 - Build and deploy the application to Device1.
3 - Select Device2 and press "play" again.

It copies the .apk to the Device2 but the following error is logged in Application output.

Forwarding debugger port 8851
Detecting existing process
> am start -n "pt.x.x/x.droid.activity.SplashActivity"
> Starting: Intent { cmp=pt.x.x/x.droid.activity.SplashActivity }
Error type 3
Error: Activity class {pt.x.x/x.droid.activity.SplashActivity} does not exist.

This is my settings:

=== Visual Studio Enterprise 2017 for Mac ===

Version 7.1 (build 1297)
Installation UUID: 4126a675-f1d9-404c-a489-ee603e8ba19b
Runtime:
	Mono 5.2.0.215 (d15-3/da80840) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000215

=== NuGet ===

Version: 4.3.0.2418

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	1.1.1
	1.0.4
SDK: /usr/local/share/dotnet/sdk/1.0.3/Sdks
SDK Version: 1.0.3
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/4.8.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.5
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 7.4.0.21 (Visual Studio Enterprise)
Android SDK: /Users/zeferino/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.2   (API level 17)
		4.4   (API level 19)
		5.1   (API level 22)
		6.0   (API level 23)
		7.0   (API level 24)
		7.1   (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.3
SDK Build Tools Version: 25.0.3

Java SDK: /usr
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Version: 1.2.2
Hash: b71b035
Branch: d15-1
Build date: Fri, 21 Apr 2017 17:57:12 GMT

=== Apple Developer Tools ===

Xcode 8.3.3 (12175.1)
Build 8E3004b

=== Xamarin.Mac ===

Version: 3.6.0.19 (Visual Studio Enterprise)

=== Xamarin.iOS ===

Version: 10.12.0.20 (Visual Studio Enterprise)
Hash: 80b8487d
Branch: d15-3
Build date: 2017-08-18 16:07:26-0400

=== Build Information ===

Release ID: 701001297
Git revision: 9c5299666538b2f8baf501418a5c064d784d64da
Build date: 2017-08-07 11:29:35-04
Xamarin addins: 3bb0c32a14f1b7e368bf5ac53a84c3581c019391
Build lane: monodevelop-lion-d15-3

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Comment 1 jzeferino 2017-08-25 14:52:40 UTC
This is the report event when the app is already installed in Device2 and I press "play" on the IDE:

Forwarding debugger port 8864
Detecting existing process
Terminated existing process> am start -n "pt.x.x/x.droid.activity.SplashActivity"
> Starting: Intent { cmp=pt.x.x/x.droid.activity.SplashActivity }
Error type 3
Error: Activity class {pt.x.x/x.droid.activity.SplashActivity} does not exist.
Comment 2 Jon Douglas [MSFT] 2017-08-28 17:37:48 UTC
Hi jzefernio!

I'm not able to reproduce this issue with the provided steps on a File -> New Xamarin.Android Project.

My best guess is that you have an old build on one of these devices and the respective build is not updating which it then does not see the SplashActivity. Can you please ensure you fully uninstall the application from each device and see if you can reproduce it?

Also, if you have a reproduction project that you can upload to this bugzilla report, it would be much appreciated!

Tested on VS4Mac 7.1 and 7.2. If we can reproduce this issue, we will want to try it on VS 2017. If we cannot replicate it there, we will reassign this bug to the VS4Mac team.

Thank you!
Comment 3 jzeferino 2017-08-29 15:23:39 UTC
Hello there Jon.

Here is a video and sample project.

https://drive.google.com/open?id=0B50BdYyRUBAJVE81aERwS2pxUjQ
Comment 4 jzeferino 2017-08-29 17:21:37 UTC
For some strange reasons the url is pointing to another folder.
Use this instead: https://drive.google.com/open?id=0B50BdYyRUBAJS1l1Rk8tRnEwZ1E
Comment 5 Jon Douglas [MSFT] 2017-10-04 16:52:25 UTC
(In reply to jzeferino from comment #4)
> For some strange reasons the url is pointing to another folder.
> Use this instead:
> https://drive.google.com/open?id=0B50BdYyRUBAJS1l1Rk8tRnEwZ1E

Was this issue resolved when we had our chat in Slack? I am not able to reproduce this issue on two separate devices that are connected to "adb devices".
Comment 6 jzeferino 2017-10-06 16:36:27 UTC
This is note resolved after our chat in Slack.

So, I will try to explain it with more details and steps.

Setup:

Have two devices (happens more in real devices) or emulators without the reproducible app installed.

Open and Clean the reproducible .sln I send with Visual Studio for Mac.

Reproduce.

1. Connect one phone/emulator in the computer (osx in my case).
2. Press "play" in the Visual Studio for Mac, that will build and deploy the app for the device.
3. Plug another device and press "Play" again.
4. You should see the error.

Watch the video for more detail.
Comment 7 nicolas.esprit.bdl 2017-10-11 08:00:14 UTC
I reproduce this problem, but with a simple Droid simulator : 

Forwarding debugger port 8854
Detecting existing process
> am start -n « XX/ZZ.SplashActivity"
> Starting: Intent { cmp=xx/zz.SplashActivity }
Error type 3
Error: Activity class {xx/zz.SplashActivity} does not exist.

Restart Simu, restart VS for Mac, or clean project doesn't resolve.

But after obliterate (bin and obj folders), it's work.

Not the first time i see this error. It's frustrating.
Comment 8 jzeferino 2017-10-11 14:05:06 UTC
I can confim that this is solved after a clean, but it don't make any sense. sometimes we need to deploy the same build to multiple devices and it should't be necessary to re-build the package.

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