Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS errors on fresh install of v0.7.x #3200

Closed
pichalite opened this issue May 31, 2015 · 34 comments
Closed

JS errors on fresh install of v0.7.x #3200

pichalite opened this issue May 31, 2015 · 34 comments
Labels
Milestone

Comments

@pichalite
Copy link
Contributor

Only happens on chrome. works fine on safari and firefox on mac.
Happens the first time you visit the site. Reload the page and you don't see the errors again.

screen shot 2015-05-31 at 6 54 33 pm

screen shot 2015-05-31 at 6 54 47 pm

@lots0logs
Copy link
Contributor

I noticed this as well. It started happening almost two weeks ago when I did a git pull. The commit hash was 93df7f1. I just did another pull about an hour ago and the issue still occurs (in chrome only).

@pichalite
Copy link
Contributor Author

seems to happen on NodeBB reload as well

@barisusakli
Copy link
Member

Where does it point to in nodebb.min.js?

@lots0logs
Copy link
Contributor

nodebb.min.js:13 Uncaught SyntaxError: Unexpected token function nodebb.min.js:13
It points to the beginning of the line and has the entire line underlined in red.

If I refresh the page I get this:
Uncaught SyntaxError: Unexpected token < nodebb.min.js?8f088b3c:12

@barisusakli
Copy link
Member

Can you post the contents of nodebb.min.js first 15 lines or so?

If you run it in dev mode it shouldn't be minified.

@pichalite
Copy link
Contributor Author

seems to work fine in dev mode. this is the line that shows error.

if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(J(requirejs))return;u=requirejs;requirejs=void 0}"undefined"!==typeof require&&!J(require)&&(u=require,require=void 0);h=requirejs=function(e,t,i,n){var r,o="_";!K(e)&&"string"!==typeof e&&(r=e,K(t)?(e=t,t=i,i=n):e=[]);r&&r.context&&(o=r.context);(n=m(G,o))||(n=G[o]=h.s.newContext(o));r&&n.configure(r);return n.require(e,t,i)};h.config=function(e){return h(e)};h.nextTick="undefined"!==typeof setTimeout?function(e){setTimeout(e,4)}:function(e){e()};require||(require=h);h.version="2.1.6";h.jsExtRegExp=/^\/|:|\?|\.js$/;h.isBrowser=A;x=h.s={contexts:G,newContext:ia};h({});z(["toUrl","undef","defined","specified"],function(e){h[e]=function(){var t=G._;return t.require[e].apply(t,arguments)}});if(A&&(y=x.head=document.getElementsByTagName("head")[0],E=document.getElementsByTagName("base")[0]))y=x.head=E.parentNode;h.onError=ca;h.load=function(e,t,i){var n=e&&e.config||{},r;if(A)return r=n.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script"),r.type=n.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r.setAttribute("data-requirecontext",e.contextName),r.setAttribute("data-requiremodule",t),r.attachEvent&&!(r.attachEvent.toString&&0>r.attachEvent.toString().indexOf("[native code"))&&!Z?(Q=!0,r.attachEvent("onreadystatechange",e.onScriptLoad)):(r.addEventListener("load",e.onScriptLoad,!1),r.addEventListener("error",e.onScriptError,!1)),r.src=i,M=r,E?y.insertBefore(r,E):y.appendChild(r),M=null,r;if(ea)try{importScripts(i),e.completeLoad(t)}catch(o){e.onError(B("importscripts","importScripts failed for "+t+" at "+i,o,[t]))}};A&&O(document.getElementsByTagName("script"),function(e){y||(y=e.parentNode);if(L=e.getAttribute("data-main"))return s=L,u.baseUrl||(F=s.split("/"),s=F.pop(),ga=F.length?F.join("/")+"/":"./",u.baseUrl=ga),s=s.replace(fa,""),h.jsExtRegExp.test(s)&&(s=L),u.deps=u.deps?u.deps.concat(s):[s],!0});define=function(e,t,i){var n,r;"string"!==typeof e&&(i=t,t=e,e=null);K(t)||(i=t,t=null);!t&&J(i)&&(t=[],i.length&&(i.toString().replace(ma,"").replace(na,function(e,i){t.push(i)}),t=(1===i.length?["require"]:["require","exports","module"]).concat(t)));if(Q){if(!(n=M))R&&"interactive"===R.readyState||O(document.getElementsByTagName("script"),function(e){if("interactive"===e.readyState)return R=e}),n=R;n&&(e||(e=n.getAttribute("data-requiremodule")),r=G[n.getAttribute("data-requirecontext")])}(r?r.defQueue:U).push([e,t,i])};define.amd={jQuery:!0};h.exec=function(b){return eval(b)};h(u)}})(this);window.bootbox=window.bootbox||function e(t,i){"use strict";function n(e){var t=y[m.locale];return t?t[e]:y.en[e]}function r(e,i,n){e.preventDefault();var r=t.isFunction(n)&&n(e)===!1;r||i.modal("hide")}function o(e){var t,i=0;for(t in e)i++;return i}function s(e,i){var n=0;t.each(e,function(e,t){i(e,t,n++)})}function a(e){var i,n;if("object"!=typeof e)throw new Error("Please supply an object of options");if(!e.message)throw new Error("Please specify a message");return e=t.extend({},m,e),e.buttons||(e.buttons={}),e.backdrop=e.backdrop?"static":!1,i=e.buttons,n=o(i),s(i,function(e,r,o){if(t.isFunction(r)&&(r=i[e]={callback:r}),"object"!==t.type(r))throw new Error("button with key "+e+" must be an object");r.label||(r.label=e),r.className||(r.className=2>=n&&o===n-1?"btn-primary":"btn-default")}),e}function c(e,t){var i=e.length,n={};if(1>i||i>2)throw new Error("Invalid argument length");return 2===i||"string"==typeof e[0]?(n[t[0]]=e[0],n[t[1]]=e[1]):n=e[0],n}function l(e,i,n){return t.extend(!0,{},e,c(i,n))}function u(e,t,i){return d(l(p.apply(null,e),t,i),e)}function f(){for(var e={},t=0,i=arguments.length;i>t;t++){var r=arguments[t],o=r.toLowerCase(),s=r.toUpperCase();e[o]={label:n(s)}}return e}function p(){return{buttons:f.apply(null,arguments)}}function d(e,t){var n={};return s(t,function(e,t){n[t]=!0}),s(e.buttons,function(e){if(n[e]===i)throw new Error("button key "+e+" is not allowed (options are "+t.join("\n")+")")}),e}var h={dialog:"<div class='bootbox modal' tabindex='-1' role='dialog'><div class='modal-dialog'><div class='modal-content'><div class='modal-body'><div class='bootbox-body'></div></div></div></div></div>",header:"<div class='modal-header'><h4 class='modal-title'></h4></div>",footer:"<div class='modal-footer'></div>",closeButton:"<button type='button' class='bootbox-close-button close'>&times;</button>",form:"<form class='bootbox-form'></form>",inputs:{text:"<input class='bootbox-input form-control' autocomplete=off type=text />"}},g=t("body"),m={locale:"en",backdrop:!0,animate:!0,className:null,closeButton:!0,show:!0},v={};v.alert=function(){var e;if(e=u(["ok"],arguments,["message","callback"]),e.callback&&!t.isFunction(e.callback))throw new Error("alert requires callback property to be a function when provided");return e.buttons.ok.callback=e.onEscape=function(){return t.isFunction(e.callback)?e.callback():!0},v.dialog(e)},v.confirm=function(){var e;if(e=u(["cancel","confirm"],arguments,["message","callback"]),e.buttons.cancel.callback=e.onEscape=function(){return e.callback(!1)},e.buttons.confirm.callback=function(){return e.callback(!0)},!t.isFunction(e.callback))throw new Error("confirm requires a callback");return v.dialog(e)},v.prompt=function(){var e,n,r,o,s,a;if(o=t(h.form),n={buttons:f("cancel","confirm"),value:""},e=d(l(n,arguments,["title","callback"]),["cancel","confirm"]),a=e.show===i?!0:e.show,e.message=o,e.buttons.cancel.callback=e.onEscape=function(){return e.callback(null)},e.buttons.confirm.callback=function(){return e.callback(s.val())},e.show=!1,!e.title)throw new Error("prompt requires a title");if(!t.isFunction(e.callback))throw new Error("prompt requires a callback");return s=t(h.inputs.text),s.val(e.value),o.append(s),o.on("submit",function(e){e.preventDefault(),r.find(".btn-primary").click()}),r=v.dialog(e),r.off("shown.bs.modal"),r.on("shown.bs.modal",function(){s.focus()}),a===!0&&r.modal("show"),r},v.dialog=function(e){e=a(e);var i=t(h.dialog),n=i.find(".modal-body"),o=e.buttons,c="",l={onEscape:e.onEscape};if(s(o,function(e,t){c+="<button data-bb-handler='"+e+"' type='button' class='btn "+t.className+"'>"+t.label+"</button>",l[e]=t.callback}),n.find(".bootbox-body").html(e.message),e.animate===!0&&i.addClass("fade"),e.className&&i.addClass(e.className),e.title&&n.before(h.header),e.closeButton){var u=t(h.closeButton);e.title?i.find(".modal-header").prepend(u):u.css("margin-top","-10px").prependTo(n)}return e.title&&i.find(".modal-title").html(e.title),c.length&&(n.after(h.footer),i.find(".modal-footer").html(c)),i.on("hidden.bs.modal",function(e){e.target===this&&i.remove()}),i.on("shown.bs.modal",function(){i.find(".btn-primary:first").focus()}),i.on("escape.close.bb",function(e){l.onEscape&&r(e,i,l.onEscape)}),i.on("click",".modal-footer button",function(e){var n=t(this).data("bb-handler");r(e,i,l[n])}),i.on("click",".bootbox-close-button",function(e){r(e,i,l.onEscape)}),i.on("keyup",function(e){27===e.which&&i.trigger("escape.close.bb")}),g.append(i),i.modal({backdrop:e.backdrop,keyboard:!1,show:!1}),e.show&&i.modal("show"),i},v.setDefaults=function(e){t.extend(m,e)},v.hideAll=function(){t(".bootbox").modal("hide")};var y={br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};return v.init=function(i){window.bootbox=e(i||t)},v}(window.jQuery);(function(){var e={};var t=null;var i=null;var n=document.title;var r=null;var o=null;var s={};var a=window.devicePixelRatio||1;var c=16*a;var l={width:7,height:9,font:10*a+"px arial",colour:"#ffffff",background:"#F03D25",fallback:true,crossOrigin:true,abbreviate:true};var u=function(){var e=navigator.userAgent.toLowerCase();return function(t){return e.indexOf(t)!==-1}}();var f={ie:u("msie"),chrome:u("chrome"),webkit:u("chrome")||u("safari"),safari:u("safari")&&!u("chrome"),mozilla:u("mozilla")&&!u("chrome")&&!u("safari")};var p=function(){var e=document.getElementsByTagName("link");for(var t=0,i=e.length;t<i;t++){if((e[t].getAttribute("rel")||"").match(/\bicon\b/)){return e[t]}}return false};var d=function(){var e=document.getElementsByTagName("link");var t=document.getElementsByTagName("head")[0];for(var i=0,n=e.length;i<n;i++){var r=typeof e[i]!=="undefined";if(r&&(e[i].getAttribute("rel")||"").match(/\bicon\b/)){t.removeChild(e[i])}}};var h=function(){if(!i||!t){var e=p();i=t=e?e.getAttribute("href"):"/favicon.ico"}return t};var g=function(){if(!o){o=document.createElement("canvas");o.width=c;o.height=c}return o};var m=function(e){d();var t=document.createElement("link");t.type="image/x-icon";t.rel="icon";t.href=e;document.getElementsByTagName("head")[0].appendChild(t)};var v=function(e){if(window.console)window.console.log(e)};var y=function(e,t){if(!g().getContext||f.ie||f.safari||s.fallback==="force"){return b(e)}var i=g().getContext("2d");var t=t||"#000000";var n=h();r=document.createElement("img");r.onload=function(){i.clearRect(0,0,c,c);i.drawImage(r,0,0,r.width,r.height,0,0,c,c);if((e+"").length>0)w(i,e,t);x()};if(!n.match(/^data/)&&s.crossOrigin){r.crossOrigin="anonymous"}r.src=n};var b=function(e){if(s.fallback){if((e+"").length>0){document.title="("+e+") "+n}else{document.title=n}}};var w=function(e,t,i){if(typeof t=="number"&&t>99&&s.abbreviate){t=k(t)}var n=(t+"").length-1;var r=s.width*a+6*a*n,o=s.height*a;var l=c-o,u=c-r-a,p=16*a,d=16*a,h=2*a;e.font=(f.webkit?"bold ":"")+s.font;e.fillStyle=s.background;e.strokeStyle=s.background;e.lineWidth=a;e.beginPath();e.moveTo(u+h,l);e.quadraticCurveTo(u,l,u,l+h);e.lineTo(u,p-h);e.quadraticCurveTo(u,p,u+h,p);e.lineTo(d-h,p);e.quadraticCurveTo(d,p,d,p-h);e.lineTo(d,l+h);e.quadraticCurveTo(d,l,d-h,l);e.closePath();e.fill();e.beginPath();e.strokeStyle="rgba(0,0,0,0.3)";e.moveTo(u+h/2,p);e.lineTo(d-h/2,p);e.stroke();e.fillStyle=s.colour;e.textAlign="right";e.textBaseline="top";e.fillText(t,a===2?29:15,f.mozilla?7*a:6*a)};var x=function(){if(!g().getContext)return;m(g().toDataURL())};var k=function(e){var t=[["G",1e9],["M",1e6],["k",1e3]];for(var i=0;i<t.length;++i){if(e>=t[i][1]){e=_(e/t[i][1])+t[i][0];break}}return e};var _=function(e,t){var i=new Number(e);return i.toFixed(t)};e.setOptions=function(e){s={};for(var t in l){s[t]=e.hasOwnProperty(t)?e[t]:l[t]}return this};e.setImage=function(e){t=e;x();return this};e.setBubble=function(e,t){e=e||"";y(e,t);return this};e.reset=function(){m(i)};e.setOptions(l);window.Tinycon=e})();var XRegExp=function(e){function t(e,t,i){var n;if(i)if(e.__proto__)e.__proto__=p.prototype;else for(n in p.prototype)e[n]=p.prototype[n];e[f]={captureNames:t};return e}function i(e){return h.replace.call(e,/([\s\S])(?=[\s\S]*\1)/g,"")}function n(e,n){if(!p.isRegExp(e))throw new TypeError("Type RegExp expected");var r=h.exec.call(/\/([a-z]*)$/i,String(e))[1],n=n||{};n.add&&(r=i(r+n.add));n.remove&&(r=h.replace.call(r,RegExp("["+n.remove+"]+","g"),""));return e=t(RegExp(e.source,r),e[f]&&e[f].captureNames?e[f].captureNames.slice(0):null,n.addProto)}function r(e,t){if(Array.prototype.indexOf)return e.indexOf(t);var i=e.length,n;for(n=0;n<i;++n)if(e[n]===t)return n;return-1}function o(e,t){return C.call(e)==="[object "+t+"]"}function s(e,t,i){return h.test.call(-1<i.indexOf("x")?/^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,e.slice(t))}function a(e){e=e||{};o(e,"String")&&(e=p.forEach(e,/[^\s,]+/,function(e){this[e]=!0},{}));return e}function c(e){if(!/^[\w$]$/.test(e))throw Error("Flag must be a single character A-Za-z0-9_$");_[e]=!0}function l(e){RegExp.prototype.exec=(e?g:h).exec;RegExp.prototype.test=(e?g:h).test;String.prototype.match=(e?g:h).match;String.prototype.replace=(e?g:h).replace;String.prototype.split=(e?g:h).split;d.natives=e}function u(e){if(null==e)throw new TypeError("Cannot convert null or undefined to object");return e}var f="xregexp",p,d={astral:!1,natives:!1},h={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},g={},m={},v={},y=[],b={"default":/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,"class":/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|[\s\S]/},w=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,x=h.exec.call(/()??/,"")[1]===e,k=RegExp.prototype.sticky!==e,_={g:!0,i:!0,m:!0,y:k},C={}.toString,T;p=function(r,o){var s={hasNamedCapture:!1,captureNames:[]},a="default",c="",l=0,u,f;if(p.isRegExp(r)){if(o!==e)throw new TypeError("Cannot supply flags when copying a RegExp");return n(r,{addProto:!0})}r=r===e?"":String(r);o=o===e?"":String(o);f=r+"/"+o;if(!v[f]){u=r;var d=o,g;if(i(d)!==d)throw new SyntaxError("Invalid duplicate regex flag "+d);u=h.replace.call(u,/^\(\?([\w$]+)\)/,function(e,t){if(h.test.call(/[gy]/,t))throw new SyntaxError("Cannot use flag g or y in mode modifier "+e);d=i(d+t);return""});for(g=0;g<d.length;++g)if(!_[d.charAt(g)])throw new SyntaxError("Unknown regex flag "+d.charAt(g));u={pattern:u,flags:d};r=u.pattern;for(o=u.flags;l<r.length;){do{u=r;g=o;for(var m=l,w=a,x=s,k=y.length,C=null,T=void 0,$=void 0;k--;)if($=y[k],($.scope===w||"all"===$.scope)&&(!$.flag||-1<g.indexOf($.flag)))if(T=p.exec(u,$.regex,m,"sticky")){C={matchLength:T[0].length,output:$.handler.call(x,T,w,g),reparse:$.reparse};break}(u=C)&&u.reparse&&(r=r.slice(0,l)+u.output+r.slice(l+u.matchLength))}while(u&&u.reparse);u?(c+=u.output,l+=u.matchLength||1):(u=p.exec(r,b[a],l,"sticky")[0],c+=u,l+=u.length,"["===u&&"default"===a?a="class":"]"===u&&"class"===a&&(a="default"))}v[f]={pattern:h.replace.call(c,/\(\?:\)(?=\(\?:\))|^\(\?:\)|\(\?:\)$/g,""),flags:h.replace.call(o,/[^gimy]+/g,""),captures:s.hasNamedCapture?s.captureNames:null}}f=v[f];return t(RegExp(f.pattern,f.flags),f.captures,!0)};p.prototype=RegExp();p.version="3.0.0-pre";p.addToken=function(e,t,i){var i=i||{},r=i.optionalFlags,o;i.flag&&c(i.flag);if(r){r=h.split.call(r,"");for(o=0;o<r.length;++o)c(r[o])}y.push({regex:n(e,{add:"g"+(k?"y":"")}),handler:t,scope:i.scope||"default",flag:i.flag,reparse:i.reparse});p.cache.flush("patterns")};p.cache=function(e,t){var i=e+"/"+(t||"");return m[i]||(m[i]=p(e,t))};p.cache.flush=function(e){"patterns"===e?v={}:m={}};p.escape=function(e){return h.replace.call(u(e),/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};p.exec=function(e,t,i,r){var o="g";if(k&&(r||t.sticky&&!1!==r))o+="y";t[f]=t[f]||{captureNames:null};o=t[f][o]||(t[f][o]=n(t,{add:o,remove:!1===r?"y":""}));o.lastIndex=i=i||0;e=g.exec.call(o,e);r&&(e&&e.index!==i)&&(e=null);t.global&&(t.lastIndex=e?o.lastIndex:0);return e};p.forEach=function(e,t,i,n){for(var r=0,o=-1;r=p.exec(e,t,r);)i.call(n,r,++o,e,t),r=r.index+(r[0].length||1);return n};p.globalize=function(e){return n(e,{add:"g",addProto:!0})};p.install=function(e){e=a(e);!d.astral&&e.astral&&(p.cache.flush("patterns"),d.astral=!0);!d.natives&&e.natives&&l(!0)};p.isInstalled=function(e){return!!d[e]};p.isRegExp=function(e){return"[object RegExp]"===C.call(e)};p.match=function(e,t,i){var r=t.global&&"one"!==i||"all"===i,o=(r?"g":"")+(t.sticky?"y":"");t[f]=t[f]||{captureNames:null};o=t[f][o||"noGY"]||(t[f][o||"noGY"]=n(t,{add:o,remove:"one"===i?"g":""}));e=h.match.call(u(e),o);t.global&&(t.lastIndex="one"===i&&e?e.index+e[0].length:0);return r?e||[]:e&&e[0]};p.matchChain=function(e,t){return function i(e,n){var r=t[n].regex?t[n]:{regex:t[n]},o=[],s=function(e){if(r.backref){if(!(e.hasOwnProperty(r.backref)||+r.backref<e.length))throw new ReferenceError("Backreference to undefined group: "+r.backref);o.push(e[r.backref]||"")}else o.push(e[0])},a;for(a=0;a<e.length;++a)p.forEach(e[a],r.regex,s);return n===t.length-1||!o.length?o:i(o,n+1)}([e],0)};p.replace=function(e,t,i,r){var o=p.isRegExp(t),s=t.global&&"one"!==r||"all"===r,a=(s?"g":"")+(t.sticky?"y":""),c=t;o?(t[f]=t[f]||{captureNames:null},c=t[f][a||"noGY"]||(t[f][a||"noGY"]=n(t,{add:a,remove:"one"===r?"g":""}))):s&&(c=RegExp(p.escape(String(t)),"g"));e=g.replace.call(u(e),c,i);o&&t.global&&(t.lastIndex=0);return e};p.replaceEach=function(e,t){var i,n;for(i=0;i<t.length;++i)n=t[i],e=p.replace(e,n[0],n[1],n[2]);return e};p.split=function(e,t,i){return g.split.call(u(e),t,i)};p.test=function(e,t,i,n){return!!p.exec(e,t,i,n)};p.uninstall=function(e){e=a(e);d.astral&&e.astral&&(p.cache.flush("patterns"),d.astral=!1);d.natives&&e.natives&&l(!1)};p.union=function(e,t){var i=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g,n=[],r=0,s,a,c,l=function(e,t,i){var n=a[r-s];if(t){if(++r,n)return"(?<"+n+">"}else if(i)return"\\"+(+i+s);return e},u;if(!o(e,"Array")||!e.length)throw new TypeError("Must provide a nonempty array of patterns to merge");for(u=0;u<e.length;++u)c=e[u],p.isRegExp(c)?(s=r,a=c[f]&&c[f].captureNames||[],n.push(h.replace.call(p(c.source).source,i,l))):n.push(p.escape(c));return p(n.join("|"),t)};g.exec=function(t){var i=this.lastIndex,o=h.exec.apply(this,arguments),s,a;if(o){!x&&(1<o.length&&-1<r(o,""))&&(s=n(this,{remove:"g"}),h.replace.call(String(t).slice(o.index),s,function(){var t=arguments.length,i;for(i=1;i<t-2;++i)arguments[i]===e&&(o[i]=e)}));if(this[f]&&this[f].captureNames)for(a=1;a<o.length;++a)(s=this[f].captureNames[a-1])&&(o[s]=o[a]);this.global&&(!o[0].length&&this.lastIndex>o.index)&&(this.lastIndex=o.index)}this.global||(this.lastIndex=i);return o};g.test=function(e){return!!g.exec.call(this,e)};g.match=function(e){var t;if(p.isRegExp(e)){if(e.global)return t=h.match.apply(this,arguments),e.lastIndex=0,t}else e=RegExp(e);return g.exec.call(e,u(this))};g.replace=function(t,i){var n=p.isRegExp(t),s,a,c;n?(t[f]&&(a=t[f].captureNames),s=t.lastIndex):t+="";c=o(i,"Function")?h.replace.call(String(this),t,function(){var r=arguments,o;if(a){r[0]=new String(r[0]);for(o=0;o<a.length;++o)a[o]&&(r[0][a[o]]=r[o+1])}if(n&&t.global)t.lastIndex=r[r.length-2]+r[0].length;return i.apply(e,r)}):h.replace.call(null==this?this:String(this),t,function(){var e=arguments;return h.replace.call(String(i),w,function(t,i,n){if(i){n=+i;if(n<=e.length-3)return e[n]||"";n=a?r(a,i):-1;if(n<0)throw new SyntaxError("Backreference to undefined group "+t);return e[n+1]||""}if(n==="$")return"$";if(n==="&"||+n===0)return e[0];if(n==="`")return e[e.length-1].slice(0,e[e.length-2]);if(n==="'")return e[e.length-1].slice(e[e.length-2]+e[0].length);n=+n;if(!isNaN(n)){if(n>e.length-3)throw new SyntaxError("Backreference to undefined group "+t);return e[n]||""}throw new SyntaxError("Invalid token "+t)})});n&&(t.lastIndex=t.global?0:s);return c};g.split=function(t,i){if(!p.isRegExp(t))return h.split.apply(this,arguments);var n=String(this),r=[],o=t.lastIndex,s=0,a,i=(i===e?-1:i)>>>0;p.forEach(n,t,function(e){e.index+e[0].length>s&&(r.push(n.slice(s,e.index)),1<e.length&&e.index<n.length&&Array.prototype.push.apply(r,e.slice(1)),a=e[0].length,s=e.index+a)});s===n.length?(!h.test.call(t,"")||a)&&r.push(""):r.push(n.slice(s));t.lastIndex=o;return r.length>i?r.slice(0,i):r};T=p.addToken;T(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/,function(e,t){if("B"===e[1]&&"default"===t)return e[0];throw new SyntaxError("Invalid escape "+e[0])},{scope:"all"});T(/\[(\^?)]/,function(e){return e[1]?"[\\s\\S]":"\\b\\B"});T(/\(\?#[^)]*\)/,function(e,t,i){return s(e.input,e.index+e[0].length,i)?"":"(?:)"});T(/\s+|#.*/,function(e,t,i){return s(e.input,e.index+e[0].length,i)?"":"(?:)"},{flag:"x"});T(/\./,function(){return"[\\s\\S]"},{flag:"s"});T(/\\k<([\w$]+)>/,function(e){var t=isNaN(e[1])?r(this.captureNames,e[1])+1:+e[1],i=e.index+e[0].length;if(!t||t>this.captureNames.length)throw new SyntaxError("Backreference to undefined group "+e[0]);return"\\"+t+(i===e.input.length||isNaN(e.input.charAt(i))?"":"(?:)")});T(/\\(\d+)/,function(e,t){if(!("default"===t&&/^[1-9]/.test(e[1])&&+e[1]<=this.captureNames.length)&&"0"!==e[1])throw new SyntaxError("Cannot use octal escape or backreference to undefined group "+e[0]);return e[0]},{scope:"all"});T(/\(\?P?<([\w$]+)>/,function(e){if(!isNaN(e[1]))throw new SyntaxError("Cannot use integer as capture name "+e[0]);if("length"===e[1]||"__proto__"===e[1])throw new SyntaxError("Cannot use reserved word as capture name "+e[0]);if(-1<r(this.captureNames,e[1]))throw new SyntaxError("Cannot use same name for multiple groups "+e[0]);this.captureNames.push(e[1]);this.hasNamedCapture=!0;return"("});T(/\((?!\?)/,function(e,t,i){if(-1<i.indexOf("n"))return"(?:";this.captureNames.push(null);return"("},{optionalFlags:"n"});return p}();(function(e){"use strict";var t={};function i(e){return e.replace(/[- _]+/g,"").toLowerCase()}function n(e){while(e.length<4){e="0"+e}return e}function r(e){return parseInt(e,16)}function o(e){return parseInt(e,10).toString(16)}function s(e){var t=/^\\[xu](.+)/.exec(e);return t?r(t[1]):e.charCodeAt(e.charAt(0)==="\\"?1:0)}function a(t){var i="",r=-1,a;e.forEach(t,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(e){a=s(e[1]);if(a>r+1){i+="\\u"+n(o(r+1));if(a>r+2){i+="-\\u"+n(o(a-1))}}r=s(e[2]||e[1])});if(r<65535){i+="\\u"+n(o(r+1));if(r<65534){i+="-\\uFFFF"}}return i}function c(e){var i="b!";return t[e][i]||(t[e][i]=a(t[e].bmp))}function l(e,i){var n=t[e],r="";if(n.bmp&&!n.isBmpLast){r="["+n.bmp+"]"+(n.astral?"|":"")}if(n.astral){r+=n.astral}if(n.isBmpLast&&n.bmp){r+=(n.astral?"|":"")+"["+n.bmp+"]"}return i?"(?:(?!"+r+")(?:[??-??][??-??]|[\x00-�]))":"(?:"+r+")"}function u(e,i){var n=i?"a!":"a=";return t[e][n]||(t[e][n]=l(e,i))}e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(n,r,o){var s="Invalid double negation ",a="Unknown Unicode token ",l="Unicode token missing data ",f="Astral mode required for Unicode token ",p="Astral mode does not support Unicode tokens within character classes",d=n[1]==="P"||!!n[2],h=o.indexOf("A")>-1||e.isInstalled("astral"),g=i(n[4]||n[3]),m=t[g];if(n[1]==="P"&&n[2]){throw new SyntaxError(s+n[0])}if(!t.hasOwnProperty(g)){throw new SyntaxError(a+n[0])}if(m.inverseOf){g=i(m.inverseOf);if(!t.hasOwnProperty(g)){throw new ReferenceError(l+n[0]+" -> "+m.inverseOf)}m=t[g];d=!d}if(!(m.bmp||h)){throw new SyntaxError(f+n[0])}if(h){if(r==="class"){throw new SyntaxError(p)}return u(g,d)}return r==="class"?d?c(g):m.bmp:(d?"[^":"[")+m.bmp+"]"},{scope:"all",optionalFlags:"A"});e.addUnicodeData=function(n){var r="Unicode token requires name",o="Unicode token has no character data ",s,a;for(a=0;a<n.length;++a){s=n[a];if(!s.name){throw new Error(r)}if(!(s.inverseOf||s.bmp||s.astral)){throw new Error(o+s.name)}t[i(s.name)]=s;if(s.alias){t[i(s.alias)]=s}}e.cache.flush("patterns")};e.addUnicodeData([{name:"L",alias:"Letter",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"??[??-??????-??????????-????-????-????-??????????-????-????-????-????-????-????-??]|??[??-??]|??[??-????-????-????????-????-????-????-????-????-????-????-????-????-????-??]|??[??-??]|??[??-????-????-????-????-????-??]|??[??-??]|??[??-????-??]|??[??-??]|??[??-??]|??[??-??]|??[??-??]|??[??-??????-??]|??[??-????-??]|??[????]|[????-????-??][??-??]|??[??-????-????????????-????-????????????????-??????????????????????????-????-????-????-??????-????-????-????-????-??]|??[??-????-??????????????-????-??????-????-????-????-????-????-????-????-??????-????-????-????-????-????-????-????-????-????-????-????-????-??]|??[??-??]"}])})(XRegExp);(function(e,t,i){"undefined"!=typeof module&&module.exports?module.exports=i():"function"==typeof t.define&&t.define.amd?define(e,[],i):t[e]=i()})("buzz",this,function(){var e={defaults:{autoplay:!1,duration:5e3,formats:[],loop:!1,placeholder:"--",preload:"metadata",volume:80,document:document},types:{mp3:"audio/mpeg",ogg:"audio/ogg",wav:"audio/wav",aac:"audio/aac",m4a:"audio/x-m4a"},sounds:[],el:document.createElement("audio"),sound:function(t,i){function n(e){for(var t=[],i=e.length-1,n=0;i>=n;n++)t.push({start:e.start(n),end:e.end(n)});return t}function r(e){return e.split(".").pop()}function o(t,i){var n=s.createElement("source");n.src=i,e.types[r(i)]&&(n.type=e.types[r(i)]),t.appendChild(n)}i=i||{};var s=i.document||e.defaults.document,a=0,c=[],l={},u=e.isSupported();if(this.load=function(){return u?(this.sound.load(),this):this},this.play=function(){return u?(this.sound.play(),this):this},this.togglePlay=function(){return u?(this.sound.paused?this.sound.play():this.sound.pause(),this):this},this.pause=function(){return u?(this.sound.pause(),this):this},this.isPaused=function(){return u?this.sound.paused:null},this.stop=function(){return u?(this.setTime(0),this.sound.pause(),this):this},this.isEnded=function(){return u?this.sound.ended:null},this.loop=function(){return u?(this.sound.loop="loop",this.bind("ended.buzzloop",function(){this.currentTime=0,this.play()}),this):this},this.unloop=function(){return u?(this.sound.removeAttribute("loop"),this.unbind("ended.buzzloop"),this):this},this.mute=function(){return u?(this.sound.muted=!0,this):this},this.unmute=function(){return u?(this.sound.muted=!1,this):this},this.toggleMute=function(){return u?(this.sound.muted=!this.sound.muted,this):this},this.isMuted=function(){return u?this.sound.muted:null},this.setVolume=function(e){return u?(0>e&&(e=0),e>100&&(e=100),this.volume=e,this.sound.volume=e/100,this):this},this.getVolume=function(){return u?this.volume:this},this.increaseVolume=function(e){return this.setVolume(this.volume+(e||1))},this.decreaseVolume=function(e){return this.setVolume(this.volume-(e||1))},this.setTime=function(e){if(!u)return this;var t=!0;return this.whenReady(function(){t===!0&&(t=!1,this.sound.currentTime=e)}),this},this.getTime=function(){if(!u)return null;var t=Math.round(100*this.sound.currentTime)/100;return isNaN(t)?e.defaults.placeholder:t},this.setPercent=function(t){return u?this.setTime(e.fromPercent(t,this.sound.duration)):this},this.getPercent=function(){if(!u)return null;var t=Math.round(e.toPercent(this.sound.currentTime,this.sound.duration));return isNaN(t)?e.defaults.placeholder:t},this.setSpeed=function(e){return u?(this.sound.playbackRate=e,this):this},this.getSpeed=function(){return u?this.sound.playbackRate:null},this.getDuration=function(){if(!u)return null;var t=Math.round(100*this.sound.duration)/100;return isNaN(t)?e.defaults.placeholder:t},this.getPlayed=function(){return u?n(this.sound.played):null},this.getBuffered=function(){return u?n(this.sound.buffered):null},this.getSeekable=function(){return u?n(this.sound.seekable):null},this.getErrorCode=function(){return u&&this.sound.error?this.sound.error.code:0},this.getErrorMessage=function(){if(!u)return null;switch(this.getErrorCode()){case 1:return"MEDIA_ERR_ABORTED";case 2:return"MEDIA_ERR_NETWORK";case 3:return"MEDIA_ERR_DECODE";case 4:return"MEDIA_ERR_SRC_NOT_SUPPORTED";default:return null}},this.getStateCode=function(){return u?this.sound.readyState:null},this.getStateMessage=function(){if(!u)return null;switch(this.getStateCode()){case 0:return"HAVE_NOTHING";case 1:return"HAVE_METADATA";case 2:return"HAVE_CURRENT_DATA";case 3:return"HAVE_FUTURE_DATA";case 4:return"HAVE_ENOUGH_DATA";default:return null}},this.getNetworkStateCode=function(){return u?this.sound.networkState:null},this.getNetworkStateMessage=function(){if(!u)return null;switch(this.getNetworkStateCode()){case 0:return"NETWORK_EMPTY";case 1:return"NETWORK_IDLE";case 2:return"NETWORK_LOADING";case 3:return"NETWORK_NO_SOURCE";default:return null}},this.set=function(e,t){return u?(this.sound[e]=t,this):this},this.get=function(e){return u?e?this.sound[e]:this.sound:null},this.bind=function(e,t){if(!u)return this;e=e.split(" ");for(var i=this,n=function(e){t.call(i,e)},r=0;e.length>r;r++){var o=e[r],s=o;o=s.split(".")[0],c.push({idx:s,func:n}),this.sound.addEventListener(o,n,!0)}return this},this.unbind=function(e){if(!u)return this;e=e.split(" ");for(var t=0;e.length>t;t++)for(var i=e[t],n=i.split(".")[0],r=0;c.length>r;r++){var o=c[r].idx.split(".");(c[r].idx==i||o[1]&&o[1]==i.replace(".",""))&&(this.sound.removeEventListener(n,c[r].func,!0),c.splice(r,1))}return this},this.bindOnce=function(e,t){if(!u)return this;var i=this;return l[a++]=!1,this.bind(e+"."+a,function(){l[a]||(l[a]=!0,t.call(i)),i.unbind(e+"."+a)}),this},this.trigger=function(e){if(!u)return this;e=e.split(" ");for(var t=0;e.length>t;t++)for(var i=e[t],n=0;c.length>n;n++){var r=c[n].idx.split(".");if(c[n].idx==i||r[0]&&r[0]==i.replace(".","")){var o=s.createEvent("HTMLEvents");o.initEvent(r[0],!1,!0),this.sound.dispatchEvent(o)}}return this},this.fadeTo=function(t,i,n){function r(){setTimeout(function(){t>o&&t>a.volume?(a.setVolume(a.volume+=1),r()):o>t&&a.volume>t?(a.setVolume(a.volume-=1),r()):n instanceof Function&&n.apply(a)},s)}if(!u)return this;i instanceof Function?(n=i,i=e.defaults.duration):i=i||e.defaults.duration;var o=this.volume,s=i/Math.abs(o-t),a=this;return this.play(),this.whenReady(function(){r()}),this},this.fadeIn=function(e,t){return u?this.setVolume(0).fadeTo(100,e,t):this},this.fadeOut=function(e,t){return u?this.fadeTo(0,e,t):this},this.fadeWith=function(e,t){return u?(this.fadeOut(t,function(){this.stop()}),e.play().fadeIn(t),this):this},this.whenReady=function(e){if(!u)return null;var t=this;0===this.sound.readyState?this.bind("canplay.buzzwhenready",function(){e.call(t)}):e.call(t)},u&&t){for(var f in e.defaults)e.defaults.hasOwnProperty(f)&&(i[f]=i[f]||e.defaults[f]);if(this.sound=s.createElement("audio"),t instanceof Array)for(var p in t)t.hasOwnProperty(p)&&o(this.sound,t[p]);else if(i.formats.length)for(var d in i.formats)i.formats.hasOwnProperty(d)&&o(this.sound,t+"."+i.formats[d]);else o(this.sound,t);i.loop&&this.loop(),i.autoplay&&(this.sound.autoplay="autoplay"),this.sound.preload=i.preload===!0?"auto":i.preload===!1?"none":i.preload,this.setVolume(i.volume),e.sounds.push(this)}},group:function(e){function t(){for(var t=i(null,arguments),n=t.shift(),r=0;e.length>r;r++)e[r][n].apply(e[r],t)}function i(e,t){return e instanceof Array?e:Array.prototype.slice.call(t)}e=i(e,arguments),this.getSounds=function(){return e},this.add=function(t){t=i(t,arguments);for(var n=0;t.length>n;n++)e.push(t[n])},this.remove=function(t){t=i(t,arguments);for(var n=0;t.length>n;n++)for(var r=0;e.length>r;r++)if(e[r]==t[n]){e.splice(r,1);break}},this.load=function(){return t("load"),this},this.play=function(){return t("play"),this},this.togglePlay=function(){return t("togglePlay"),this},this.pause=function(e){return t("pause",e),this},this.stop=function(){return t("stop"),this},this.mute=function(){return t("mute"),this},this.unmute=function(){return t("unmute"),this},this.toggleMute=function(){return t("toggleMute"),this},this.setVolume=function(e){return t("setVolume",e),this},this.increaseVolume=function(e){return t("increaseVolume",e),this},this.decreaseVolume=function(e){return t("decreaseVolume",e),this},this.loop=function(){return t("loop"),this},this.unloop=function(){return t("unloop"),this},this.setTime=function(e){return t("setTime",e),this

@lots0logs
Copy link
Contributor

Here is a screenshot of Dev Tools when I first load the page: https://db.tt/VsjhGTPc

Here is after I refresh the page: https://db.tt/wM51TYLt

@barisusakli
Copy link
Member

I can reproduce this on a windows machine with ./nodebb start works fine with ./nodebb dev so probably a bug with the minification.

@barisusakli barisusakli added the bug label Jun 4, 2015
@lots0logs
Copy link
Contributor

@barisusakli Is there a way to run it with minification disabled (other than dev mode?) I guess I could run the dev mode and redirect the output to a file, though the file would grow pretty quickly like that ❓

@barisusakli
Copy link
Member

If you don't mind modifying the source change this line https://github.com/NodeBB/NodeBB/blob/master/minifier.js#L21

Change if (minify) to if (minify && false) and the files wont be minified even if you use ./nodebb start.

Are you running the forum on windows as well?

@lots0logs
Copy link
Contributor

Okay, I'll do that tonight. Thanks!! 👍 ...No Windows, its on Ubuntu 15.04

@rbeer
Copy link
Contributor

rbeer commented Jun 6, 2015

No errors whatsoever with Debian 8 on client side (nodeBB running on the same machine). Tested against Chrome 43.0.2357.65 and current HEAD of nodeBB-0.7.

just fyi, since the mentioning of Windows and the Unexpected token < error in the second picture looks a lot like escaping horror. :)

@ahwayakchih
Copy link
Contributor

Hi, i just tried installing current 0.7.x branch on OpenShift and got the same error (in Chrome browser). After disabling minification (as described by @barisusakli in #3200 (comment)) it started working ok.

@lots0logs
Copy link
Contributor

Just an FYI, I am still seeing this after pulling the latest from master today (29c9b2e)

@barisusakli
Copy link
Member

Does it still happen when you disable all plugins? Including the ones that are included in core like markdown mentions etc?

@pichalite
Copy link
Contributor Author

@barisusakli Yes, it does.

@barisusakli
Copy link
Member

@pichalite Is your site public? Post a link so we can take a look.

@pichalite
Copy link
Contributor Author

@barisusakli
Copy link
Member

I noticed if I disable my browser cache in chrome I always get the Uncaught SyntaxError: Unexpected token < error on your site. If I enable the cache it disappears after the first load.

@Tjatse
Copy link

Tjatse commented Jun 18, 2015

same error here, serving with nginx and custom domain.

094d283d-1997-44a6-a85d-6f1270fdfd2f

@pitaj
Copy link
Contributor

pitaj commented Jun 18, 2015

Same problem as #3167

@lots0logs
Copy link
Contributor

I can confirm @barisusakli 's findings. It does not occur when the dev console is closed (and thus caching is enabled). It only happens when the dev console is open and the "disable cache option" is selected.

@julianlam
Copy link
Member

@lots0logs @pichalite Can you please update to 2d70733, run npm install, and then see if you can reproduce?

@barisusakli
Copy link
Member

@pichalite, @lots0logs did you guys try with the above changes?

@pichalite
Copy link
Contributor Author

@barisusakli I did not run into this issue on latest master.

@lots0logs
Copy link
Contributor

@barisusakli I will check it now and let you know...

@lots0logs
Copy link
Contributor

@barisusakli The issue is the same for me on the latest master. The first load showed an error, then I refereshed the page which also resulted in a script error though not the same as the prior attempt. I refreshed once more and the site loaded without any script errors. Very weird 😕

@barisusakli
Copy link
Member

Did you clear browser cache? Post your site link so we can take a look as well.

@lots0logs
Copy link
Contributor

Yeah, but Chrome has been acting weird when it comes to caching for the last few months. It wouldnt be the first time I cleared the cache and Chrome decided it would hang onto some of the files 😒 Check it out and let me know what you get: http://forum.antergos.com/

@rbeer
Copy link
Contributor

rbeer commented Jul 15, 2015

On doing "Empty Cache and Hard Reload" (right click refresh button; only avail. when DevTools open)

Uncaught SyntaxError: Unexpected token <
Uncaught SyntaxError: Unexpected token ILLEGAL

and widgets aren't showing.
Then a simple refresh (left click button): No Errors thrown and widgets are showing.

However: It could be a problem with Chromes "Hard Reload" - whatever it does.
If you keep doing this "Hard Reload" the errors occur, then not, then occur again and so on, back and forth.

Chrome 43.0.2357.65 (64Bit)

@lots0logs
Copy link
Contributor

@barisusakli Any update on this issue? Has it been solved on another issue number? Just to add to what @rbeer said, the issue always occurs the first time you access any page on the forum during a browser session. After the first time, the behavior is as @rbeer described.

@barisusakli
Copy link
Member

Other than 2d70733 there hasn't been any other fixes.

What commit hash are you on? Also try switcting to one of the default themes and disabling plugins to rule out those.

@pichalite
Copy link
Contributor Author

I am seeing these JS errors on 0.7.1.

@ahwayakchih
Copy link
Contributor

I've just installed latest of 0.7.x branch and error seems to be gone. I'm just seeing warnings like:

[deprecated] variables.set is deprecated, please use ajaxify.data, key=category_id

but that's unrelated to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants