Teams Javascript Error (windows 10 1709)

Our company has been experiencing this issue for about a week now.  It is slowly spreading to many of our employees and crashes the program start.  Note: we are using folder redirection to move the user profile under onedrive but we have already tried and this is not affecting the results).  Error is on windows 10 1709 machines.  I took a video for Office 365 that shows the error, for some reason the program fails if %appdata%\microsoft exists and since the program (and several other office products) create this location if it doesn't exist, the result is the launch of teams always fails after the issue is received.  There was an update announced on the teams blog 4/5 which we believe may be the cause.

<*** Private Message is removed for privacy ***> 

Hi Benjamin Wilkins,

 

Thanks for your video for clarification.

 

Based on your description and video, the Teams folder doesn’t exist under Microsoft folder, after you launch the Teams with the error received, the Teams folder pops up under Microsoft folder.

 

May I know when you install Teams, if you use the default location? Since generally, after installed the Teams, the Teams will be as a folder under Microsoft, so I would like to know if you cannot see the Teams folder or the error pops up the first time you use Teams? Or it happens recently?

 

From your video, after you launched the Teams with error received, you have renamed the Microsoft folder under “%AppData%, and Teams folder will be generated under new-generated Microsoft folder. Please check if you can launch Teams without any error and the content in Teams folder will show up when haven’t renamed the Microsoft folder.

Thanks,

Iry

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Below are the steps I took in the video.  The video was originally taken based on a request from Office 365 support.  They asked me to try and clear the teams cache at %appdata%\microsoft\teams.  I showed that folder didnt exist to give them the results of that request, IE the error persisted.  The same thing happens just after install when the appdata\microsoft\teams folder exists and is not empty (This can be seen in the video after step 5 as launching teams recreates the cache).  We are using the default location for the teams install, I have no customized settings in that regard.  The teams install is being pushed to users silently on logon via gpo and was working successfully until recently.  We believe it was related to the 4/5/2018 update to teams as that was right around the time the issue started appearing.  We use folder redirection as recommended in the link below.  365 support keeps blaming that even though it is "recommended" on their page and has worked for well over 6 months.  

https://support.office.com/en-us/article/redirect-windows-known-folders-to-onedrive-e1b3963c-7c6c-4694-9f2f-fb8005d9ef12?ui=en-US&rs=en-US&ad=US

  1. Open appdata\microsoft to show there is no teams folder
  2. Try to open teams, receive error
  3. Show that appdata\microsoft\teams was created but empty (at this point teams will repeatedly get the error)
  4. Rename appdata\microsoft to Microsoft-old (because the error specifically relates to appdata\microsoft existing)
  5. Reopen teams to show it will open (this recreates the microsoft folder)
  6. Kill all teams processes
  7. Reopen teams to show it will get the error again (note: in this test it took me a total of 3 opens for the error to reoccur.  It is usually instant.  I think this was because I was rushing to keep the video short.)
  8. At this point teams will continue to get the error repeatedly as it did back at step 3.

Basically, if appdata\microsoft exists then teams will error out and wont launch.  Since all the microsoft office products save data under appdata\microsoft this has the effect of teams always failing now.  I've tried the new msi installer released as part of the 4/5 update and that gave the same error.  To the best of my troubleshooting ability it appears the latest release of teams unintentionally broke compatibility with roaming profiles (folder redirection gpo).

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Benjamin Wilkins,

Ok, in summary, I understand that once the "Microsoft" folder exists under "%AppData%", when you start Teams, you will get error. And when you rename the "Microsoft" folder, it works OK. Then based on your video and steps, after you run Teams, it will generate a "Microsoft" folder automatically so that you cannot start Teams again.

And it seems that you use Group Policy to install Teams in your organization. Generally, when I download Office 2016 and Microsoft Teams with the default location, the locations of the "Microsoft" folder and "Teams" folder are as below capture (type "%AppData%" in the File Explorer and select Microsoft > Teams):

For the folder redirection, I am not sure if it causes the issue, however, I have checked the article you use and found that if you redirected folder as an installation location for some legacy applications, the application may be not working. 

I suggest you to download Office 2016 or Teams under default location without redirection. 

For your reference: https://teams.microsoft.com/downloads

Thanks,

Iry

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Benjamin Wilkins,

If you have any update about the issue?

Thanks,

Iry

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Teams installs under %localappdata%\microsoft\teams\ by default and this is not redirected.  The roaming appdata (%appdata%) is redirected which includes the teams cache.  I have narrowed it down in the program files. 

In the file utility.js there is an if statement that checks if this folder exists and runs a mkdir if it does not.  The problem is the if statement evaluates as false every time (IE it thinks the folder does not exist even when it does) and thus tries to create the folder each and every time it runs.  This causes the error message and crash, the javascript cant create a folder that already exists.  

Is there some way to report a code bug like this so they can correct the if statement so it evaluates properly.  I got the program working on a couple test machines by commenting out the flawed code but this is only a temporary fix as teams updates and overwrites the changes.

3 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Benjamin Wilkins,

Thanks for your update. For reporting JavaScript error code, you can try to contact Microsoft MSDN for further checking.

Of course, if you need any help from us, feel free to come back to us, we will still assist you. And any update you share are welcomed.

Regards,

Iry

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated July 3, 2023 Views 8,647 Applies to: