OfficeDev / script-lab

Create, run and share your code directly from Office
MIT License
703 stars 161 forks source link

Scriptlab reports errors upon launch #1001

Closed moody31415 closed 6 months ago

moody31415 commented 1 year ago

Bug Report

Expected behavior:

I expect scriptlab to load successfully and show me my previously used snippets

Actual behavior:

Scriptlab fails to load with an unexpected error, which upon investigation states "failed to fetch", and I cannot interact with my previously used snippits. I can see the list of them in 'backstage', but I cannot load any of them to see their contents nor use them.

Steps to Reproduce:

  1. Close all instances of Excel
  2. Open Excel
  3. Click on 'scriptlab' in ribbon
  4. Click on 'code' in ribbon

Expected: Loads Actual: Unexpected Error

Failure Logs:

Error: { "stack": "TypeError: Failed to fetch\n at https://script-lab.azureedge.net/static/js/main.469858da.chunk.js:1:159589\n at c (https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:3432868)\n at Generator._invoke (https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:3432621)\n at Generator.next (https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:3433227)\n at r (https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:82159)\n at s (https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:82362)\n at https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:82421\n at new Promise ()\n at https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:82302\n at zs (https://script-lab.azureedge.net/static/js/main.469858da.chunk.js:1:159349)", "message": "Failed to fetch", "sagaStack": "at zl \n at zl \n at l \n at fu \n at gu \n TypeError: Failed to fetch\n at https://script-lab.azureedge.net/static/js/main.469858da.chunk.js:1:159589\n at c (https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:3432868)\n at Generator._invoke (https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:3432621)\n at Generator.next (https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:3433227)\n at r (https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:82159)\n at s (https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:82362)\n at https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:82421\n at new Promise ()\n at https://script-lab.azureedge.net/static/js/3.a6763856.chunk.js:2:82302\n at zs (https://script-lab.azureedge.net/static/js/main.469858da.chunk.js:1:159349)" }

Attaching the debugger shows me this error in the console Access to fetch at 'https://unpkg.com/@types/custom-functions-runtime/index.d.ts' from origin 'https://script-lab.azureedge.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. unpkg.com/@types/custom-functions-runtime/index.d.ts:1 Failed to load resource: net::ERR_FAILED splash.screen.ts:37 Global error handler: t.invokeGlobalErrorHandler @ splash.screen.ts:37 splash.screen.ts:38 TypeError: Failed to fetch at utilities.ts:186:26 at c (runtime.js:63:40) at Generator._invoke (runtime.js:293:22) at Generator.next (runtime.js:118:21) at r (asyncToGenerator.js:3:20) at s (asyncToGenerator.js:25:9) at asyncToGenerator.js:32:7 at new Promise () at asyncToGenerator.js:21:12 at Ks (main.469858da.chunk.js:1:159814) t.invokeGlobalErrorHandler @ splash.screen.ts:38

Screenshot:

wandyezj commented 6 months ago

Fixed in the latest version of Script Lab.