OfficeDev / office-js

A repository for issues related to the Office JavaScript APIs and Office Add-ins platform. Find the Office.js library in Office.js CDN: https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
724 stars 106 forks source link

SciptLab is not working #5513

Open shermaro91 opened 1 month ago

shermaro91 commented 1 month ago

ScriptLab addin is not working for all office applications. Getting below error while opening the addin.

Error: { "stack": "TypeError: Failed to fetch\n at fm (https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:75656)\n at https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:79283\n at Array.map ()\n at Cm (https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:79275)\n at Cm.next ()\n at x (https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:67224)\n at p (https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:68056)\n at https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:69927\n at C (https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:69982)\n at x (https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:67284)", "message": "Failed to fetch", "sagaStack": "at fg \n at fg \n at ou \n at xm \n at Cm \n TypeError: Failed to fetch\n at fm (https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:75656)\n at https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:79283\n at Array.map ()\n at Cm (https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:79275)\n at Cm.next ()\n at x (https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:67224)\n at p (https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:68056)\n at https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:69927\n at C (https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:69982)\n at x (https://script-lab.public.cdn.office.net/script-lab/7dttl/static/js/main.5fae7954.js:353:67284)" }

github-actions[bot] commented 1 month ago

Here are some similar issues that might help you. Please check if they can solve your problem.

Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

Solution 1:

We are not able to reproduce this in our setup. We are able to open code editor and also able to run the default script available in the addin. Could you collect and share the following:

  1. Client version, you can get it via View -> settings -> General ->About outlook
  2. Network logs from boot till repro.
  3. console trace of time when you launch addin.
  4. Add the steps that you do before launching the addin,

Reference:

Reference:

Powered by issue-sentinel

shermaro91 commented 1 month ago

Getting below error while loading scriptLab.

https://unpkg.com/@types/office-js@1.0.480/index.d.ts' (redirected from 'https://unpkg.com/@types/office-js/index.d.ts') from origin 'https://script-lab.public.cdn.office.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

dentonlt commented 1 month ago

Same issue on Office 365 (Excel), both desktop and browser, enterprise account.