Excel Automate Code Editor Crashes With Frowny Face

Occasional Contributor

When I try to open a particular script that previously loaded, it crashes with a frowny face. 




It stays open long enough for me to copy the script or to paste in a new script and save it if I manage to do so quickly. If I copy the text to a new script it does the same thing.  Other scripts can be edited and run.  In the developer console, this appears:



$value error


HTTP/1.1 404 Not Found Cache-Control: no-cache Transfer-Encoding: chunked Content-Type: application/json Content-Encoding: gzip Vary: Accept-Encoding Strict-Transport-Security: max-age=31536000 request-id: b03c7ba8-33c0-47e3-a19b-755295542163 client-request-id: b03c7ba8-33c0-47e3-a19b-755295542163 x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West US","Slice":"E","Ring":"4","ScaleUnit":"003","RoleInstance":"SJ1PEPF00000D06"}} Access-Control-Allow-Origin: * Access-Control-Expose-Headers: ETag, Location, Preference-Applied, Content-Range, request-id, client-request-id, ReadWriteConsistencyToken, SdkVersion, WWW-Authenticate, x-ms-client-gcc-tenant X-Content-Type-Options: nosniff Date: Tue, 10 May 2022 01:21:42 GMT

GET /v1.0/users/<DELETED>/photo/$value HTTP/1.1 Accept: */* Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Authorization: Bearer <DELETED> Connection: keep-alive Host: Origin: Referer: Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: cross-site User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36 Edg/101.0.1210.39 sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101" sec-ch-ua-mobile: ?0 sec-ch-ua-platform: "Windows"

javascript.js error



What causes this behavior?  Is there anything I can do about this?


2 Replies
best response confirmed by jiwhiteff (Occasional Contributor)
I had a similar problem three days ago. Previously working script would not run, nor open in editor.
Today the problem has gone away. The original script is working again.
By a sequence of comment/uncomment/copy/pasting/reload I found that it seemed to be related to the depth of function calls within my script. Reducing the number of functions seemed to allow it to work.
So all good now, cause unknown?
Yes, I solved it by breaking up my script into multiple scripts and calls in Power Automate.