Hi All,
I’ve recently moved the discourse forum from one server to another - an old Ubuntu (13?) to version 16.06. To the best of my understanding, it is running in a docker container with an apache/nginx front-end and is using version: 2.1.0.beta1 +282.
To accomplish this move, I upgraded to the latest version on the existing server, took a full backup, then installed the latest version on the target and imported the data. All seemed fine for one day.
Today, I was able to access the server (I was still logged in) but other people couldn’t. Then, I lost my access, meaning I got a blank screen, which is what other people are experiencing. One user did say that it worked on her phone, but not her main PC, but I suspect it is not working on either now.
Looking in Chrome dev tools, I have a host of errors of the form:
(index):32 Uncaught SyntaxError: Invalid or unexpected token
_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:59785 Uncaught Error: Could not find module `preload-store` imported from `discourse/models/topic`
at o (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:59785)
at i (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:59763)
at _ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:59820
at e (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:59687)
at require (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:59819)
at _application-fad5e5f87c66e66d6c184629209e8cc05bc33467507b76e7013a3ff871328b38.js:12551
_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:59791 Uncaught Error: Could not find module preload-store
at s (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:59791)
at require (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:59806)
at (index):307
at (index):307
_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:59791 **Uncaught Error: Could not find module preload-store**
at s (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:59791)
at require (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:59806)
at (index):313
at (index):313
**(index):317 Uncaught SyntaxError: Invalid or unexpected token**
_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:29446 **TypeError: Cannot read property 'startRouting' of undefined**
at startRouting (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:15321)
at s.didBecomeReady (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:16290)
at invokeWithOnError (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12554)
at a.flush (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12613)
at u.flush (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12737)
at p.end (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12807)
at p.run (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12921)
at p.join (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12952)
at Function.u.join (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:34030)
at HTMLDocument.<anonymous> (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:34093)
u @ _ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:29446
_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:29446 TypeError: Cannot read property 'startRouting' of undefined
at startRouting (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:15321)
at s.didBecomeReady (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:16290)
at invokeWithOnError (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12554)
at a.flush (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12613)
at u.flush (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12737)
at p.end (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12807)
at p.run (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12921)
at p.join (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:12952)
at Function.u.join (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:34030)
at HTMLDocument.<anonymous> (_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:34093)
u @ _ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:29446
Things I have tried include:
- restarting Apache
- restarting NGINX
- stopping the app in the container/docker
- restarting the app in the container/docker
- I’ve rebuilt the app.
- I’ve read this: How do I manually update Discourse and Docker image to latest?
- – as a consequence, I did the git pull, rebuild step - I already had the latest code.
- – I also tried the safe mode - that seemed to get me in once or twice, but now no longer works.
Looking at the code, I see that it is unhappy with this on the main page (view > source)
<script>//<![CDATA[
e��ø�[�)q�h��i�$�5�D4�����z��J�;cmঀq`����\z��,��[��Ы��m��>J���!%>��R �R�<i���L��(䔽�$��b\1�_�kH�#�BF;*�>7�\V��T�K��D���B�bK�*���aޢ-��u7�Q��e��b�fۺ�QC��V�]���a�3U��0�.k��LD��U�0˙�e.=1�.�>�H:��������*���(=i�)%kk^9d>�p���,���8��yH :�Y3����G�/���kQ����:p���G+�1XF���}] �ʘ���x���
//]]></script>
And looking through the code in the docker container, I can see where that is inserted (in file: /app/views/layouts/application.html.erb):
<%= preload_script "ember_jquery" %>
------> <%= preload_script "preload-store" %>
<%= preload_script "vendor" %>
Does anyone have any ideas as to why this might have occurred and how I could resolve it?
Thanks, Steve