Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.93k stars 441 forks source link

Azure Portal AzFn Proxies Advanced editor, broken JS error #7478

Open OzBob opened 3 years ago

OzBob commented 3 years ago

Investigative information

Repro steps

Edit Proxies Edit Proxy Click Advance editor JS error in Chrome and Edge image

Expected behavior

Expected behaviour would be as per docs

Actual behavior

[WebsitesExtension] 5:20:49 pm MsPortalFx.Base.Diagnostics.ErrorReporter 3 MsPortalFx.Base.Diagnostics.ErrorReporter: message: Unexpected token o in JSON at position 1 stack: SyntaxError: Unexpected token o in JSON at position 1 at JSON.parse () at u.t._switchContextMenu (https://afd.hosting.portal.azure.net/websites/Content/Dynamic/OP-5r_fljZd5.js:3:6831) at https://portal.azure.com/Content/Dynamic/wOh11kcBVcvk.js:91:1851 at Array.forEach () at n.callback (https://portal.azure.com/Content/Dynamic/wOh11kcBVcvk.js:91:1830) at Function.notifySubscribers (https://portal.azure.com/Content/Dynamic/wOh11kcBVcvk.js:52:1589) at Function.di.notifySubscribers (https://portal.azure.com/Content/Dynamic/uyYvEeA5RKSJ.js:35:17633) at Function.valueHasMutated (https://portal.azure.com/Content/Dynamic/wOh11kcBVcvk.js:52:3341) at i (https://portal.azure.com/Content/Dynamic/wOh11kcBVcvk.js:52:3063) at iu (https://portal.azure.com/Content/Dynamic/uyYvEeA5RKSJ.js:35:3929) From RPC: fx -> WebsitesExtension

Known workarounds

Will try again tomorrow, if it is a regional cache issue...

v-anvari commented 3 years ago

Hi @OzBob, Thank you for the feedback. As you have mentioned, Kindly clear temp files/cache and then re-try, test this on a different web browser.

There were 2 issues in the past that were fixed related to this error, can you also check if you can find any recommendations here

https://social.msdn.microsoft.com/Forums/en-US/11e0312d-d2c0-48d0-94f7-43853466545e/issue-adding-portal-created-certificate-to-verified-custom-domain-web-app

https://social.msdn.microsoft.com/Forums/en-US/b5ca30a2-a4dd-49af-b1a6-6dad607422f6/unable-to-upload-ssl-cert-to-app-services-shows-loading-and-then-an-error-in-the-console-log?forum=windowsazurewebsitespreview

OzBob commented 3 years ago

@v-anvari 60%of the console errors onload of the functionsProxies extension did stop, but the big one that appears when 'Advanced editor' is clicked, still appears, even after removing the entire browser temp file cache and all cookies:

[WebsitesExtension]  4:56:54 pm MsPortalFx.Base.Diagnostics.ErrorReporter 3 MsPortalFx.Base.Diagnostics.ErrorReporter: columnNumber: 6831

fileName: https://afd.hosting.portal.azure.net/websites/Content/Dynamic/ySJFEWG1VM1T.js

lineNumber: 3

message: JSON.parse: unexpected character at line 1 column 2 of the JSON data

stack: t.prototype._switchContextMenu@https://afd.hosting.portal.azure.net/websites/Content/Dynamic/ySJFEWG1VM1T.js:3:6831
n/</<@https://portal.azure.com/Content/Dynamic/_1X6Z49REKPG.js:91:1852
n/<@https://portal.azure.com/Content/Dynamic/_1X6Z49REKPG.js:91:1830
notifySubscribers@https://portal.azure.com/Content/Dynamic/_1X6Z49REKPG.js:52:1589
v-anvari commented 3 years ago

Hi @OzBob , Thank you for the information, can we have the complete repro steps, so that we can reproduce this issue

v-anvari commented 3 years ago

Hi @ehamai , Can you help us here with the error, since this error is coming from the portal.

ehamai commented 3 years ago

@OzBob , Sorry but it's unclear to me if clicking on Advanced Editor fails to actually launch the code editor in a separate tab or if you're just concerned with the error that's being logged in the console. Can you clarify please?

ghost commented 3 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

OzBob commented 3 years ago

The editor in a new tab doesn't open. There is no UI indication that anything went wrong.

OzBob commented 3 years ago

Open Route Click Advanced Editor image No visual change to Portal tab. but in Console:

Uncaught SyntaxError: Unexpected token o in JSON at position 1
    at JSON.parse (<anonymous>)
    at u.t._switchContextMenu (https://afd.hosting.portal.azure.net/websites/Content/Dynamic/ySJFEWG1VM1T.js:3:6831)

Remove all content and data, cookies etc. from browser, even tried opening in Edge Beta InPrivate window. Same response.

ojintoad commented 3 years ago

Any update here?

I can recreate in:

quite readily. I can recreate in firefox with troubleshoot mode as well.

v-anvari commented 3 years ago

Tagging @ehamai , for further investigation