Comments (8)
After a lot of trial and error, and line by line process of elimination, I found the piece of code causing a crash in chakra JS engines. It was a line trying to add/concatenate two structures.
I wish to thank you all greatly for your support and all your responses. Without your guidance and help, I would have never found the offending code. I would have proceeded blindly with the debug registries enabled.
Thank you all so much and closing this ticket.
from office-js.
any feedback on this @exextoc? Thank you.
from office-js.
We tried reproing this on our builds, and it should work correctly. (we tried both our internal add-in and the manifest that you provided).
I did some network capture and found out clicking the report button does not download the necessary javascript files and resources.
This is suspicious. This will certainly cause an error if the bundle.js file is not downloaded. Can you check if the bundle is there?
C:\Users\[username]\AppData\Local\Microsoft\Office\16.0\Wef\[GUID]\[Encoding]\Javascript\[Add-in ID]\bundle.js
We simulated the bundle not downloading, and got the same results as you.
If we enable the debug registry for the addin (https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/debug-autolaunch?tabs=windows#mark-your-add-in-for-debugging-and-set-the-debugger-port) then the addin works.
This is also interesting. In that setting the debug setting will change the JS engine to V8 instead of Chakra. (note that MEC builds are still running Chakra, but the Monthly CC builds have moved to V8). So if your JS bundle contains some things that are not compatible with Chakra this could be the cause.
However, we did test your sample manifest with Chakra and it seemed to work, so I think likely this may be a bundle.js download issue instead.
from office-js.
Hello @exextoc,
I have tested again with the monthly enterprise channel and found that all the Javascript files are downloaded during the loading of outlook. So in effect all bundle.js files are present.
The part that is interesting though is that in the current/beta channels, when the report button is clicked, it tries to get a copy of the JS file and allowed.json file. In the failing version both files are not downloaded. Here is what I did :
- Opened Outlook with 2 instances (different AppIDs) of the same spam button. (Opening outlook downloads all the JS files for addins.)
- Enabled debugging for 1 of the AppIds.
- Deleted the bundle.js for both instances.
- Clicked on debuggable instance and found that it created a bundle.js file and a map file in the WEF folder.
- Clicked on non-debuggable instance and found that it did not create the bundle.js file.
I don't know about chakra, but if our code works in your tests, then it should work with the MEC-Chakra version right? How do we know if the Outlook client is chakra or V8 powered? Is there a test we can ask our customers to run to determine the JS engine? Are other channels (Current, semi-annual, etc...) powered by chakra as well?
Any advice on how to proceed? Or is there a plan to migrate everything to V8 any time soon?
Thank you very much.
from office-js.
I have tested again with the monthly enterprise channel and found that all the Javascript files are downloaded during the loading of outlook. So in effect all bundle.js files are present.
This seems to indicate that the bundle download is working as intended - the bundle files should be downloaded when Outlook boots
However, we're a bit confused by the next part:
The part that is interesting though is that in the current/beta channels, when the report button is clicked, it tries to get a copy of the JS file and allowed.json file. In the failing version both files are not downloaded. Here is what I did :
By "failing version", do you mean MEC? Or by "failing version", do you mean the add-in that is not marked for debugging from your steps below?
- Opened Outlook with 2 instances (different AppIDs) of the same spam button. (Opening outlook downloads all the JS files for addins.)
- Enabled debugging for 1 of the AppIds.
- Deleted the bundle.js for both instances.
- Clicked on debuggable instance and found that it created a bundle.js file and a map file in the WEF folder.
- Clicked on non-debuggable instance and found that it did not create the bundle.js file.
These steps are executed in MEC, correct? Not current/beta channels? When you set the debug registry key for an add-in, Outlook will be more aggressive in downloading the bundle in order to help developers with debugging, which is why you are seeing this happening in the add-in marked for debugging.
I don't know about chakra, but if our code works in your tests, then it should work with the MEC-Chakra version right? How do we know if the Outlook client is chakra or V8 powered? Is there a test we can ask our customers to run to determine the JS engine? Are other channels (Current, semi-annual, etc...) powered by chakra as well?
Any advice on how to proceed? Or is there a plan to migrate everything to V8 any time soon?
Based on our testing, yes, the code works in MEC-Chakra version. Unfortunately, there is no easy way to check what version of the engine is running, but V8 should be enabled now for all channels except MEC and semi-annual, as of now. MEC V8 enablement should come soon in the near future.
from office-js.
Thank you for all the answers @Adrian-MSFT .
You are right, all these tests were done in the MEC version. And that when I was saying 'failing version', I meant the addin without the debug-registry enabled. This sentence explains what I was seeing :
When you set the debug registry key for an add-in, Outlook will be more aggressive in downloading the bundle in order to help developers with debugging, which is why you are seeing this happening in the add-in marked for debugging.
May I know how I can test the code in MEC-Chakra version like what you did? I intend to test our releases against it. As for V8 enablement, do you have any timelines that you can share? Will V8 be enabled for semi-annual as well? Thank you very very much.
from office-js.
@glr0221 Since MEC is not on V8 yet, running any spam add-in in MEC (without the debug registry key set) should be testing the code against the MEC-Chakra version.
I reached out to the team that owns our JS engines. Unfortunately, they do not have any concrete timelines to share for the V8 enablement in these channels.
from office-js.
Thank you for all your answers @Adrian-MSFT . Thank you also for reaching out to your internal teams in hope of getting an update on the V8 roll out.
I will check and see if I can figure this one out. I will have to do trial and error to find the offending code.
Thanks again.
from office-js.
Related Issues (20)
- body.clear() not working for content controls HOT 3
- How to make slide active Or How to insert image using index HOT 4
- Addin sample not showing in new look outlook and browsers. HOT 5
- Identifying Usage of New Outlook in Office-js Add-ins HOT 1
- Not able to sideload outlook addin. in macbook there is no option to add the manifest file HOT 5
- Inserting Signature with the OnMessageSend event duplicates the signature
- The identity API is not supported for this add-in in online Word HOT 2
- Excel Online: calculation state can get stuck in Pending state when workbook contains charts HOT 3
- IP Address Range Needed for Microsoft Office Add-in Validation Process
- Office API messageParent Outlook on android doesn't work
- NAA: Unable to acquire access token for event-based activation (onMessageSend) HOT 2
- Outlook addin using Bootstrap modal or offcanvas bleeds through on Mac version of Outlook. Classic and New Outlook for Mac. HOT 2
- [Word API] Document.compare: ability to specify Original and Revised document?
- Outlook NAA issue: "Something went wrong. [7q6cl]" Error HOT 5
- Web Outlook provides improper attachment data if attachment is still uploading to the email HOT 2
- [Question] Is it safe to use `CustomFunctions.delayinitialization()`
- New Outlook - emails stuck in outlook at queued or draft status HOT 3
- context.application.createDocument works only first time HOT 1
- WorkBook level Define name is getting corrupted while reopening excel using base64
- In Outlook, getAllInternetHeadersAsync works on an item in the Inbox, but not the sent folder
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-js.