OfficeDev / teams-toolkit

Developer tools for building Teams apps
Other
454 stars 186 forks source link

Could not read source map error and few other errors while debugging #5201

Open amansani15 opened 2 years ago

amansani15 commented 2 years ago

Describe the bug I am using teams tool kit for developing teams application. When I am trying to debug and test the changes locally, I am getting many errors in the debug console related to source map, service worker etc.,. I tried researching about these issues, but nothing helped.

To Reproduce Steps to reproduce the behavior:

  1. Run the teams applications locally using Run-> Start Debugging - F5 command
  2. Seeing many errors in debug console

Expected behavior No errors in the debug console. Errors causing hard to test and debug the work locally.

Screenshots Uploaded the docx file of whole debug console

VS Code Extension Information (please complete the following information):

Additional context This is the version I have in my current auth files in the public folder: src="https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js"

More information is available in the attached file. Any help or inputs are highly appreciated. TIA

DebugConsoleErrors.docx

ghost commented 2 years ago

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

kuojianlu commented 2 years ago

@amansani15 The errors you mentioned in debug console (related to source map, service worker, etc.) occurs when loading Teams web client. Please note that these errors have no effect on your app and you can just ignore them. By the way, you can disable source map by adding "sourceMaps": false to Attach to Frontend configuration in .vscode/launch.json. Please let us know if you have any further concerns.

amansani15 commented 2 years ago

@kuojianlu Thank you for the reply. I added source maps to false and now I don't see the errors related to source map. Is there a way to remove the service worker errors and logging related stuff as well. Below is the screenshot related to the errors:

image

kuojianlu commented 2 years ago

@amansani15 The other erros (related to service worker, etc) are runtime logs when loading Teams web client. Sorry that they can not be removed from the toolkit side. However, you may have two ways to mitigate this problem:

  1. When Teams web client is loading, right click in debug console, and select "Clear Console" to clear the console output.
  2. Add "internalConsoleOptions": "neverOpen" to Attach to Frontend configuration in .vscode/launch.json, then the debug console will not be automatically opened when debugging session starts.

Hope the above ways could help you.

amansani15 commented 2 years ago

My preferred option is to get rid of the errors when debugging. Sorry, either of the way is not the option I am looking for. This was not the case before if I remember it correctly.

kuojianlu commented 2 years ago

@amansani15 Sorry for the inconvenience. From my experience, this case lasts a long time. I am curious how you will use the debug console?

@MuyangAmigo How to let Teams know this issue?

amansani15 commented 2 years ago

@kuojianlu I use it to print any outputs, if I have so many errors listed in the console, it is a bit hard for me to scroll number of lines just to see any outputs. It would be great if we can get rid of those errors and keep the console neat and clean.