Back to LanguageTool Homepage - Privacy - Imprint

Can't use local server


opensuse 42.2
java 1.8.111
FF 50.1.0

no problem with Chrome

with FF
url in the firefox addon : http://localhost:8081/v2

if i click on

i get this

{“software”:{“name”:“LanguageTool”,“version”:“3.5”,“buildDate”:“2016-09-30 09:59”,“apiVersion”:“1”,“status”:""},“language”:{“name”:“English”,“code”:“en”},“matches”:[{“message”:“This sentence does not start with an uppercase letter”,“shortMessage”:"",“replacements”:[{“value”:“My”}],“offset”:0,“length”:2,“context”:{“text”:“my text”,“offset”:0,“length”:2},“rule”:{“id”:“UPPERCASE_SENTENCE_START”,“description”:“Checks that a sentence starts with an uppercase letter”,“issueType”:“typographical”,“category”:{“id”:“CASING”,“name”:“Capitalization”}}}]}

if i select a french text then i click on the LT icon
i get this

Could not check text: Network error (http://localhost:8081/v2/)

i don’t understand it was working well with opensuse 13.1


(Daniel Naber) #2

Does the remote server, i.e. the default setting, work? Do you maybe have a firewall running that blocks the connection?


As i said in the description

so it is at least a FF problem

what is common between opensuse 13.1 and 42.2 ? file to setup LT server
50.1.0 FF
LT addon 1.09
no remote access to LT server only local : http://localhost:8081
server is installed in the pc
only users of the pc accces to the server

what is different between opensuse 13.1 and 42.2 ?
java 1.8.101 for 13.1
java 1.8.111 for 42.2

FF gtk2 for 13.1 ?
FF gtk3 for 42.2 ?

default settings works well

if i fill the url field of FF with


i get this

Error: Missing ‘text’ parameter


i tried FF with a clean profile with no succes


here is what i get when i submit a text via FF and LT addon:

x@linux-9vc6:~/bin/languagetool> java -cp languagetool-server.jar org.languagetool.server.HTTPServer --port 8081
WARNING: running in HTTP mode, consider using org.languagetool.server.HTTPSServer for encrypted connections
Setting up thread pool with 10 threads
Starting LanguageTool 3.5 (build date: 2016-09-30 09:59) server on > h.t.t.p://localhost:8081…
Server started
2016-12-25 09:37:04 Check done: 12 chars, fr (mother tongue: fr)[auto], null, handlers:-1, 0 matches, 587ms, class: V2TextChecker, agent:webextension-firefox, sent

(Aubin Mahé) #6

Hello, I have the same problem here (from France).
I’ve debugged with Firefox 54.0 (64 bits) dev. tools and it appears to be a security error :

Blocage d’une requête multiorigines (Cross-Origin Request) : la politique « Same Origin » ne permet pas de consulter la ressource distante située sur http://localhost:8081/v2/check. Raison : l’en-tête CORS « Access-Control-Allow-Origin » est manquant.

It’s because, even the addresses, are the same in the request and the response, the ports are not and the CORS is missing.

I presume only an update in the server code may help but if anybody may help me to change my configuration, you are welcome.

(Daniel Naber) #7

Please start the server with the --help option, it will show the available options, especially --allow-origin which can be used to enable the CORS header.

(Aubin Mahé) #8

Thanks a lot, it works!

The command line I use to launch the server is java -jar languagetool-server.jar --config lt.cfg --allow-origin "*"

https://localhost:8081/v2 is the url I have configured in Firefox.

About the *, how to use a more restrictive argument?

(Daniel Naber) #9

Just specify an URL instead.