Comments (23)
Hi @mvegaca,
Looks like the add-in loads and shows you a list of attachments. And then it fails when you attempt to save them. It's most likely something to do with the app registration. I'd double-check all the readme steps to be sure the app registration was set correctly. Also make sure the AttachmentsDemo.xml manifest has the correct ID (in both spots) and the web.config has the correct ID and secret value.
If it's still not working we could compare app registration manifests. You can see it in the Azure portal app registration page by choosing Manifest on the left side. I could post a sample working one here to compare with, and it might help spot any issues in the registration.
Hope this helps,
David
from office-add-in-samples.
What version of Visual Studio did you use? I tested this using Visual Studio 2022 Preview and this failed for some obscure reason. I then switched to Microsoft Visual Studio Enterprise 2019 Preview Version 16.11.0 Preview 4.0 and that did work properly.
So I see two options:
a) You missed a step in the registration as @davidchesnut also mentioned (there are a lot of steps and it is easy to miss one or two) I recorded my complete test (did not livestream it due to vulnerable Azure info on screen)
b) The VS version is failing.
from office-add-in-samples.
Hi
Yesterday at the end of the day, it works on Outlook Desktop, but stills happen on the web, it was working and the sample saves the attachments files to the sign in account onedrive, it's fine. But it still failing on Google Chrome.
Is it any possibility to specify debug only in outlook for desktop?
I'm using Visual Studio 2019 Community
from office-add-in-samples.
Hi @mvegaca,
Okay, yep, if it works in Outlook desktop then your app registration is good. I tested the sample again in Chrome just to be sure something hasn't changed, and it is working.
At this point I'd try some debugging techniques to get some more information.
- Use the developer debug tools in Chrome to see if there is any output to the console indicating errors or problems loading.
- Use a network monitor like Fiddler to see if any calls to localhost or Azure sign in services (When running the project in Visual Studio in debug mode) are returning HTTP errors or embedded JSON errors with more information.
- Set some breakpoints on the API methods in Visual Studio to see if you can hit them and step through the code to find out more.
Thanks!
David
from office-add-in-samples.
Hi David,
This morning i was trying to debug it in chroome and it works! I'm not sure why happens this, but I've observe this fail in other scenario.
I add my app client ID and my app secret, F5 and it works.
I copy the sample folder (removing .vs, packages, bin and obj folders) to a new folder in desktop.
I run the coppied proyect and it fails with the same error on loading (also with Outlook Desktop Client).
Is it possible that I need to remove some cache files to run the code from other location on when I change from Desktop to chrome?
Thanks
from office-add-in-samples.
Hi @mvegaca,
Did you do a rebuild on the project in the new folder with no errors? You need the bin folder because it will build the correct manifest for loading there. If you rebuild it should generate the correct bin folders and files.
Thanks,
David
from office-add-in-samples.
Hi,
I keep finding this error even if I work with this sample or creating and debugging a new outlook add-in blank project.
This error is documented here and I'm applying the workaround but the error is still happening.
https://docs.microsoft.com/en-us/office/dev/add-ins/testing/testing-and-troubleshooting
I've no errors if I deploy the web app to an azure app service but I can not debugg the code in this execution way.
from office-add-in-samples.
Hi @mvegaca,
If new projects are failing there's definitely something up with the configuration of Outlook on Windows. You should try clearing the Office cache and see if that helps.
BTW: Can you please confirm which version of Outlook you are using? The one listed at the beginning of this thread looks odd as the current version is 16.* not 18.*.
Thanks!
David
from office-add-in-samples.
Hi
I've tried to remove the cache removing the content of cache folders, then run the project again.
Now I have a different error
If I close the add-in pane, select a different mail and open the add-in, I've got the load error.
This is the version information
Microsoft® Outlook® for Microsoft 365 MSO (16.0.14326.20164) 64-bit
Microsoft Visual Studio Enterprise 2019 (2) Version 16.11.2
from office-add-in-samples.
I have seen the exact same error while using VS 2022 Preview and rebuilt it did it all over again with 2019 Preview Version 16.11.0 Preview 4.0 and that ran without issues. This was what I posted august 20th. I'll upload the video to YouTube as an unlisted video for @davidchesnut to have a look.
from office-add-in-samples.
@aafvstam and @mvegaca thanks for noting this. I've seen this error before and there is a workaround described here: https://stackoverflow.com/questions/32780315/could-not-find-a-part-of-the-path-bin-roslyn-csc-exe However I updated the Nuget package as described in PR #205. Can you give that PR a try and see if it fixes the error for you? I'd like to fix this without requiring a workaround. Thanks!
from office-add-in-samples.
Done, and created a PR #206 on #205 iron out some wrinkles 😉
from office-add-in-samples.
@aafvstam awesome! Thanks!
@mvegaca I merged the fixes into the sample, can you confirm if this works for you? Thanks!
from office-add-in-samples.
Hi
I think that the roslyn error is fixed but I still haven issues with the loading error.
I hope that it doesn't fail in your machines could be a problem on my dev env.
from office-add-in-samples.
@mvegaca Is that in Outlook Client or Outlook on the Web? Seen the above error before the fix but went away after reloading so it could be a timing issue. Can you try both Web and Client to see what the result is (you can easily switch target as described in README.md:
Select the AttachmentDemo project in Solution Explorer, then choose the Start Action value you want (under Add-in in the properties window). Choose any installed browser to launch Outlook on the web, or you can choose Office Desktop Client to launch Outlook on Windows. If you choose Office Desktop Client, be sure to configure Outlook to connect to the Office or Outlook.com user you want to install the add-in for.
Curious to see if it occurs in both environments.
from office-add-in-samples.
Hi @aafvstam it also fails en web browser (edge and chrome).
The code is sync with the repo and the only modifications is for ID a new GUID and adding the Azure App Registration ID and Secret
from office-add-in-samples.
A few more questions:
What is your startup property for multi-factor (below the startup option)?
If you right click the taskpane, inspect (open the developer pane) and reload, do you see any specific errors pass by?
Is the user email the same as the Azure App Registration account?
If not is, it on the same Tenant?
Did you see any 'consent' dialogs between startup and the error pane that asks you to confirm access to the account?
Let's see if we can figure it out ... I feel that it is just a small step from the finish line 😉
from office-add-in-samples.
It is annoying the issue was not persistent, I tried on another machine and found the issue one time, after that it worked on every run.
So, I updated all packages in the repo to the latest version and pushed PR #208 in after testing this on Outlook for the Web in Edge and in Chrome. Also tested in Outlook for Office Client on the desktop. Feels much more responsive to me but maybe I'm biased 😉.
@mvegaca Please try it out and let me know how it works at your side.
from office-add-in-samples.
I think the Issue is not related with this sample, is a problem of Outlook Web AddIn template.
I've done the following steps
- Create a new Outlook Web AddIn project
- Set manifest file as startup project
- Set Use multi-factor auth to True
- Set Start Actio to Office Desktop Client
- Run the app
- Do loggin with the loggin promp
- The outlook client is opened
- Click on Display all properties button
- The right pane is opened with this error
This is the code of the project
I've also tried working with outlook add-ins created using VS Code and Yeoman (Javascript and Typescript) and all works fine, I only have this kind of error on Outlook Web AddIns projects created using Visual Studio 2019 Enterprise.
from office-add-in-samples.
The reason for this to fail is that you changed the startup from both projects (Multi Startup) into one project (Single Startup). Only the installation of the Outlook Add-in is started by selecting the Manifest project (OutlookWebAddin) as startup project.
At the time you run the add-in Outlook tries to load the 'website' that should have been served by starting the second project. Because you changed the startup to the Manifest project the website is not served and cannot show you the content.
If you right click the solution and select Properties in VS you should see the startup dialog showing TWO projects are started:
The first one (OutlookWebAddinWeb) is serving you the content of the TaskPane and is served like a website.
The second one (OutlookWebAddin) contains the Manifest that tells Outlook how the Ribbon looks like and where to find the website to serve the content (the above website OutlookWebAddinWeb).
Here you can see what the result is from your demo code you included in the OutlookWebAddin.zip
Does this make sense and could this also have happened with your original issue? Please check that the Multi Startup option is enabled to be sure that both the Add-in is installed and the Website (hosting your add-in) is running.
from office-add-in-samples.
It makes sense, but It fails with the multiple startup project option, in fact, when I create an Outlook Web AddIn project the generation resulting code is configured to be executed with multiple startup projects and it fails.
This is the result of generating a new Outlook Web AddIn project
- Set multi factor to true
- Press F5
- Log In in the loggin prompt
- Opened in Chrome (it works, mail properties are displayed)
- Stop de debugging process
- Set Start Action to office desktop client in the manifest project properties
- Press F5
- Opened in Outlook desktop client
- Fails on loading
I hope it helps
from office-add-in-samples.
It is working without issues at my side (as you can also see at my properties image above).
Somehow your "Server" is not serving in the context of your Outlook desktop client, so let's do some more tests.
Set your target to Office Desktop Client and start the application by selecting the Solution and hit F5
This should start both loading the Add-in (manifest project) and start a web server at the port specified here:
Now open your browsers and open URL: https://localhos:44346/MessageRead.html
What do you see? It should show you the below webpage:
The properties are obviously not loaded as the webpage is intended to load in the context of the Message. In fact, when you go to Developer Tools you should see the console output "Warning: Office.js is loaded outside of Office client" to prove that.
Let me know if your server is working ... and while you are at it, check the certificate for that page, is it valid?
If it is, go to Outlook, select a message, and click the Display all properties Button. What do you see?
from office-add-in-samples.
Hi @aafvstam
I've tried this following theses steps
Create a new Outlook Web AddIn Project (VS 2019 Enterprise)
Update Manifest project properties
- Set Start Action to Office Desktop Client
- Set Multi-Factor Auth to true
Run with F5
- Login with company email address
- It fails on Outlook
Open in browser
- https://localhost:44353/MessageRead.html
- It works, I can see the page without the properties and I can see the office.js load warning in the developer tools console.
The error in outlook specify that the AddIn is not loaded, if I press F12 in the task pane looking for errors in the console it looks that there is no content loaded in the edge instance contained into the taskpane.
I've no problems on working with add ins in VS Code and JS.
Is that problem exclusive for my computer? Do you have other issues reporting with that problem?
If it helps I'm opened to share you my screen on a teams call.
from office-add-in-samples.
Related Issues (20)
- Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize HOT 1
- Need admin privs to npx install, no? HOT 2
- Outlook event-based activation examples are immature HOT 3
- Converting Outlook VSTO add-in to web add-in HOT 5
- Example works only in OWA HOT 5
- Office-Add-in-NodeJS-SSO Example fails to claim scope HOT 1
- Sample: Outlook-Add-in-SSO-NAA HOT 9
- How to debug against outlook online account with MFA? HOT 4
- Not able to display Html HOT 5
- Error when using non-localhost as redirect URI. HOT 8
- How to create Word Add-in SplitButton Control? HOT 1
- Office.AutoShowTaskpaneWithDocument with shared runtime? HOT 6
- Outlook-Add-in-SSO-NAA: Questions on usage on mobile devices HOT 2
- Can we implement NAA-SSO for spam-addins?
- Hello World add-in doesn't work in desktop Outlook 2016 HOT 4
- In SSO fallback, getAccessTokenMSAL() returns a different result than Office.auth.getAccessToken()
- In SSO Fallback, getAccessTokenMSAL() returns a different user than Office.auth.getAccessToken() HOT 7
- The Spam Reporting example uses Office.onReady, which will not work on Classic Outlook HOT 3
- Edit the Existing mail HOT 8
- is there a equation support? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from office-add-in-samples.