znuny / Znuny-SearchFrontend

1 stars 1 forks source link

Error when accessing Znuny Search Frontend #2

Open michaaa opened 10 months ago

michaaa commented 10 months ago

The Znuny Search is configured and index is created. It looks nice so far, but acccesing the frontend always ends in an Browser error message:

"An error occurred! Please check the browser error log for more details!"

In JavaScriptConsole I see:

[ERROR] JavaScriptError: unexpected token: identifier

Query.Deferred exception: unexpected token: identifier compileToFunction@https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:3573:15
finishComponentSetup@https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1329:266
setupStatefulComponent@https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1319:26
setupComponent@https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1303:292
mountComponent@https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1087:15
processComponent@https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1082:20
patch@https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1040:38
render@https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1189:11
mount@https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:939:12
createApp/app.mount@https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1604:41
TargetNS.InitSearchComponent@https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:3635:364
TargetNS.Init@https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:3576:213
TargetNS.ExecuteInit/<@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1818:104
each@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:3129
TargetNS.ExecuteInit@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1818:3
@https://<url>/otrs/index.pl?Action=ZnunySearchFrontend:427:15
TargetNS.Ready/<@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1914:110
e@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:26990
Deferred/then/l/</t<@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:27292
setTimeout handler*Deferred/then/l/<@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:27556
c@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:25266
fireWith@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:26015
fire@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:26051
c@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:25266
fireWith@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:26015
ready@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:29074
P@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:28846
EventListener.handleEvent*@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:29226
@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:220
@https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:225
 undefined CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1:28610
Uncaught SyntaxError: unexpected token: identifier
    compileToFunction https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:3573
    finishComponentSetup https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1329
    setupStatefulComponent https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1319
    setupComponent https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1303
    mountComponent https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1087
    processComponent https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1082
    patch https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1040
    render https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1189
    mount https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:939
    mount https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:1604
    InitSearchComponent https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:3635
    Init https://<url>/otrs-web/js/js-cache/ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:3576
    ExecuteInit https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1818
    each https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    ExecuteInit https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1818
    <anonymous> https://<url>/otrs/index.pl?Action=ZnunySearchFrontend:427
    Ready https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1914
    e https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    t https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    setTimeout handler*Deferred/then/l/< https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    c https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    fireWith https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    fire https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    c https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    fireWith https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    ready https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    P https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    EventListener.handleEvent* https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    <anonymous> https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
    <anonymous> https://<url>/otrs-web/js/js-cache/CommonJS_206cb3927bac8196e7eec99e778d5bd2.js:1
ModuleJS_f9f41e877d4ecf5bfe49f88f6f0aa5bf.js:104:15

​First I tried to remove js-cache, but it doesn't fix the problem.

rkaldung commented 10 months ago

@michaaa Please provide us the version of Znuny, Znuny-Search and Znuny-SearchFrontend

michaaa commented 10 months ago

Sorry, I forgot to mention:

Znuny 6.5.4 LTS, however there was same result under 6.5.3 LTS

Znuny-Search 6.5.1 Znuny-SearchFrontend 6.5.2

(Latest version available in repository)

hanneshal commented 10 months ago

Hi @michaaa, strange, we run the same version(s) and can't reproduce it. Can you please try to (temporary) disable the JS Loader (Admin->Sysconfig->Search for Loader::Enabled::JSand set it t o no. This disables the JS compression / minify logic, so we can check where the error comes from.

Then reload the page and paste the error message again.

Thanks and greetings

Johannes P.S: Greetings to Tobias

michaaa commented 10 months ago

Hi @hanneshal,

nice to read from you, Greetings back from Tobias and of course all of our team. Well, setting Loader::Enabled::JS to "no" makes the Znuny Search Frontend plugin work, so I think the problem must have to do something with the (now disabled) compression logic. However, I don't know how to debug this in deep.

Greetings, Micha

P.S.: Well, "it works" in some way, as it finds stuff, but it's not very fast / responsive and some controls (f.i. sort order) doesn't work either.

adm007689 commented 4 months ago

Hi,

we have got the same problem on different accounts. It's seem to be related by loading the past sesrches from the user settings. If I clean the recent searches in the DB table user_preferences the values ZnunySearchFrontendLastSearch and ZnunySearchFrontendSavedFilters.

So is it an option to make a config setting for loading recent searches from the user settings, so when the agent got an problem, the loading can be disabled.

Greetings, Christian

joserribeiro26 commented 2 months ago

I had the same problem here, it only worked when I disabled Loader::Enabled::JS