[SOLVED] Dark theme breaks now and then


I have “Mattermost Dark” theme enabled and sometimes the style looks quite broken and unreadable.

Details on GitHub: https://github.com/mattermost/platform/issues/5741

Steps to reproduce

I found no way to consistently reproduce this.

  • Firefox
  • GitLab Mattermost 3.9.0 and before
  • let Mattermost running for some days/weeks

Expected behavior

Things should look as usual:

  • cloud.githubusercontent. com/assets/5571650/23833185/6ddce7f0-0742-11e7-8c2a-11ff7c996e29.png

Observed behavior

more images:

  • cloud.githubusercontent. com/assets/5571650/26512076/177b8980-4265-11e7-8295-05886f9efad7.png
  • cloud.githubusercontent. com/assets/5571650/26512097/40080220-4265-11e7-955a-8fe8016a97dc.png

This error message appears in firefox developer console just after reloading the tab on a page with dark theme (not /<team>/integrations/) when the issue currently exists:

Unhandled promise rejection DOMException [SyntaxError: "An invalid or illegal string was specified"
code: 12
nsresult: 0x8053000c
location: https://mattermost.xxx.xx/static/main.40a3b202d702380c27ea.js:5]  main.40a3b202d702380c27ea.js:45:13986
	M/</t< https://mattermost.xxx.xx/static/main.40a3b202d702380c27ea.js:45:13986
	N https://mattermost.xxx.xx/static/main.40a3b202d702380c27ea.js:45:13383
	M/< https://mattermost.xxx.xx/static/main.40a3b202d702380c27ea.js:45:13863
	e.exports https://mattermost.xxx.xx/static/main.40a3b202d702380c27ea.js:12:18849
	<anonymous> https://mattermost.xxx.xx/static/main.40a3b202d702380c27ea.js:14:22653
	v https://mattermost.xxx.xx/static/main.40a3b202d702380c27ea.js:14:22511
	y https://mattermost.xxx.xx/static/main.40a3b202d702380c27ea.js:14:22531
  • It may be caused by a long period of inactivity or by waking the computer from sleep, but it does not happen every time.
Things that does not fix the problem
  • changing the channel
  • Reloading the tab
  • Logging out and in again
Things that does fix the problem temporary
  • creating a new empty channel, opening it and reload the tab
  • switch to the “Organization” theme and switch back to “Mattermost Dark”. (The settings modal does not disappear after clicking on the x.) Reload the tab.

Thanks for posting your feedback here @sedrubal,

We’re hoping that, if others are experiencing this issue, they will post here with possible causes and fixes as we haven’t been able to reproduce this.

1 Like

I’m very sorry, I found the reason: I use an addon which changes the user agent from time to time and it always breaks with a specific user agent:

Faked user agent which breaks mattermost:

User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36

but I use Firefox… :see_no_evil:

Thanks @sedrubal,

I’ll close this off for now. Please feel free to come back at any time should you experience any problems!