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

Lodash library special characters are breaking horizon dashboard #1245

Closed
wesleyvieira12 opened this issue Feb 9, 2023 · 3 comments · Fixed by #1246
Closed

Lodash library special characters are breaking horizon dashboard #1245

wesleyvieira12 opened this issue Feb 9, 2023 · 3 comments · Fixed by #1246
Assignees
Labels

Comments

@wesleyvieira12
Copy link

  • Horizon Version: 5.14.1
  • Laravel Version: 9.36.2
  • PHP Version: 8.0.2
  • Redis Driver & Version: predis 2.1
  • Database Driver & Version: Not

Description:
I followed the correct steps to install horizon, but the browser was showing the error: "Uncaught SyntaxError: Invalid or unexpected token (at app.js?id=766b568d1924aa83b2a1f279d2c5ab9e:2:484352)".

We analyzed the app.js file and saw that it had the following error code:

rn=Ue({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"})

Because the object's keys were not enclosed in curly braces, the system did not work. By placing the object's keys using double quotes, we can see that the dashboard is working again. This code to be from the "Lodash" library imported in the dashboard.vue file.

@wesleyvieira12
Copy link
Author

image

@taylorotwell
Copy link
Member

Horizon loads fine for me on fresh Laravel application:

CleanShot 2023-02-09 at 15 39 13@2x

@browner12
Copy link
Contributor

Possibly separate issue, but I'd be curious if Lodash could be factored out of Horizon all-together? I see only 25 uses of a Lodash function in the project.

With today's modern Javascript, I've refactored Lodash out of most of my projects pretty easily. It also reduced the bundle size.

Would you guys be open to a PR for that?

@jessarcher jessarcher linked a pull request Feb 10, 2023 that will close this issue
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants