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

Javascript error when loading a text file #2393

Open
rbatllet opened this issue Apr 4, 2022 · 9 comments
Open

Javascript error when loading a text file #2393

rbatllet opened this issue Apr 4, 2022 · 9 comments

Comments

@rbatllet
Copy link

rbatllet commented Apr 4, 2022

I have installed the application locally but when loading a file I get a javascript error. The error message in the view is "Error: Invalid Upload Token. Check your browser, cookies must be enabled for this domain".

The javascript error is as follows:

upload.js:130852 Uncaught TypeError: Cannot read properties of undefined (reading 'split')

I am using the current version.

Cookies are fully enabled

Translated with www.DeepL.com/Translator (free version)
Screenshot 2022-04-04 at 18 00 16

@riccio82
Copy link
Contributor

riccio82 commented Apr 5, 2022

Hi @rbatllet ,

Have you tried searching to see if anyone has had the same problem as you?

Like this: #1575

@rbatllet
Copy link
Author

rbatllet commented Apr 5, 2022

All indications are that this problem has not yet been resolved.

@riccio82
Copy link
Contributor

riccio82 commented Apr 5, 2022

Are you using SSL?

@rbatllet
Copy link
Author

rbatllet commented Apr 5, 2022

Of course, I'm using SSL

@rbatllet
Copy link
Author

rbatllet commented Apr 6, 2022

Problem solved. The permissions for this file have to be as shown in the following image of the /home/matecat/matecat/inc directory:
Screenshot 2022-04-06 at 16 18 18

@rbatllet rbatllet closed this as completed Apr 6, 2022
@rbatllet rbatllet reopened this Apr 7, 2022
@rbatllet
Copy link
Author

rbatllet commented Apr 7, 2022

I have detected a problem. If I reload the page a couple of times, the file loading stops working. I have to reload again so that it can work again.

Screenshot 2022-04-07 at 11 41 04

Screenshot 2022-04-07 at 11 42 28

Screenshot 2022-04-07 at 11 42 41

@jiakhan20
Copy link

Hi everyone,

I am facing the same issue as describe in this thread. Can anyone solve this issue?

@rbatllet
Copy link
Author

@jiakhan20 Have you previously done this? -> #2393 (comment)

@jiakhan20
Copy link

@rbatllet Yes, first I was facing permission problem. Now I am facing #2481 and #2393 issue. My logs regarding these errors are as follow:

/var/log/apache2/matecat/error.log
[Tue Jan 10 00:32:12.812193 2023] [:error] [pid 4646] [client 192.168.8.1:34302] PHP Notice: Undefined index: upload_session in /home/matecat/matecat/lib/Utils/fileupload/upload.class.php on line 18, referer: https://projectmatecat.com/
[Tue Jan 10 00:32:12.813403 2023] [:error] [pid 4646] [client 192.168.8.1:34302] PHP Notice: Undefined index: upload_session in /home/matecat/matecat/lib/Utils/fileupload/upload.class.php on line 19, referer: https://projectmatecat.com/
[Tue Jan 10 00:32:12.814255 2023] [:error] [pid 4646] [client 192.168.8.1:34302] PHP Notice: Undefined index: upload_session in /home/matecat/matecat/lib/Utils/fileupload/upload.class.php on line 365, referer: https://projectmatecat.com/

/home/matecat/matecat/storage/log_archive/php_errors.txt
[11-Jan-2023 00:01:17 Europe/Rome] PHP Notice: Undefined index: samesite in /home/matecat/matecat/lib/Utils/CookieManager.php on line 28
[11-Jan-2023 00:01:17 Europe/Rome] PHP Notice: Undefined index: secure in /home/matecat/matecat/lib/Utils/CookieManager.php on line 30
[11-Jan-2023 00:01:17 Europe/Rome] PHP Notice: Undefined index: httponly in /home/matecat/matecat/lib/Utils/CookieManager.php on line 31

There is no issue of permission and I tired to enable cookies for all website and also specifically mention my domain as well.

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

No branches or pull requests

3 participants