Skip to content

[patch]: fix web sideload with manifest preview#980

Open
aminya wants to merge 1 commit intoOfficeDev:masterfrom
aminya:patch-1
Open

[patch]: fix web sideload with manifest preview#980
aminya wants to merge 1 commit intoOfficeDev:masterfrom
aminya:patch-1

Conversation

@aminya
Copy link

@aminya aminya commented Mar 13, 2026

Change Description:

To side load on the web, the sourceLocation is required, however, the dev manifest preview fails if you add it in the manifest file. This adds a default location, so that web side load works with the manifest preview

  1. Do these changes impact command syntax of any of the packages? No

  2. Do these changes impact documentation? No

Validation/testing performed:

bunx -b office-addin-debugging start --dev-tools manifest.json web --document <some_doc>

To side load on the web, the sourceLocation is required, however, the dev manifest preview fails if you add it in the manifest file. This adds a default location, so that web side load works with the manifest preview
@aminya aminya requested a review from a team as a code owner March 13, 2026 04:52
Copy link
Collaborator

@millerds millerds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by "dev manifest preview fails if you add it in the manifest"? Can you explain some more what you are seeing happen.

I also noticed you are using the json manifest and I don't think that has a default location property. It existed in the xml schema but doesn't appear to have been translated over to the json schema (that I can see). I think you have found a legitimate flaw in the sideloading code because that value will always be empty for json manifests (only gets set in manifestHandlerXml.ts), but I think the better fix would be to set that value in manifestHandlerJson.ts with a legitimate value from the json manifest (from the runtimes section?) or maybe see if a sideloading URL can be crafted that works without that value.

}

manifest.defaultSettings = manifest.defaultSettings ?? {};
manifest.defaultSettings.sourceLocation = manifest.defaultSettings.sourceLocation ?? "https://localhost:4000";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is the right default. It assumes that people are deploying their test add-in code to localhost:4000 which isn't even the location used in the add-in projects we generate from templates using 'yo office' (which is port 3000) and in those it is written that way into the manifest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants