Minified builds found on CDN's do not work. They produce errors related to emojione.
<html>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.conversejs.org/3.3.2/css/converse.min.css">
<script src="https://cdn.conversejs.org/3.3.2/dist/converse.min.js"></script>
</head>
<body>
<script>
converse.initialize({
bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
show_controlbox_by_default: true
});
</script>
</body>
</html>
converse.min.js:sourcemap:293 Uncaught SyntaxError: Invalid regular expression: /<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|(?:ðŸ³)ï¸?â€?(?:🌈)|(?:ðŸ‘)ï¸?â€?(?:🗨)ï¸?|[#-9]ï¸?⃣|(?:(?:ðŸ´)(?:�[�-�]){1,6})|(?:�[�-�]){2}|(?:(?:�[��]))ï¸?(?:�[�-�])?â€?(?:[⚕⚖✈]|�[�-�]|�[������])|(?:�[��]|�[�-�])(?:�[�-�])?â€?[♀♂⚕⚖✈]?ï¸?|(?:(?:â¤|�[�-��])[â€ï¸]{0,2}){1,3}(?:â¤|�[�-��])|(?:(?:â¤|�[�-��])ï¸?){2,4}|(?:�[����-���-�]|�[��]|�[�-�]|�[�-�]|�[�-�]|⛹|👯)ï¸?(?:�[�-�])?â€?[♀♂]?ï¸?|(?:[â˜â›¹âœŠ-âœ]|�[�-�]|�[�-��-��-��-�]|�[�-�])ï¸?(?:�[�-�])|(?:[↔-↙↩-↪]ï¸?|[#*]|[〰〽]ï¸?|(?:�[�-�]|🆎|�[�-�])ï¸?|â“‚ï¸?|[㊗㊙]ï¸?|(?:�[�-�]|🈚|🈯|�[�-�]|�[�-�])ï¸?|[‼â‰]ï¸?|[â–ª-▫▶◀◻-â—¾]ï¸?|[©®]ï¸?|[™ℹ]ï¸?|🀄ï¸?|[⬅-⬇⬛-⬜ââ•]ï¸?|[⌚-⌛⌨ââ©-â³â¸-âº]ï¸?|ðŸƒ|[⤴⤵]ï¸?)|[✀-âž¿]ï¸?|[�-�][�-�]ï¸?|[☀-⛿]ï¸?|[0-9]ï¸/: Range out of order in character class
at new RegExp (<anonymous>)
at emojione (converse.min.js:sourcemap:293)
at converse.min.js:sourcemap:293
at converse.min.js:sourcemap:266
at converse.min.js:sourcemap:266
emojione @ converse.min.js:sourcemap:293
(anonymous) @ converse.min.js:sourcemap:293
(anonymous) @ converse.min.js:sourcemap:266
(anonymous) @ converse.min.js:sourcemap:266
Do not use minified builds
Hope that's enough data. I nearly gave up adopting this 2 hours after finding it, because it was hard for me to debug given lack of familiarity with the project.
The specific build you link to in your example, https://cdn.conversejs.org/3.3.2/dist/converse.min.js, works fine for me. In fact, it can be tested live here: https://conversejs.org/3.3.2/
So I'm a bit confused. Is that the actual build that's giving you problems, or are you using another build?
Thanks for the quick response. The example is the actual file that fails. Removing ".min" from the filenames fixes the issues. So, the problem appears to be the browser?
I'll check a various clients and report back. This error is from this client:
Google Chrome 63.0.3239.132 (Official Build) (64-bit)
Revision 2e6edcfee630baa3775f37cb11796b1603a64360-refs/branch-heads/3239@{#709}
OS Mac OS X
JavaScript V8 6.3.292.49
Flash 28.0.0.161 /Users/admin/Library/Application Support/Google/Chrome/PepperFlash/28.0.0.161/PepperFlashPlayer.plugin
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Command Line /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --flag-switches-begin --flag-switches-end
Executable Path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Profile Path /Users/admin/Library/Application Support/Google/Chrome/Profile 1
Variations c134752e-b8b72c88
4c328cc8-3f4a17df
3095aa95-3f4a17df
47e5d3db-3d47f4f4
1210a805-ecd831c
b1edbc38-cf4f6ead
ba3f87da-45bda656
776de70c-eadfd437
79616653-3f4a17df
9e201a2b-6e3ce1c
68812885-4d2fac87
f347910c-3d47f4f4
4b61504a-d25ea691
9773d3bd-f23d1dea
8e3b2dc5-93702590
f79cb77b-3d47f4f4
4ea303a6-ecbb250e
3d7e3f6a-2eb01455
d92562a9-ca7d8d80
90bcbadc-3f4a17df
25fc488a-4d2fac87
1c2f7bbf-3f4a17df
58a025e3-c2b41702
1bced4a3-90fa85cd
b2f0086-93053e47
ef25c1eb-3f4a17df
494d8760-6843eff2
f47ae82a-86f22ee5
3ac60855-486e2a9c
f296190c-92bb99a9
4442aae2-6e597ede
ed1d377-e1cc0f14
75f0f0a0-e1cc0f14
e2b18481-6e597ede
e7e71889-4ad60575
94e68624-803f8fc4
f141d4bc-28ad44a
e9ce63c1-36ab09a2
da4aaa01-4d2fac87
Same issue in safari. Regex error in the js.map -- I'm scratching my head. I am inclined to think it's something situational on my end, but I haven't got a clue.
I'm serving the html file from a server on my local host. I'll deploy it into the wild and see what happens.
In Safari, the browser window shows this information:

I'm not sure that this is entirely relevant. it only happens with safari, while the html file is being served from http://localhost.
https://hashbang.info/index_converse_min.html
https://hashbang.info/index_converse_norm.html
The minified one does not work for me, in any browser on my mac, although it works fine from your site.
The example is cut and paste from the documentation.
Your actual website works fine from my computer.
scratches head
root@prime:/var/www/hashbang.info# diff index_converse_norm.html index_converse_min.html
4,5c4,5
< <link rel="stylesheet" type="text/css" media="screen" href="https://cdn.conversejs.org/3.3.2/css/converse.css">
< <script src="https://cdn.conversejs.org/3.3.2/dist/converse.js"></script>
---
> <link rel="stylesheet" type="text/css" media="screen" href="https://cdn.conversejs.org/3.3.2/css/converse.min.css">
> <script src="https://cdn.conversejs.org/3.3.2/dist/converse.min.js"></script>
I tested your example code as-is yesterday before I replied and it worked for me.
Try to do a hard refresh of all CDN assets through the browser. Perhaps something is cached.
The bourbon error is something else, that's CSS. To fix that, remove ./css/converse.min.css and generate it again with make css/converse.min.css.
I have never used firefox before. Just installed it. It exhibits the same issue.
I'm waiting on an ubuntu install to try it there.
@richard-fairthorne any update on this?
The error looks like something feed UTF-8 data into a parser expecting Latin1. There doesn't seem to be any encoding specified on the HTML data from those pages on hashbang.info, nor from the CDN. Possible cause? See if adding <meta charset=utf-8> appears to fix it.
I confirm this issue. <meta charset=utf-8> fixes running the minified version for me. I use another charset, and the minified version is somehow incompatible with mine.
I confirm the workaround that Zash and badfiles are using.
https://hashbang.info/index_converse_min_utf-8.html
It seems as though, for a wide variety of browsers on mac, it only works after setting the character set to UTF-8. Is this something that a BOM could solve? I had to find a temporary solution, but I'd love to switch back.
I'll see if I can find a fix that doesn't require possibly breaking changes to websites.
Easy peazy!
If the documentation were updated to include the following tag, or similar, the problem would be resolved:
<script charset='utf-8' src="https://cdn.conversejs.org/3.3.2/dist/converse.min.js">
This solution is based on Zash/badfiles, requires no code changes, and fixes the problem across all of my browsers.
https://hashbang.info/index_converse_min_utf-8_script.html
Thanks for your help everyone. I'm patching the documentation now, for your consideration.