simjanos-dev / LinguaCafe

LinguaCafe is a self-hosted software that helps language learners read foreign languages.
https://simjanos-dev.github.io/LinguaCafeHome/
GNU General Public License v3.0
858 stars 29 forks source link

Installable Language Settings Page keeps loading forever #232

Closed OddMagnet closed 5 months ago

OddMagnet commented 5 months ago

I just finished installing LinguaCafe and importing dictionaries for Japanes. When I switch to "Admin Settings -> Languages" the page just keeps showing the loading indicators forever. I also can't import any books, though I suppose I need to install a Language first for that.

Neither docker logs nor the logs under storage/logs show anything

simjanos-dev commented 5 months ago

I'm not sure what the problem is. Can you please check the browser console and browser network page, what request fails, and what is the response for it?

Are you only unable to import books, or all kinds of texts? If you can't import only books, the most common issue is with the folder permissions on linux and mac.

You can use all the languages you can select without installing anything.

OddMagnet commented 5 months ago

I get the following output in the browsers console:

GET https://lingua.domain.com/languages/get-admin-language-settings-data 500 (Internal Server Error)
(anonymous) @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.exports @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.exports @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
d.request @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
i.forEach.d.<computed> @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
(anonymous) @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
loadLanguages @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
mounted @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Jn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Fn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
insert @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
S @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
ja.nodeOps @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e._update @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
i @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.get @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.run @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
En @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
(anonymous) @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
ni @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Promise.then (async)
Xn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
si @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Bn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.update @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.notify @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
set @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Bi.Ei.set @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
updateItem @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
(anonymous) @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
(anonymous) @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
ni @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Promise.then (async)
Xn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
si @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.$nextTick @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
onRouteChange @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Jn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.run @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
En @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
(anonymous) @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
ni @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Promise.then (async)
Xn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
si @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Bn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.update @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.notify @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
set @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Bi.Ei.set @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
set @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
updateSingle @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
updateInternalValue @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
onClick @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
(anonymous) @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Jn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.$emit @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
toggle @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
click @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Jn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
n @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
r._wrapper @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
app.js?id=bfd68bf1a09662042c6f875935a3b03a:2 Uncaught (in promise) Error: Request failed with status code 500
    at e.exports (app.js?id=bfd68bf1a09662042c6f875935a3b03a:2:5365)
    at e.exports (app.js?id=bfd68bf1a09662042c6f875935a3b03a:2:7778)
    at XMLHttpRequest.g (app.js?id=bfd68bf1a09662042c6f875935a3b03a:2:712)
e.exports @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.exports @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
g @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Promise.then (async)
loadLanguages @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
mounted @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Jn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Fn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
insert @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
S @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
ja.nodeOps @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e._update @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
i @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.get @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.run @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
En @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
(anonymous) @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
ni @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Promise.then (async)
Xn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
si @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Bn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.update @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.notify @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
set @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Bi.Ei.set @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
updateItem @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
(anonymous) @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
(anonymous) @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
ni @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Promise.then (async)
Xn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
si @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.$nextTick @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
onRouteChange @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Jn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.run @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
En @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
(anonymous) @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
ni @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Promise.then (async)
Xn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
si @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Bn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.update @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.notify @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
set @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Bi.Ei.set @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
set @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
updateSingle @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
updateInternalValue @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
onClick @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
(anonymous) @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Jn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
e.$emit @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
toggle @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
click @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
Jn @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
n @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2
r._wrapper @ app.js?id=bfd68bf1a09662042c6f875935a3b03a:2

Under the network tab I don't see anything failing, though the only request I see is the for reload of the page itself.

I can't import anything. My permissions are as follows:

-rwxrwxrwx 1 root   root  102 May  1 14:48 .gitignore*
drwxrwxrwx 1 root   root   44 May  1 14:48 storage/
drwxrwxrwx 1 root   root  138 May  1 14:48 .git/
drwxrwxrwx 1 root   root   58 May  1 14:48 ./
drwxrwxrwx 1    999 root  734 May  1 14:58 database/

What do you mean by "all the languages you can select"? On the "Installable languages" there's only the loading indicator. And in the bottom left is only "Spanish", which I can click but that only opens an alert that's also loading forever

OddMagnet commented 5 months ago

LinguaCafe

simjanos-dev commented 5 months ago

What do you mean by "all the languages you can select"?

I meant the bottom left select. When you click on it, it supposed to show a list of languages that you can select.

Only an error when importing an ebook file could be caused by permission problems. Since you cannot import anything, it is not related to permissions.

All 3 places: bottom left language selection, admin languages page and importing anything would fail if the web server cannot reach the python server, or if the python server is not working.

Can you please:

And copy the python docker logs here?

simjanos-dev commented 5 months ago

Under the network tab I don't see anything failing, though the only request I see is the for reload of the page itself.

I've just seen this. That is really strange, because the console does show the http request failing:

GET https://lingua.domain.com/languages/get-admin-language-settings-data 500 (Internal Server Error)

I also just noticed this: lingua.domain.com. Can you please explain how your server is set up? Do you use the basic docker installation process described in the readme file and just use this domain, or do you use some more complicated setup?

OddMagnet commented 5 months ago

I'm using Traefik and a domain so I can access all the services from my server locally, without having to type IP and Port. I simply replaced my actual domain name.

I've managed to figure out why the server couldn't communicate with the python container. Selecting/Installing languages now works.

As for the importing of Books, it seems Lingua can't hanle anything that isn't text only. I tried importing the "Japanese from Zero" series, but that only gives me 2 empty pages (for the first one) and gibberish for the next two. I haven't tried importing the last two. I can open and read them just fine on my mac, so I'd guess Lingua has trouble with them because they're not text only.

"Japanese Short Stories for Beginners" - which is pretty much text only - worked just fine for importing.

My initial problem is solved, so this can be closed (assuming my guess about text-only books is correct)

simjanos-dev commented 5 months ago

so I'd guess Lingua has trouble with them because they're not text only

Yes, it can only import the text part.

I'm glad you figured it out, and hope you will enjoy linguacafe! :)

Please feel free to open a new issue if you have further problems, I'll try to help if I can.

anqi970301 commented 5 months ago

I get exactly the same problem, can you share how you figured out "why the server couldn't communicate with the python container"?


Update: no luck after some exploration. I assumed there's platform mismatch - webserver image has platform arm64 while python container has platform amd64. Didn't manage to solve in that way. Maybe you can shed some light by sharing your solution? @OddMagnet

For the developer @simjanos-dev : the python docker log says

qemu: uncaught target signal 4 (Illegal instruction) - core dumped

in case that is useful for your further development.

anqi970301 commented 5 months ago

Thanks for telling me! I have already solved the problem with help from the developers.