Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEP0600 error when Package name is too long #7059

Open
1 of 2 tasks
mrlacey opened this issue May 5, 2022 · 3 comments
Open
1 of 2 tasks

DEP0600 error when Package name is too long #7059

mrlacey opened this issue May 5, 2022 · 3 comments
Labels
bug Something isn't working product-winui3 WinUI 3 issues team-Markup Issue for the Markup team wct

Comments

@mrlacey
Copy link
Contributor

mrlacey commented May 5, 2022

Describe the bug

It's possible to create and run an app within an invalid Package Name, but doing so gives a vague and unhelpful error message that does not point to the cause of the issue:

DEP0600: Deployment failed. Exception - The stub received bad data.
The stub received bad data. [0x800706F7]

The only way round this problem is to use a shorter name.

Steps to reproduce the bug

  1. Create a new app.
  2. Manually edit Package.appxmanifest so it includes a Name that is longer than 50 characters.

e.g.

  <Identity
    Name="Name.That.Is.Very.Long.But.For.Genuinely.Valid.Reasons"
    Publisher="CN=myPublisherName"
    Version="1.0.0.0" />
  1. Run the application.
  2. See the DEP0600 error message (above)

Expected behavior

That the provided value is outside the validation rules, it should be caught at compile time.
A message that explains (or at least references) the problem should be reported. Something like "Package name can be at most 50 characters long."

If this can only be caught at runtime, something more useful than the DEP0600 message should be displayed.

Note. There already is validation for this in the appxmanifest editor (see below) but it is a bad practice to only do input validation (& error reporting) at the point of user input when data can be provided at other times and in other ways.
It's perfectly acceptable to edit the appxmanifest file in other ways (such as notepad!) and this file may not even be opened if the contents are set in another (generated) way (such as with the Community Toolkit, or Template Studio.)

Without providing an error message that points to the actual problem, people may waste days(!) of effort trying to work out the cause of the vague error message that only has an indication of the problem if they know to open the correct file and then go to the correct tab within the UI.

Screenshots

The error validation message in the UI - when it is shown

NuGet package version

WinUI 3 - Windows App SDK 1.0

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

Windows 11 (21H2): Build 22000

Additional context

As a low priority issue, I'm not expecting this will be addressed quickly, but I hope that by documenting the issue here it may help someone else in the future if they search for the error message they will find the solution/work-around.

@mrlacey mrlacey added the bug Something isn't working label May 5, 2022
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label May 5, 2022
@ojhad ojhad added product-winui3 WinUI 3 issues team-Markup Issue for the Markup team labels May 10, 2022
@michael-hawker
Copy link
Collaborator

michael-hawker commented Jul 19, 2022

I just hit this again with Labs.StackedNotificationsBehavior.Samples.WinAppSdk and was very confused until I stumbled back upon this bug we had filed after 30 minutes of rebuilding and closing VS, etc...

@ojhad should this be in the WindowsAppSDK repo?

michael-hawker added a commit to CommunityToolkit/Labs-Windows that referenced this issue Jul 19, 2022
…aml#7059

Gives us a maximum of 32 characters for an experiment name. Added note in template readme about it too.
@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Dec 6, 2022
@michael-hawker
Copy link
Collaborator

Bumping, based on #8638

@MartyIX
Copy link
Contributor

MartyIX commented Dec 10, 2023

I have just hit this when creating a repro for a MAUI issue. Quite frustrating that it took me half an hour to find out that it's just this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product-winui3 WinUI 3 issues team-Markup Issue for the Markup team wct
Projects
None yet
Development

No branches or pull requests

5 participants