[SOLVED] Can't authenticate after migration to Znuny 6.3

Moderator: crythias

Post Reply
ahauser
Znuny newbie
Posts: 42
Joined: 19 May 2017, 10:09
Znuny Version: ITSM5S

[SOLVED] Can't authenticate after migration to Znuny 6.3

Post by ahauser »

Hi,
As Agent or admin, it isn't possible to login as agent. It was working with 6.2 but not after migrating to 6.3.
I'm using Ubuntu 22.04 and here is the output of /var/log/syslog :
Oct 21 08:40:12 znuny-test-01 OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-20[188717]: [Error][Kernel::System::MailAccount::MailAccountGet][Line:334]: Unknown column 'authentication_type' in 'field list', SQL: 'SELECT login, pw, host, account_type, queue_id, imap_folder, trusted, comments, valid_id, authentication_type, oauth2_token_config_id, create_time, change_time FROM mail_account WHERE id = ?'
Oct 21 08:40:12 znuny-test-01 OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-20[188717]: [Error][Kernel::System::Daemon::DaemonModules::BaseTaskWorker::_HandleError][Line:53]: There was an error executing Execute() in Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch: DBD::mysql::st execute failed: Unknown column 'authentication_type' in 'field list' at /opt/otrs/Kernel/System/DB.pm line 695.#012ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-20 Perl: 5.34.0 OS: linux Time: Fri Oct 21 06:40:12 2022#012#012 Message: Unknown column 'authentication_type' in 'field list', SQL: 'SELECT login, pw, host, account_type, queue_id, imap_folder, trusted, comments, valid_id, authentication_type, oauth2_token_config_id, create_time, change_time FROM mail_account WHERE id = ?'#012#012 Traceback (188717): #012 Module: Kernel::System::MailAccount::MailAccountGet Line: 334#012 Module: Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run Line: 157#012 Module: (eval) Line: 460#012 Module: Kernel::System::Console::BaseCommand::Execute Line: 454#012 Module: (eval) Line: 143#012 Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Cron::Run Line: 122#012 Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Run Line: 236#012 Module: (eval) Line: 330#012 Module: main::Start Line: 330#012 Module: /opt/otrs/bin/otrs.Daemon.pl Line: 151#012#012Error: Wide character in shmwrite at /opt/otrs/Kernel/System/Log.pm line 263.
Oct 21 08:50:12 znuny-test-01 OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-20[188759]: [Error][Kernel::System::MailAccount::MailAccountGet][Line:334]: Unknown column 'authentication_type' in 'field list', SQL: 'SELECT login, pw, host, account_type, queue_id, imap_folder, trusted, comments, valid_id, authentication_type, oauth2_token_config_id, create_time, change_time FROM mail_account WHERE id = ?'
Oct 21 08:50:12 znuny-test-01 OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-20[188759]: [Error][Kernel::System::Daemon::DaemonModules::BaseTaskWorker::_HandleError][Line:53]: There was an error executing Execute() in Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch: DBD::mysql::st execute failed: Unknown column 'authentication_type' in 'field list' at /opt/otrs/Kernel/System/DB.pm line 695.#012ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-20 Perl: 5.34.0 OS: linux Time: Fri Oct 21 06:50:12 2022#012#012 Message: Unknown column 'authentication_type' in 'field list', SQL: 'SELECT login, pw, host, account_type, queue_id, imap_folder, trusted, comments, valid_id, authentication_type, oauth2_token_config_id, create_time, change_time FROM mail_account WHERE id = ?'#012#012 Traceback (188759): #012 Module: Kernel::System::MailAccount::MailAccountGet Line: 334#012 Module: Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run Line: 157#012 Module: (eval) Line: 460#012 Module: Kernel::System::Console::BaseCommand::Execute Line: 454#012 Module: (eval) Line: 143#012 Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Cron::Run Line: 122#012 Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Run Line: 236#012 Module: (eval) Line: 330#012 Module: main::Start Line: 330#012 Module: /opt/otrs/bin/otrs.Daemon.pl Line: 151#012#012Error: Wide character in shmwrite at /opt/otrs/Kernel/System/Log.pm line 263.
Oct 21 09:00:01 znuny-test-01 CRON[188795]: (smmsp) CMD (test -x /etc/init.d/sendmail && test -x /usr/share/sendmail/sendmail && test -x /usr/libexec/sendmail/sendmail && /usr/share/sendmail/sendmail cron-msp)
Oct 21 09:00:13 znuny-test-01 OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-20[188823]: [Error][Kernel::System::MailAccount::MailAccountGet][Line:334]: Unknown column 'authentication_type' in 'field list', SQL: 'SELECT login, pw, host, account_type, queue_id, imap_folder, trusted, comments, valid_id, authentication_type, oauth2_token_config_id, create_time, change_time FROM mail_account WHERE id = ?'
Oct 21 09:00:13 znuny-test-01 OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-20[188823]: [Error][Kernel::System::Daemon::DaemonModules::BaseTaskWorker::_HandleError][Line:53]: There was an error executing Execute() in Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch: DBD::mysql::st execute failed: Unknown column 'authentication_type' in 'field list' at /opt/otrs/Kernel/System/DB.pm line 695.#012ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-20 Perl: 5.34.0 OS: linux Time: Fri Oct 21 07:00:13 2022#012#012 Message: Unknown column 'authentication_type' in 'field list', SQL: 'SELECT login, pw, host, account_type, queue_id, imap_folder, trusted, comments, valid_id, authentication_type, oauth2_token_config_id, create_time, change_time FROM mail_account WHERE id = ?'#012#012 Traceback (188823): #012 Module: Kernel::System::MailAccount::MailAccountGet Line: 334#012 Module: Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run Line: 157#012 Module: (eval) Line: 460#012 Module: Kernel::System::Console::BaseCommand::Execute Line: 454#012 Module: (eval) Line: 143#012 Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Cron::Run Line: 122#012 Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Run Line: 236#012 Module: (eval) Line: 330#012 Module: main::Start Line: 330#012 Module: /opt/otrs/bin/otrs.Daemon.pl Line: 151#012#012Error: Wide character in shmwrite at /opt/otrs/Kernel/System/Log.pm line 263.
Oct 21 09:01:42 znuny-test-01 shibboleth: WARN Shibboleth.DEPRECATION : MetadataGenerator handler
I'm surprised to see the error about Log.pm as I patched it like this (it worked for previous versions) :
# Fix for issue #286 (GitHub) / #328 (internal): Encode output.
my $EncodeObject = $Kernel::OM->Get('Kernel::System::Encode');

my $Output = $Data . $String;
$EncodeObject->EncodeOutput( \$Output );

shmwrite( $Self->{IPCSHMKey}, $Output, 0, $Self->{IPCSize} ) || die $!;
#shmwrite( $Self->{IPCSHMKey}, $Data . $String, 0, $Self->{IPCSize} ) || die $!;


Last edited by ahauser on 26 Oct 2022, 08:28, edited 1 time in total.
root
Administrator
Posts: 3963
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Can't authenticate after migration to Znuny 6.3

Post by root »

Hi,

Have you executed the migration script? It looks to me like you didn't.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
ahauser
Znuny newbie
Posts: 42
Joined: 19 May 2017, 10:09
Znuny Version: ITSM5S

Re: Can't authenticate after migration to Znuny 6.3

Post by ahauser »

I did :
$ history | grep -i migrate
33 scripts/MigrateToZnuny6_3.pl
Johannes
Moderator
Posts: 393
Joined: 30 Jan 2008, 02:26
Znuny Version: All of them ^^
Real Name: Hannes
Company: Znuny|OTTERHUB

Re: Can't authenticate after migration to Znuny 6.3

Post by Johannes »

There has to be some output somewhere during the migration.
The error you posted is related to a missing column, which indicates that the migration script was not successfully executed.
[Kernel::System::Daemon::DaemonModules::BaseTaskWorker::_HandleError][Line:53]: There was an error executing Execute() in Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch: DBD::mysql::st execute failed: Unknown column 'authentication_type' in 'field list' at
Can you post:
- cat RELEASE
- bin/otrs.CheckModules.pl --all

And the output of your migration script please.
You can re run it safely.
ahauser
Znuny newbie
Posts: 42
Joined: 19 May 2017, 10:09
Znuny Version: ITSM5S

Re: Can't authenticate after migration to Znuny 6.3

Post by ahauser »

cat RELEASE
PRODUCT = Znuny
VERSION = 6.3.1
BUILDDATE = Wed Mar 9 16:34:24 CET 2022
BUILDHOST = znuny.02
COMMIT_ID = b2c2252d43653588a8fc2f39babc046c88a7c27e
bin/otrs.CheckModules.pl --all
o Apache::DBI......................ok (v1.12)
o Apache2::Reload..................ok (v0.13)
o Archive::Tar.....................ok (v2.38)
o Archive::Zip.....................ok (v1.68)
o Authen::SASL.....................ok (v2.16)
o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
o CSS::Minifier::XS................ok (v0.13)
o Data::UUID.......................ok (v1.0602)
o Date::Format.....................ok (v2.24)
o DateTime.........................ok (v1.55)
o DateTime::TimeZone.............ok (v2.51)
o DBI..............................ok (v1.643)
o DBD::mysql.......................ok (v4.050)
o DBD::ODBC........................Not installed! To install, you can use: 'apt-get install -y libdbd-odbc-perl'. (optional - Required to connect to a MS-SQL database.)
o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
o DBD::Pg..........................Not installed! To install, you can use: 'apt-get install -y libdbd-pg-perl'. (optional - Required to connect to a PostgreSQL database.)
o Digest::SHA......................ok (v6.02)
o Encode::HanExtra.................ok (v0.23)
o Excel::Writer::XLSX..............ok (v0.95)
o Hash::Merge......................ok (v0.302)
o IO::Socket::SSL..................ok (v2.074)
o JavaScript::Minifier::XS.........ok (v0.15)
o Jq...............................Not installed! (optional - Support for extended condition checking via Jq for the generic interface.)
o JSON::XS.........................ok (v4.03)
o List::Util::XS...................ok (v1.55)
o LWP::UserAgent...................ok (v6.53)
o Mail::IMAPClient.................ok (v3.43)
o IO::Socket::SSL................ok (v2.074)
o Authen::NTLM...................ok (v1.09)
o ModPerl::Util....................ok (v2.000012)
o Moo..............................ok (v2.005004)
o Net::DNS.........................ok (v1.33)
o Net::LDAP........................ok (v0.68)
o Net::SMTP........................ok (v3.13)
o Spreadsheet::XLSX................ok (v0.17)
o Template.........................ok (v2.27)
o Template::Stash::XS..............ok (undef)
o Text::Diff::FormattedHTML........ok (v0.08)
o Text::CSV_XS.....................ok (v1.47)
o Time::HiRes......................ok (v1.9767)
o XML::LibXML......................ok (v2.0134)
o XML::LibXSLT.....................ok (v1.99)
o XML::Parser......................ok (v2.46)
o YAML::XS.........................ok (v0.83)

Bundled modules:

o Algorithm::Diff..................ok (v1.1903)
o Apache::DBI......................ok (v1.12)
o CGI..............................ok (v4.36)
o CSS::Minifier....................ok (v0.01)
o Class::Inspector.................ok (v1.31)
o Crypt::PasswdMD5.................ok (v1.40)
o Crypt::Random::Source............ok (v0.14)
o Email::Valid.....................ok (v1.202)
o Encode::Locale...................ok (v1.05)
o Exporter::Tiny...................ok (v1.002001)
o IO::Interactive..................ok (v1.022)
o JSON.............................ok (v2.94)
o JSON::PP.........................ok (v2.27203)
o JavaScript::Minifier.............ok (v1.15)
o LWP..............................ok (v6.53)
o Linux::Distribution..............ok (v0.23)
o Locale::Codes....................ok (v3.52)
o MIME::Tools......................ok (v5.509)
o Mail::Address....................ok (v2.18)
o Mail::Internet...................ok (v2.18)
o Math::Random::ISAAC..............ok (v1.004)
o Math::Random::Secure.............ok (v0.080001)
o Module::Find.....................ok (v0.15)
o Module::Refresh..................ok (v0.17)
o Moo..............................ok (v2.005004)
o Mozilla::CA......................ok (v20211001)
o Net::HTTP........................ok (v6.17)
o Net::IMAP::Simple................ok (v1.2209)
o Net::SSLGlue.....................ok (v1.058)
o PDF::API2........................ok (v2.033)
o SOAP::Lite.......................ok (v1.20)
Argument "v4" isn't numeric in sprintf at bin/otrs.CheckModules.pl line 946.
o Sisimai..........................ok (vv4.25.11)
o Sys::Hostname::Long..............ok (v1.5)
o Text::CSV........................ok (v1.95)
o Text::Diff.......................ok (v1.44)
o Types::TypeTiny..................ok (v1.010000)
o URI..............................ok (v1.71)
o YAML.............................ok (v1.23)
o namespace::clean.................ok (v0.27)
o parent...........................ok (v0.236)
scripts/MigrateToZnuny6_3.pl
Migration started ...

Checking requirements ...

Requirement check for: Check required Perl version ...
Requirement check for: Check required database version ...
Requirement check for: Check database charset ...
Requirement check for: Check required Perl modules ...
Requirement check for: Check if database has been backed up ...

Did you backup the database? [Y]es/[N]o: yes

Requirement check for: Upgrade database structure ...

Executing tasks ...

Step 1 of 23: Check required Perl version ...
Step 2 of 23: Check required database version ...
Step 3 of 23: Check database charset ...
Step 4 of 23: Check required Perl modules ...
Step 5 of 23: Check installed CPAN modules for known vulnerabilities ...
Step 6 of 23: Check if database has been backed up ...
Step 7 of 23: Migrate Excel stats format definitions ...
Step 8 of 23: Upgrade database structure ...
Step 9 of 23: Upgrade database structure for new scope attribute in ProcessManagement ...
Step 10 of 23: Add history types ...
Step 11 of 23: Migrate SysConfig settings ...
Step 12 of 23: Migrate OAuth2 token database tables ...
Step 13 of 23: Migrates calendar based ticket creation tables ...
Step 14 of 23: Migrate database backends ...
Step 15 of 23: Migrates mail account database table ...
Step 16 of 23: Rebuild configuration ...
Step 17 of 23: Uninstall merged packages ...
Step 18 of 23: Initialize default cron jobs ...
Copying /opt/otrs/var/cron/aaa_base.dist to /opt/otrs/var/cron/aaa_base...
done.
Copying /opt/otrs/var/cron/otrs_daemon.dist to /opt/otrs/var/cron/otrs_daemon...
done.
Step 19 of 23: Clean up the cache ...
Step 20 of 23: Rebuild configuration another time ...
Step 21 of 23: Deploy ACLs ...
Step 22 of 23: Deploy processes ...
Step 23 of 23: Check invalid settings ...



Migration completed!
And this is the /var/log/syslog when I ran the script :
Oct 21 13:47:11 znuny-test-01 OTRS-otrs.Console.pl-Dev::Code::CPANAudit-20[190987]: [Error][Kernel::System::DBCRUD::MigrateUUIDDatabaseTableColumns][Line:1800]: Unknown column 'z4o_database_backend_uuid' in 'field list', SQL: 'SELECT z4o_database_backend_uuid FROM oauth2_token LIMIT 1'
Oct 21 13:47:11 znuny-test-01 OTRS-otrs.Console.pl-Dev::Code::CPANAudit-20[190987]: [Error][Kernel::System::DBCRUD::MigrateUUIDDatabaseTableColumns][Line:1800]: Unknown column 'database_backend_uuid' in 'field list', SQL: 'SELECT database_backend_uuid FROM oauth2_token LIMIT 1'
Oct 21 13:47:11 znuny-test-01 OTRS-otrs.Console.pl-Dev::Code::CPANAudit-20[190987]: [Error][Kernel::System::DBCRUD::IsUUIDDatabaseTableColumnPresent][Line:1674]: Unknown column 'dbcrud_uuid' in 'field list', SQL: 'SELECT dbcrud_uuid FROM oauth2_token LIMIT 1'
Oct 21 13:47:11 znuny-test-01 OTRS-otrs.Console.pl-Dev::Code::CPANAudit-20[190987]: [Error][Kernel::System::DBCRUD::MigrateUUIDDatabaseTableColumns][Line:1800]: Unknown column 'z4o_database_backend_uuid' in 'field list', SQL: 'SELECT z4o_database_backend_uuid FROM oauth2_token_config LIMIT 1'
Oct 21 13:47:11 znuny-test-01 OTRS-otrs.Console.pl-Dev::Code::CPANAudit-20[190987]: [Error][Kernel::System::DBCRUD::MigrateUUIDDatabaseTableColumns][Line:1800]: Unknown column 'database_backend_uuid' in 'field list', SQL: 'SELECT database_backend_uuid FROM oauth2_token_config LIMIT 1'
Oct 21 13:47:11 znuny-test-01 OTRS-otrs.Console.pl-Dev::Code::CPANAudit-20[190987]: [Error][Kernel::System::DBCRUD::IsUUIDDatabaseTableColumnPresent][Line:1674]: Unknown column 'dbcrud_uuid' in 'field list', SQL: 'SELECT dbcrud_uuid FROM oauth2_token_config LIMIT 1'
By the way, I had similar result with 6.3.4, this is why I'm trying first in 6.3.1
Johannes
Moderator
Posts: 393
Joined: 30 Jan 2008, 02:26
Znuny Version: All of them ^^
Real Name: Hannes
Company: Znuny|OTTERHUB

Re: Can't authenticate after migration to Znuny 6.3

Post by Johannes »

Ok. This looks good so far.
When you restart the webserver and try to login.

What is shown in the log? What is the error message in the GUI?
ahauser
Znuny newbie
Posts: 42
Joined: 19 May 2017, 10:09
Znuny Version: ITSM5S

Re: Can't authenticate after migration to Znuny 6.3

Post by ahauser »

There is no error in the interface. The button to login as agent is gray, as unclickable.

However, the web developer tools in Firefox show the following in the console :
Uncaught ReferenceError: jQuery is not defined
Uncaught TypeError: Core.Language is undefined
Uncaught TypeError: Core.Template is undefined
Uncaught TypeError: Core.Init is undefined
Uncaught TypeError: Core.Init is undefined
Uncaught TypeError: Core.App.Ready is not a function
Johannes
Moderator
Posts: 393
Joined: 30 Jan 2008, 02:26
Znuny Version: All of them ^^
Real Name: Hannes
Company: Znuny|OTTERHUB

Re: Can't authenticate after migration to Znuny 6.3

Post by Johannes »

Ahhh... thats a new information.

please run bin/otrs.Console.pl Maint::Config::Rebuild --cleanup

/opt/otrs/bin/otrs.Console.pl Maint::Loader::CacheCleanup
/opt/otrs/bin/otrs.Console.pl Maint::Loader::CacheGenerate

There is a similar thread here:
viewtopic.php?f=53&t=43306

Edit:
And maybe private browser session to make sure no browser cache is used
ahauser
Znuny newbie
Posts: 42
Joined: 19 May 2017, 10:09
Znuny Version: ITSM5S

Re: Can't authenticate after migration to Znuny 6.3

Post by ahauser »

I did those commands and used a private window to test, without success.
I also tried
bin/otrs.Console.pl Admin::Config::Update --setting-name Loader::Enabled::JS --value 0
as suggested on the link you gave, without success either.

The last error here (after trying to log in again) seem related to the DB :
Oct 21 14:40:10 znuny-test-01 dovecot: imap-login: Disconnected: Connection closed (auth failed, 1 attempts in 4 secs): user=<support-test>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured, session=<DUbUvYrr/NN/AAAB>
Oct 21 14:40:10 znuny-test-01 OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-20[191875]: [Error][Kernel::System::CommunicationLog::_LogError][Line:535]: CommunicationLog(ID:387387,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:548309)::Kernel::System::MailAccount::IMAP => IMAP: Can't connect to localhost: 1 NO [AUTHENTICATIONFAILED] Authentication failed.
Oct 21 14:41:34 znuny-test-01 shibboleth: WARN Shibboleth.DEPRECATION : MetadataGenerator handler
Oct 21 14:41:35 znuny-test-01 mariadbd[67295]: 2022-10-21 14:41:35 95143 [Warning] Aborted connection 95143 to db: 'otrs' user: 'otrs' host: 'localhost' (Got an error reading communication packets
Johannes
Moderator
Posts: 393
Joined: 30 Jan 2008, 02:26
Znuny Version: All of them ^^
Real Name: Hannes
Company: Znuny|OTTERHUB

Re: Can't authenticate after migration to Znuny 6.3

Post by Johannes »

This is not related to the problem with the missing login. This is related to the mailing, so you can ignore it for now.

when you open the browser console, do you see any 404 errors for missing files?

Edit:
In chome & edge it should look something like this:
DevTools - localhostznuny-634index.pl 2022-10-21 15-15-13.png
You do not have the required permissions to view the files attached to this post.
ahauser
Znuny newbie
Posts: 42
Joined: 19 May 2017, 10:09
Znuny Version: ITSM5S

Re: Can't authenticate after migration to Znuny 6.3

Post by ahauser »

In the console tab (I replaced the URL with "mycompany") :
Uncaught ReferenceError: jQuery is not defined
<anonymous> https://mycompany.com/otrs-web/js/js-ca ... e3c2b.js:1
CommonJS_6cba7267f70a0bd362315f506d2e3c2b.js:1:1
Uncaught TypeError: Core.Language is undefined
<anonymous> https://mycompany.com/otrs-web/js/js-ca ... 59502.js:2
TranslationJS_es_c601e64f087ab35d5097bf1671c59502.js:2:1
Uncaught TypeError: Core.Template is undefined
<anonymous> https://mycompany.com/otrs-web/js/js-ca ... 826ff.js:2
TemplateJS_5bce4eca56f209d784b6d4c0fcc826ff.js:2:1
Uncaught TypeError: Core.Init is undefined
Login https://mycompany.com/otrs-web/js/js-ca ... 192c.js:14
<anonymous> https://mycompany.com/otrs-web/js/js-ca ... 192c.js:14
ModuleJS_fe864c29d53738407efba73890b6192c.js:14:93
Uncaught TypeError: Core.Init is undefined
<anonymous> https://mycompany.com/otrs/index.pl:258
index.pl:258:1
Uncaught TypeError: Core.App.Ready is not a function
<anonymous> https://mycompany.com/otrs/index.pl:277
index.pl:277:10
Uncaught TypeError: Core.App.Ready is not a function
<anonymous> https://mycompany.com/otrs/index.pl:289
Here is what I have in the network tab :

Image
You do not have the required permissions to view the files attached to this post.
Johannes
Moderator
Posts: 393
Joined: 30 Jan 2008, 02:26
Znuny Version: All of them ^^
Real Name: Hannes
Company: Znuny|OTTERHUB

Re: Can't authenticate after migration to Znuny 6.3

Post by Johannes »

I got a question.
This bin/otrs.Console.pl Admin::Config::Update --setting-name Loader::Enabled::JS --value 0
should set the loader to disabled. What I see is, that the loader is still active.

Please copy this line to your Config.pm

$Self->{'Loader::Enabled::JS'} = '0';

You should see a lot of JS files. Like in my screenshot
ahauser
Znuny newbie
Posts: 42
Joined: 19 May 2017, 10:09
Znuny Version: ITSM5S

Re: Can't authenticate after migration to Znuny 6.3

Post by ahauser »

Yes re-enabled it, sorry I forgot to mention it.
This is what I have after turning it off (and running again the 3 commands to rebuild config and clean cache):

Console tab :
Uncaught ReferenceError: jQuery is not defined
<anonymous> jQuery
jquery-browser-detection.js:6:1
Ha fallado la carga del <script> con origen "https://mycompany.com/otrs-web/js/third ... uery-ui.js". index.pl:251:1
Uncaught ReferenceError: jQuery is not defined
<anonymous> jQuery
jquery.ui.touch-punch.js:11:1
Uncaught ReferenceError: jQuery is not defined
jQuery 2
jquery.validate.js:15:3
Uncaught ReferenceError: jQuery is not defined
<anonymous> jQuery
pubsub.js:76:1
Uncaught ReferenceError: jQuery is not defined
jQuery 2
jquery.jstree.js:11:3
Ha fallado la carga del <script> con origen "https://mycompany.com/otrs-web/js/third ... unjucks.js". index.pl:256:1
Uncaught ReferenceError: $ is not defined
<anonymous> https://mycompany.com/otrs-web/js/Core. ... ents.js:40
Core.JavaScriptEnhancements.js:40:1
Uncaught ReferenceError: $ is not defined
InputFields https://mycompany.com/otrs-web/js/Core. ... ds.js:2471
<anonymous> https://mycompany.com/otrs-web/js/Core. ... ds.js:2490
Core.UI.InputFields.js:2471:5
Uncaught Namespace Core.UI.Datepicker could not be initialized, because jQuery UI datepicker could not be found. Core.Debug.js:122:13
Uncaught Namespace Core.UI.DnD could not be initialized, because jQuery UI sortable could not be found. Core.Debug.js:122:13
Uncaught Namespace Core.UI.Dialog could not be initialized, because jQuery UI draggable could not be found. Core.Debug.js:122:13
Uncaught ReferenceError: $ is not defined
Autocomplete https://mycompany.com/otrs-web/js/Core. ... ete.js:105
<anonymous> https://mycompany.com/otrs-web/js/Core. ... ete.js:275
Core.UI.Autocomplete.js:105:5
Uncaught ReferenceError: $ is not defined
Form https://mycompany.com/otrs-web/js/Core.Form.js:35
<anonymous> https://mycompany.com/otrs-web/js/Core.Form.js:310
Core.Form.js:35:5
Uncaught ReferenceError: $ is not defined
ErrorTooltips https://mycompany.com/otrs-web/js/Core. ... tips.js:87
<anonymous> https://mycompany.com/otrs-web/js/Core. ... ips.js:264
Core.Form.ErrorTooltips.js:87:27
Uncaught Namespace Core.Form.Validate could not be initialized, because Core.UI.Dialog could not be found. Core.Debug.js:122:13
Uncaught Namespace Core.Agent could not be initialized, because Core.Form.Validate could not be found. Core.Debug.js:122:13
Uncaught ReferenceError: $ is not defined
Subscribe https://mycompany.com/otrs-web/js/Core.App.js:510
Responsive https://mycompany.com/otrs-web/js/Core. ... sive.js:24
<anonymous> https://mycompany.com/otrs-web/js/Core. ... ive.js:216
Core.App.js:510:9
Uncaught ReferenceError: $ is not defined
Ready https://mycompany.com/otrs-web/js/Core.App.js:183
<anonymous> https://mycompany.com/otrs/index.pl:315
Core.App.js:183:13
Uncaught ReferenceError: $ is not defined
Ready https://mycompany.com/otrs-web/js/Core.App.js:183
<anonymous> https://mycompany.com/otrs/index.pl:332
Core.App.js:183:13
Uncaught ReferenceError: $ is not defined
Ready https://mycompany.com/otrs-web/js/Core.App.js:183
<anonymous> https://mycompany.com/otrs/index.pl:344
Core.App.js:183:13
Uncaught TypeError: document.getElementById(...) is null
template https://mycompany.com/otrs-web/js/third ... late.js:28
Network Tab (I filtered by state to show the 4 with error first) :

Image
You do not have the required permissions to view the files attached to this post.
Johannes
Moderator
Posts: 393
Joined: 30 Jan 2008, 02:26
Znuny Version: All of them ^^
Real Name: Hannes
Company: Znuny|OTTERHUB

Re: Can't authenticate after migration to Znuny 6.3

Post by Johannes »

Ah,

there we have it.
nunjuck and jquery are missing.

First:
please check if this file/path exists
var/httpd/htdocs/js/thirdparty/nunjucks-3.2.2/nunjucks.min.js

second:
please check if this file / path exists
otrs-web/js/thirdparty/jquery-ui-1.13.1/jquery-ui.js

If both files exists, at this path, proceed.
My guess is that there is some old config stuff lying around.

grep in Kernel/Config/Files for:
grep- Rn 'nunjucks.js' .
grep- Rn 'jquery-ui.js' .
And post the output
Johannes
Moderator
Posts: 393
Joined: 30 Jan 2008, 02:26
Znuny Version: All of them ^^
Real Name: Hannes
Company: Znuny|OTTERHUB

Re: Can't authenticate after migration to Znuny 6.3

Post by Johannes »

when the files are available, you could also try:
bin/otrs.Console.pl Admin::Config::FixMissingFrontendFiles

Regards
ahauser
Znuny newbie
Posts: 42
Joined: 19 May 2017, 10:09
Znuny Version: ITSM5S

Re: Can't authenticate after migration to Znuny 6.3

Post by ahauser »

Here is what I have :
nunjucks-3.2.3/ (instead of 3.2.2)
/opt/otrs/var/httpd/htdocs/js/thirdparty/jquery-ui-1.13.1/jquery-ui.js exists

grep -Rn 'nunjucks.js'

Code: Select all

ZZZAAuto.pm:5349:  'thirdparty/nunjucks-3.0.1/nunjucks.js',
ZZZAAuto.pm:5442:  'thirdparty/nunjucks-3.2.3/nunjucks.js',
XML/Framework.xml:8104:                <Item>thirdparty/nunjucks-3.2.3/nunjucks.js</Item>
XML/Framework.xml:8205:                <Item>thirdparty/nunjucks-3.2.3/nunjucks.js</Item>
grep -Rn 'jquery-ui.js' .
./ZZZAAuto.pm:5344: 'thirdparty/jquery-ui-1.12.1/jquery-ui.js',
./ZZZAAuto.pm:5439: 'thirdparty/jquery-ui-1.13.1/jquery-ui.js',
./XML/Framework.xml:8099: <Item>thirdparty/jquery-ui-1.13.1/jquery-ui.js</Item>
./XML/Framework.xml:8202: <Item>thirdparty/jquery-ui-1.13.1/jquery-ui.js</Item>
Can that be related to the fact we added custom js files in the list of files loaded by the js loader (in the system configuration) ?
ahauser
Znuny newbie
Posts: 42
Joined: 19 May 2017, 10:09
Znuny Version: ITSM5S

Re: Can't authenticate after migration to Znuny 6.3

Post by ahauser »

Johannes wrote: 21 Oct 2022, 16:31 when the files are available, you could also try:
bin/otrs.Console.pl Admin::Config::FixMissingFrontendFiles

Regards

bin/otrs.Console.pl Admin::Config::FixMissingFrontendFiles
Fixing missing JavaScript and CSS configurations...

Error: Not an ARRAY reference at /opt/znuny-6.3.1/Kernel/System/Console/Command/Admin/Config/FixMissingFrontendFiles.pm line 154.
Johannes
Moderator
Posts: 393
Joined: 30 Jan 2008, 02:26
Znuny Version: All of them ^^
Real Name: Hannes
Company: Znuny|OTTERHUB

Re: Can't authenticate after migration to Znuny 6.3

Post by Johannes »

ahauser wrote: 21 Oct 2022, 16:35 Here is what I have :
nunjucks-3.2.3/ (instead of 3.2.2)
/opt/otrs/var/httpd/htdocs/js/thirdparty/jquery-ui-1.13.1/jquery-ui.js exists

grep -Rn 'nunjucks.js'

Code: Select all

ZZZAAuto.pm:5349:  'thirdparty/nunjucks-3.0.1/nunjucks.js',
ZZZAAuto.pm:5442:  'thirdparty/nunjucks-3.2.3/nunjucks.js',
XML/Framework.xml:8104:                <Item>thirdparty/nunjucks-3.2.3/nunjucks.js</Item>
XML/Framework.xml:8205:                <Item>thirdparty/nunjucks-3.2.3/nunjucks.js</Item>
grep -Rn 'jquery-ui.js' .
./ZZZAAuto.pm:5344: 'thirdparty/jquery-ui-1.12.1/jquery-ui.js',
./ZZZAAuto.pm:5439: 'thirdparty/jquery-ui-1.13.1/jquery-ui.js',
./XML/Framework.xml:8099: <Item>thirdparty/jquery-ui-1.13.1/jquery-ui.js</Item>
./XML/Framework.xml:8202: <Item>thirdparty/jquery-ui-1.13.1/jquery-ui.js</Item>
Can that be related to the fact we added custom js files in the list of files loaded by the js loader (in the system configuration) ?
Yes exactly.
Try resetting the configs:
bin/otrs.Console.pl Admin::Config::Update --value Loader::Agent::CommonJS###000-Framework --reset
bin/otrs.Console.pl Admin::Config::Update --value Loader::Customer::CommonJS###000-Framework --reset
ahauser
Znuny newbie
Posts: 42
Joined: 19 May 2017, 10:09
Znuny Version: ITSM5S

Re: Can't authenticate after migration to Znuny 6.3

Post by ahauser »

Thanks, it worked replacing --value with --setting-name :
$ bin/otrs.Console.pl Admin::Config::Update --setting-name Loader::Agent::CommonJS###000-Framework --reset
Resetting setting value...

Done.
$ bin/otrs.Console.pl Admin::Config::Update --setting-name Loader::Customer::CommonJS###000-Framework --reset
Resetting setting value...

Done.
I can now login in the Agent interface.
ahauser
Znuny newbie
Posts: 42
Joined: 19 May 2017, 10:09
Znuny Version: ITSM5S

Re: Can't authenticate after migration to Znuny 6.3

Post by ahauser »

Thanks for your help, we can consider this topic as solved.
I now encounter problems migrating to 6.4 but it's another topic ;)
viewtopic.php?f=53&t=43350
Post Reply