OfficeDev / Office-Addin-Scripts

A set of scripts and packages that are consumed in Office add-ins projects.
MIT License
159 stars 100 forks source link

The addin is no longer available:add-in inserted during development are only available during debugging in Visual Studio #347

Closed chenxizhang closed 2 years ago

chenxizhang commented 3 years ago

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

Expected behavior

I created an excel addin by "yo office", it works fine before, but I found it can't work anymore from yesterday. I don't know what happen there.

Current behavior

I ran the command "npm start" or "yarn start" in the terminal of VS Code, it can build, and open Excel, but the add-in can't be loaded with below error

image

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. step 1
  2. step 2
  3. you get it...

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Failure Logs

Please include any relevant log snippets, screenshots or code samples here.

awasser-omnispear commented 3 years ago

~I encountered this issue as well. I ran office-addin-dev-settings registered to see which manifests are registered with Excel. Then removed them all one at a time with office-addin-dev-settings unregister <<manifest path>>. Then I restarted Excel. Doing this resolved that issue.~

24 hours later, my experience is the same as yours. Unregistering the manifests no longer solves this.

KelBowen commented 3 years ago

@TCourtneyOwen note that there are two customers reporting this issue.

TCourtneyOwen commented 3 years ago

@awasser-omnispear @chenxizhang Is the dev-server in fact started, assuming this add-in is set to localhost?

awasser-omnispear commented 3 years ago

It's been a bit since I've had issues with this. I've since just wiped everything clean and started again. My use case is fairly specific: I've got an existing app which I'd like to integrate ReactJS, custom functions, and the new build process.

I think I took the ReactJS Typescript base from Yo Office and applied the differences from the template from https://github.com/OfficeDev/Excel-Custom-Functions. I don't remember exactly what I did to make it all work, but it does work now.

Couple of things I did find out while doing this:

Sorry I can't be any more of help. As I said before, I've got the sideloading working now. I hope @chenxizhang has similar luck!

TCourtneyOwen commented 3 years ago

Thanks for the response @awasser-omnispear I am glad to hear things are working for you and sorry to hear you were having problems. We have heard from others who are having problems starting the dev-server and am wondering if your issue is related. One person mentioned that downgrading webpack-cli to an earlier version fixed their problem with starting the dev-server.

-Courtney

awasser-omnispear commented 3 years ago

I've always been able to start the dev-server, either through npm run start or npm run dev-server. I was not able to get to the root cause. The biggest thing to look out for is running all the commands in a Windows PowerShell or command line; not WSL (my usual dev environment). I believe that is where my issue stemmed from.

neittien0110 commented 3 years ago

I confronted the same issue when I opened a existed excel file. image At that moment, the status bar showed and hung as bellow image

I found that the add-ins was okay. None thing bad happened and I still did well with that file. If I created a new excel file and paste content from the existed file to the new one, it solved.

I guest that I created the old file and typed custom functions when using localhost server at the debug mode. When I saved it, the excel file stored metadata about that localhost server. Whenever reopening that file, the problem occurs.

millerds commented 3 years ago

Is anyone still having trouble with this?

igor-ribeiiro commented 2 years ago

I will be closing this issue since there was no response to the previous callout message. Please, feel free to reopen if the issue still exists.

Metab0i commented 1 year ago

it usually means that "something is wrong", but it doesn't tell you what exactly is wrong. Said "something is wrong" is contained within the manifest, so usually it's the formatting of your XML objects. That's my experience with it thus far anyway.

Tom-H2oThermo commented 7 months ago

I'm having that same error. I'm trying to update my manifest production for submitting my app to the Partner Center/App Store. It was working in localhost. Then I changed one manifest line from bt:Url id="Functions.Metadata.Url" DefaultValue="https://localhost:3000/public/functions.json" to a Azure blob hosted file link. The link works but I got that same error: Add-In Error I then put the bt:Url line back to the way it was and ran NPM start again, and I'm getting the same error. Now I need to figure out how to get back to where I was. I was trying to take it one step at a time, but perhaps I need to get all the links changed at once to point to web hosted files. But I don't know why putting the line back the way it was doesn't get rid of the error.