Developer Org with Domain - Namespace Not Detected

Issue #1343 resolved
Steve Earl created an issue

I have a developer org with a domain configured. When adding this connection in IC, the namespace is not detected nor can I select it. I’ve followed the contextual help and repeatedly tested that connection, and still, the namespace is not found.

What’s the secret to getting this org’s namespace found? I’ve noticed that other orgs both production and developer all have the same issue.

Comments (8)

  1. Scott Wells repo owner

    Steve, if this is based on an SFDX connection--even an OAuth connection--the namespace is picked up from the sfdx-project.json file, e.g.:

    {
      "packageDirectories": [
        {
          "path": "force-app",
          "default": true
        }
      ],
      "namespace": "yourNamespaceGoesHere",
      "sfdcLoginUrl": "https://login.salesforce.com",
      "sourceApiVersion": "45.0"
    }
    

    I'll need to think about whether that's the correct behavior, though, so even if that resolves the issue for you I'm not going to resolve this just yet. I'll be interested to know if it does get you past this or not.

  2. Andrew Visser Account Deactivated

    Adding to this ticket as it seems to be the same.

    @Scott Wells I’ve started putting all of my org configuration into sfdx, even my non-scratch dev orgs. Even orgs I use to develop against packaging 1.0 orgs. My company has built some tooling around it and it’s quite convenient.

    As a result, I have OAuth connections for projects that don’t have a sfdx-project.json. I tried adding an sfdx-project.json to my packaging 1.0 project. It did indeed pickup the namespace:

    However, when I click on a code-hyperlink, e.g. I run a test and get a stacktrace,

    I’m brought to the stub that lives in OfflineSymbolTable.zip instead of my source.

    Note that clicking on the tests works fine and brings me to my source

  3. Scott Wells repo owner

    Andrew, is this project a metadata format project or a source format project? Adding an sfdx-project.json file to a metadata format project is going to lead to all sorts of issues. You need to commit to one or the other. If you decide on metadata format, you need to remove the sfdx-project.json and let IC determine the org's namespace by using the Test button in the connection configuration; if you decide on source format, you can use the sfdx-project.json but of course your metadata must be in that format.

    Sorry if I'm misunderstanding the scenario, but it sounds like you're in a hybrid state that definitely won't work.

  4. Andrew Visser Account Deactivated

    This is a metadata format project. I just want to get the links in the stacktrace to work.

    you need to remove the sfdx-project.json and let IC determine the org's namespace by using the Test button

    I would, but I’d like to manage all of my connections in sfdx - this connection is an OAUTH connection. Ideally I’d have 0 IC2-specific connections. This does work if I do double-work and also create a connection to this org in IC2. Feel free to tell me that’s the solution.

    However, like I said, we’ve built a few sfdx tasks that don’t require source-format projects. So every org I create is going to be authorized into sfdx. What I’d like is to have those be the only place I configure connections.

  5. Scott Wells repo owner

    Unfortunately the work required to get a metadata format project to work with an sfdx-project.json file present is quite significant. The IDE currently determines the type of project and corresponding format (metadata vs. source) based on the absence or presence of that file. Having said that, you can absolutely have no native connections and only use OAuth connections. However, even for OAuth connections used in a metadata format project you'll use the Test button to have IC fetch the org namespace for that connection. That should give you what you need, I think. Let me know if that's incorrect.

  6. Andrew Visser Account Deactivated

    All better. Thanks. I think I skipped that as the button is cut off with the default window size for me

  7. Scott Wells repo owner

    Hmmmm...that's odd. I'll need to see why that's happening, but yeah, hopefully that works for you ignoring the layout issue.

  8. Scott Wells repo owner

    I'm going to resolve this assuming you're good to go. I'll also investigate that layout issue, though, because that certainly would've short-circuited things a bit had it been showing properly.

  9. Log in to comment