Questions tagged [second-generation-packaging]

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

Creating second generation package - stuck on Initializing

When we try to create a second generation package using CumulusCi we get stuck on the initializing part. This use to work fine but stopped working all at once. The steps to recreate is below. We also ...
user avatar
0 votes
0 answers
21 views

sfdx force:package:convert --package throwing an error

I'm trying to convert 1GP to 2GP using sfdx force:package:convert --package 033xx0000004Gmn -k password123 it throws the following error: ERROR running force:package:convert: SELECT Id FROM ...
user avatar
  • 1,313
1 vote
0 answers
23 views

Select components to include in second-generation package

I am creating a package that shows an externally hosted web app in an Aura component. This component includes a canvas application. The Canvas App URL for the signed request is stored in a connected ...
user avatar
1 vote
1 answer
106 views

What happens to the Client Id and Client Secret in the connected app for the package subscriber?

I have created a connected app in my org to perform the REST API call to the Metadata API. Now if I will make this connected app as part of my 2nd Generation Managed Package, Now my question is - Will ...
user avatar
2 votes
1 answer
27 views

2GP Patching Fails Due to Missing SalesProcess Value Even Though Same Code Packages Fine

We've been trying to patch with 2GP for a few months now but we're constantly hitting errors even when the only change is a comment in an apex class. Many errors were around reports so to try to get ...
user avatar
0 votes
0 answers
40 views

How to check if another managed package from same namespace is installed - 2GP

Scenario: Single namespace with multiple 2nd generation managed packages. Core |-Extension 1 |-Extension 2 In this example how can I determine whether or not Extension 1 is installed from Extension 2?...
user avatar
13 votes
2 answers
292 views

fflib as Second Generation Managed Package (2GP)

So, in a project of mine (a Second Generation Managed Package) I have a dependency on fflib. My initial idea was to include fflib-apex-common and fflib-apex-mocks as 2GPs with the same namespace as my ...
user avatar
  • 271
4 votes
0 answers
36 views

2gp Patching is Failing Even When the Only Change is a Comment [duplicate]

I'm currently trying to get patching working for our 2gp managed package but it's consistently hitting the same set of errors around report folders and report filters (see screenshot). Now I know what ...
user avatar
1 vote
0 answers
43 views

Confused on getting started as an ISV

I started following the ISVForce quick start guide. This guide seems out of date and not entirely accurate. The first step is to register in the partner community. When I did this I received ...
user avatar
  • 2,586
1 vote
1 answer
226 views

In depth aspects of 1gp to 2gp Managed Packages conversion [closed]

Suppose, there is a 1gp Managed Packaging Org, namespace prefix: abcxyz. Several beta-release versions exist. Now, I want to move to the 2gp Managed packaging. So, I linked the devHub org and going to ...
user avatar
  • 322
0 votes
1 answer
22 views

Dynamic class initialisation doesn't work in 2GMP

I want to use dependency injection to detect if descendant package is installed in addition to inherited package and modify the behaviour of inherited package to depend on class from descendant ...
user avatar
  • 13.3k
1 vote
1 answer
86 views

Is there any way to implement a smooth customer migration from 1GMP to 2GMP?

I build 2GMP for client who has many customers installed their previous 1GMP version of the package. I couldn't figure out how to make this process smooth enough with simple upgrade so they have to ...
user avatar
  • 13.3k
0 votes
1 answer
92 views

Second Generation Packages: ERROR running force:package:version:create: : The object 'Object' of type Settings metadata does not exist

I am getting this error when I create version of a new second generation managed package. The project has simple Apex class without code and dependency on single 1st generation managed package. Are ...
user avatar
6 votes
1 answer
145 views

How are global classes and/or components treated in 2nd Generation Packaging (unlocked and managed)

In 1st generation packaging, a global class cannot be modified after a managed release (and installation). There have been numerous discussions like this one on handling / upgrading / deprecating ...
user avatar
1 vote
1 answer
100 views

2GP package dependency version

When configuring sfdx-project.json for 2GP managed package you specify it's dependencies. My package depends on our 1GP managed package. So I specified 1GP package version Id in depencensies. But what ...
user avatar
  • 196
0 votes
1 answer
54 views

How to add feature based limit in second generation package scratch org?

I am trying to develop a second generation package with a scratch org, I need to add feature based limit parameters, however since scratch org in second gen package don't have the actual package, I ...
user avatar
1 vote
1 answer
106 views

Unhandled errors are not coming to user designated for 2GMP

Apex documentation has contradicting information about Second Generation(2GP) Package Apex Unhandled Exception support. This page states that Apex exception errors don’t trigger email notifications. ...
user avatar
  • 13.3k
1 vote
1 answer
54 views

How to use .forceignore for scratch org push but not for packaging

I'm trying to package connectedApp using 2nd generation packaging as instructed here: https://salesforce.stackexchange.com/a/325175 However, the special xml file creates a conflict between scratch org ...
user avatar
  • 4,469
0 votes
0 answers
57 views

Second-Generation Managed Package with Package.xml

i would like to ask if there is a way to further restrict data which gets into package based on package.xml for example like when retrieving metadata... Basically what I need is to have a git ...
user avatar
0 votes
1 answer
45 views

Which package type will be preferred for ISV?

I am planning to list my app in exchange, As ISV what is the preferred type for Listing. when I try to add my 2gp package for security review it does not link my dependent package. should I have to ...
user avatar
  • 319
4 votes
2 answers
127 views

Error when generating package version with values in account standard picklist

I have a couple of values on the Account's Type field in a managed package. A couple of days ago I generated a package version successfully, but now when generating a new version I'm getting this ...
user avatar
9 votes
0 answers
321 views

Managed Package error emails behaviour changed?

I have a First-Generation Managed Package that was updated and released for years. It's current version is 6.0. I just recent added a User to the Package page to get error notifications as described ...
user avatar
0 votes
1 answer
222 views

Trying to Package Connected Apps in Second-Generation Managed Packaging

I am fairly new to Salesforce, and currently trying to explore Connected App in 2GP. I have done some reading and came across some posts that is similar to my situation here. Package Connected App ...
user avatar
5 votes
1 answer
292 views

2GP: Package upgrade from patch to next minor version

I have a package version 1.2.0.0 and I've created a patch with some hotfixes which I packaged as 1.2.1.0 (updated the patch version). During packaging of 1.2.1.0 the ancestor version specified is ...
user avatar
  • 83
1 vote
0 answers
149 views

2GP: How to Upgrade Beta Managed Packages

Is there any way, or is there any plan (safe harbour) to make it possible to upgrade a Beta managed package without needing to uninstall the previous version first?
user avatar
  • 8,262
2 votes
1 answer
232 views

2GP: How to set Managed Package Publisher Name

How do I set an App's Publisher Name? Looking at the Project Configuration File for Packages I cannot see anywhere in the sfdx-project.json where it could be added. Using 1GP it was set in the ...
user avatar
  • 8,262
2 votes
1 answer
463 views

2GP: ERROR running force:package:version:create: MyApp: Installing an app (MyApp) that has been deleted

I am trying to create a Managed package version. But when I run the command: sfdx force:package:version:create --package "MyApp" --postinstallscript AppInstallHandler.cls -w 10 --...
user avatar
  • 8,262
1 vote
1 answer
157 views

2GP: Dependent class is invalid and needs recompilation

I am trying to create a Managed package version. When I run the command: sfdx force:package:version:create --package "My App" --postinstallscript AppInstallHandler.cls -w 10 --loglevel TRACE ...
user avatar
  • 8,262
2 votes
2 answers
263 views

2GP Managed Package: Admin Profile changes

Is it possible to package and ship permission modifications to the System Administrator profile in a Managed Package or not? If not, am I right in assuming permissions should be shipped as a ...
user avatar
  • 8,262
0 votes
1 answer
75 views

How to Upgrade Second-Generation (2GP) Unlocked Package to Second-Generation (2GP) Managed Package

Is it possible to deploy an Unlocked package to a production org, then upgrade the package to Managed and upgrade the package in the production org?
user avatar
  • 8,262
3 votes
1 answer
817 views

2GP Source Push Error: The consumer key is already taken

I am trying to migrate metadata from a Partner Developer org to a Partner Developer scratch org for use with second-gen packaging. I have downloaded the 1GP package, converted the metadata, and now I ...
user avatar
  • 8,262
5 votes
3 answers
339 views

Second-Gen Packaging Migration and Winter 21 release

There is a Salesforce Developers YouTube video from Dec 13th 2019: Introducing Managed Second-Generation Packages Which hinted that the Winter 21 release would include: Enabled migration of first-...
user avatar
  • 8,262
1 vote
1 answer
270 views

Code coverage mismatched while 2gp packaging

I am currently trying to deploy my final release package but error stats that i don't have minimum code coverage to promote package. But when I create scratch org and run all test I could see no ...
user avatar
  • 319
1 vote
1 answer
46 views

Why delete package command not working?

I am trying to delete freshly created package, but error code says delete is not a valid command. But it's available in official document Update Still not working even after installing pre-release ...
user avatar
  • 319
1 vote
2 answers
56 views

Second Generation Packaging Parter Business Org Question For CI CD

I have a quick question on the best practices for managing the Parter Business Org when developing Second Generation Packages. As Parter Business Org act as the Dev Hub for the second generation ...
user avatar
2 votes
1 answer
535 views

Guidelines on the process of converting the first generation manage package to second generation manage package

We are an ISV and we have a managed package already in app-exchange which clients are already using it for few years. Last year we have migrated our codebase to to sfdx and all are working fine now. ...
user avatar
1 vote
0 answers
103 views

sfdx-project.json for second generation package proper ancestry structure?

Currently my sfdx-project.json looks like this: { "packageDirectories": [ { "path": "force-app", "package": "my package&...
user avatar
  • 2,339
5 votes
1 answer
205 views

Anyone having problems creating a scratch org / promoting a package version today (Aug 12, 2020)? I seem to be getting Winter '21 orgs!

Sorry upfront as this is going to be a bit of a rambling question. Today I was creating a package using 2nd Generation packaging and as part of my process I install the new package into a test scratch ...
user avatar
1 vote
1 answer
76 views

Creating a Second Generation Managed Package with configuration link

I am creating a second-generation managed package and Install, After the Installing package there should be a link: which navigates to the lightning component present in the package and sets the ...
user avatar
  • 13
5 votes
1 answer
666 views

Do tests in unlocked packages execute when deploying unpackaged apex code to production?

I'm sorry for the cryptic title. I'm curious what tests are forced to run when deploying to production, if that production org contains unlocked packages. Lets say we have the following test classes ...
user avatar
  • 295
4 votes
1 answer
691 views

Second gen package error about a component being a scratch org ancestor? What does this mean?

My sfdx-project.json looks like this: { "packageDirectories": [ { "path": "force-app", "package": "my package", ...
user avatar
  • 2,339
2 votes
1 answer
130 views

Second generation packaging: Include same artifact into two or more packages withing same namespace

We are trying to split our huge monolithic 1st generation package into smaller chunks of 2gp packages sharing the same namespace. There are a lot of challenges and tough decisions to make here. But in ...
user avatar
  • 2,734
13 votes
1 answer
348 views

System.requestVersion() does not work in Second Generation Packaging

Environment sfdx-cli/7.58.2 win32-x64 node-v12.16.3 API 48 What's going on? When trying to create a managed packaged version with Second Generation Packaging (2GP) -with code check- that contains ...
user avatar
5 votes
1 answer
373 views

Solving error about NavigationLinkSet when packaging a community using 2GP

In a Community that I am trying to package using 2GP with: sfdx force:package:version:create after eliminating several errors I am now getting this one: These entities are not supported: [...
user avatar
  • 130k
3 votes
1 answer
282 views

How to use second generation packaging (2GP) for a community?

We've been running Jenkins builds for a while containing: sfdx force:package:version:create --skipvalidation ... with no problem, but now we are preparing to promote to a release, removing the --...
user avatar
  • 130k
2 votes
2 answers
79 views

Release new version of unlocked package

I have a sfdx-project.json for my unlocked package. Version 1.0.0-11 was promoted. { "packageDirectories": [ { "path": "force-app", "default": true, "...
user avatar
1 vote
1 answer
171 views

SFDX Deploy: How to prevent accidental deploy to my Packaging Org

From VSC, I'm deploying to my Dev Org often. I'm concerned that I may be authorized to my Packaging Org and accidently deploy code there. In theory, the only deploys to Packaging Org should be from ...
user avatar
4 votes
1 answer
618 views

Platform event API name imported in LWC uses "c" instead of "e" as suffix?

I'm trying to make a component in a managed package to subscribe to a certain platform event, and referencing the channel with its API name previously worked: import BATCH_EVENT_NAME from '@...
user avatar
2 votes
2 answers
670 views

Why I am getting error while Promoting Second Generation Package with dependent packages?

UPDATE: Facing the same issue even without package dependency. I am trying to promote a Pkg2 with a dependent package Pkg1. Both packages are 2nd generation manage package in the same namespace. I am ...
user avatar
1 vote
0 answers
47 views

Second Generation Unlocked Packages without Namespace not including components

I'm trying to create a package version for an Unlocked Package with no namespace specified. I can verify this works when running force:package:list and force:package:version:list. I'm including some ...
user avatar