# \[SOLVED\] Dark theme breaks now and then

**URL:** <https://forum.mattermost.com/t/solved-dark-theme-breaks-now-and-then/3395>\
**Category:** Troubleshooting\
**Created:** [June 13, 2017, 6:47pm UTC](https://forum.mattermost.com/t/solved-dark-theme-breaks-now-and-then/3395 "2017-06-13T18:47:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sedrubal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/sedrubal/32/1339_2.png) [@sedrubal](https://forum.mattermost.com/u/sedrubal)\
**Post date:** [June 13, 2017, 6:47pm UTC](https://forum.mattermost.com/t/solved-dark-theme-breaks-now-and-then/3395/1 "2017-06-13T18:47:43Z")

</div>

#### Summary

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](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

 ![](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/0/0029501997abf28b6e9b01a8f8c0fc9a78bae248.png)

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![lindy65](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/lindy65/32/1811_2.png) [@lindy65](https://forum.mattermost.com/u/lindy65)\
**Post date:** [June 16, 2017, 9:39am UTC](https://forum.mattermost.com/t/solved-dark-theme-breaks-now-and-then/3395/2 "2017-06-16T09:39:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sedrubal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/sedrubal/32/1339_2.png) [@sedrubal](https://forum.mattermost.com/u/sedrubal)\
**Post date:** [July 12, 2017, 7:35am UTC](https://forum.mattermost.com/t/solved-dark-theme-breaks-now-and-then/3395/3 "2017-07-12T07:35:55Z")

</div>

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:

```auto
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… 🙈

---

<div class="post-metadata">

**Author:** ![lindy65](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/lindy65/32/1811_2.png) [@lindy65](https://forum.mattermost.com/u/lindy65)\
**Post date:** [July 12, 2017, 1:10pm UTC](https://forum.mattermost.com/t/solved-dark-theme-breaks-now-and-then/3395/4 "2017-07-12T13:10:12Z")

</div>

Thanks @sedrubal,

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