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

WebSearch behind a proxy not working on Windows 10 21H2. #10097

Open
2 tasks done
bhatiaa1 opened this issue Jul 19, 2023 · 14 comments
Open
2 tasks done

WebSearch behind a proxy not working on Windows 10 21H2. #10097

bhatiaa1 opened this issue Jul 19, 2023 · 14 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs fetcher needs-reproducer

Comments

@bhatiaa1
Copy link

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

Windows 10 21H2

Checked with the latest development build

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

WebSearch on JabRef 5.4 works fine within the same corporate firewalled network environment and on the same Windows 10 computer.

  1. Install JabRef 5.10 within a corporate firewall environment on Windows 10 computer, post install details as follows.
    JabRef 5.10--2023-07-18--34ac6d1
    Windows 10 10.0 amd64
    Java 21-internal
    JavaFX 20+19

  2. Import SSL certificate within Preferences->Network

  3. Verify internet connectivity using the button in Preferences->Network. Confirmed that it works.

  4. Go to Jabref WebSearch, choose ACM for searching. Search for keyword "computer".

Error message pops up in a window
"Unhandled Exception occurred"
"A network error happened while fetching from https://dl.acm.org/action/doSearch?AllField=computer"

Detailed trace as below -
org.jabref.logic.importer.FetcherException: A network error occurred while fetching from https://dl.acm.org/action/doSearch?AllField=computer
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.getBibEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$2(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source)
at org.jabref.merged.module@5.10.1120/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out: no further information
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Unknown Source)
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(Unknown Source)
at java.base/sun.nio.ch.NioSocketImpl.connect(Unknown Source)
at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
at java.base/java.net.Socket.connect(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at java.base/sun.net.NetworkClient.doConnect(Unknown Source)
at java.base/sun.net.www.http.HttpClient.openServer(Unknown Source)
at java.base/sun.net.www.http.HttpClient.openServer(Unknown Source)
at java.base/sun.net.www.protocol.https.HttpsClient.(Unknown Source)
at java.base/sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.base/java.net.HttpURLConnection.getResponseCode(Unknown Source)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.net.URLDownload.openConnection(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.net.URLDownload.asInputStream(Unknown Source)
... 13 more

Appendix

...

Log File
Paste an excerpt of your log file here
@bhatiaa1 bhatiaa1 changed the title WebSearch not working WebSearch not working on Windows 10 21H2 within a firewalled corporate network setup. Jul 19, 2023
@bhatiaa1 bhatiaa1 changed the title WebSearch not working on Windows 10 21H2 within a firewalled corporate network setup. WebSearch not working on Windows 10 21H2. Jul 19, 2023
@Siedlerchr
Copy link
Member

Siedlerchr commented Jul 19, 2023

Did you restart JabRef after adding the SSL certs? MIght be that the certifacte config is evaluated at startup
The error indicates a general timeout. Do other fetchers work?

@bhatiaa1
Copy link
Author

bhatiaa1 commented Jul 19, 2023

Yes, I restarted as Jabref recommends after importing the certificate. In fact, the network connectivity test passed both without and with the SSL certificate on the Preferences->Network page. With the SSL certificate though, it takes several noticeable seconds to report back success.

The WebSearch fucntionality doesn't work in either case.

The behavior is same with ArXiv fetcher as well.

@bhatiaa1
Copy link
Author

We also use custom proxies sometimes for applications that cannot pick up the default Windows settings, I tried with those as well. Now, when I try to search for "computers" on ACM portal, I see the following error message

com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 26 path $
at com.google.gson@2.10/com.google.gson.JsonParser.parseReader(Unknown Source)
at com.google.gson@2.10/com.google.gson.JsonParser.parseString(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.ACMPortalParser.getBibEntriesFromDoiList(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.ACMPortalParser.parseEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.getBibEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$2(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source)
at org.jabref.merged.module@5.10.1120/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 26 path $
at com.google.gson@2.10/com.google.gson.stream.JsonReader.syntaxError(Unknown Source)
at com.google.gson@2.10/com.google.gson.stream.JsonReader.checkLenient(Unknown Source)
at com.google.gson@2.10/com.google.gson.stream.JsonReader.doPeek(Unknown Source)
at com.google.gson@2.10/com.google.gson.stream.JsonReader.peek(Unknown Source)
... 17 more

@Siedlerchr
Copy link
Member

That seems like there is something else coming back, mabye html or whatever, but not json...

@bhatiaa1
Copy link
Author

ok: searching for "computer", results across portals as follows -

ArXiv portal WebSearch works with custom proxies and SSL certificate import.
ACM portal: error as above.
DBLP: no entries corresponding to the search.
DOAJ: invalid JSON.
DOAB: Internal parser error occurred while fetching from...
Crossref: Internal parser error occurred while fetching from...
Collection of Computer Science bibliographies: no entries corresponding to the search.
CiteSeerX: no entries corresponding to the search.
Biodiversity heritage: Internal parser error occurred while fetching from...
Biblio.... Bayern (experimental): Internal parser error occurred while fetching from...

@Siedlerchr
Copy link
Member

Do you see anything in the log (despite the exception), something about SSL verification or similar?

I am just looking at the code, trying to figure out where the certs are used. @HoussemNasri If I recall correctly, you worked on this some time ago, do you remember where this setting of the certs happens?

@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label Jul 19, 2023
@HoussemNasri
Copy link
Member

For context: the original feature was added at #8583, and a follow-up fix was added at #8631.

private static void configureSSL(SSLPreferences sslPreferences) {

@bhatiaa1
Copy link
Author

Do you see anything in the log (despite the exception), something about SSL verification or similar?

I am just looking at the code, trying to figure out where the certs are used. @HoussemNasri If I recall correctly, you worked on this some time ago, do you remember where this setting of the certs happens?

For ACM Portal, searching for "computer", the event log shows -

Error importing
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 26 path $
at com.google.gson@2.10/com.google.gson.JsonParser.parseReader(Unknown Source)
at com.google.gson@2.10/com.google.gson.JsonParser.parseString(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.ACMPortalParser.getBibEntriesFromDoiList(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.ACMPortalParser.parseEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.getBibEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$2(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source)
at org.jabref.merged.module@5.10.1120/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 26 path $
at com.google.gson@2.10/com.google.gson.stream.JsonReader.syntaxError(Unknown Source)
at com.google.gson@2.10/com.google.gson.stream.JsonReader.checkLenient(Unknown Source)
at com.google.gson@2.10/com.google.gson.stream.JsonReader.doPeek(Unknown Source)
at com.google.gson@2.10/com.google.gson.stream.JsonReader.peek(Unknown Source)
... 17 more

Import canceled

For DOAJ, event log reads -

Error importing
kong.unirest.json.JSONException: Invalid JSON
at org.jabref.merged.module@5.10.1120/kong.unirest.json.JSONElement.fromJson(Unknown Source)
at org.jabref.merged.module@5.10.1120/kong.unirest.json.JSONObject.(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fetcher.DOAJFetcher.lambda$getParser$0(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.getBibEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$2(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source)
at org.jabref.merged.module@5.10.1120/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Import canceled

For Crossref, event log reads -

Import canceled
Could not parse entry
java.io.IOException: Error in line 1: Expected { or ( but received s
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.consume(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseEntry(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseAndAddEntry(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseFileContent(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parse(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.getBibEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$2(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source)
at org.jabref.merged.module@5.10.1120/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Could not parse entry
java.io.IOException: Error in line 1: Expected { or ( but received s
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.consume(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseEntry(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseAndAddEntry(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseFileContent(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parse(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.getBibEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$2(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source)
at org.jabref.merged.module@5.10.1120/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Could not parse entry
java.io.IOException: Error in line 1: Expected { or ( but received o
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.consume(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseEntry(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseAndAddEntry(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseFileContent(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parse(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.getBibEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$2(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source)
at org.jabref.merged.module@5.10.1120/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Could not parse entry
java.io.IOException: Error in line 1: Expected { or ( but received o
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.consume(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseEntry(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseAndAddEntry(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseFileContent(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parse(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fileformat.BibtexParser.parseEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.getBibEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$2(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source)
at org.jabref.merged.module@5.10.1120/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Import canceled
Error importing
org.jabref.logic.importer.FetcherException: An internal parser error occurred while fetching from https://api.crossref.org/works?query=computer
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.getBibEntries(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedParserFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.SearchBasedFetcher.performSearch(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$2(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source)
at org.jabref@5.10.1120/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source)
at org.jabref.merged.module@5.10.1120/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.jabref.logic.importer.ParseException: kong.unirest.json.JSONException: Invalid JSON
at org.jabref@5.10.1120/org.jabref.logic.importer.util.JsonReader.toJsonObject(Unknown Source)
at org.jabref@5.10.1120/org.jabref.logic.importer.fetcher.CrossRef.lambda$getParser$3(Unknown Source)
... 13 more
Caused by: kong.unirest.json.JSONException: Invalid JSON
at org.jabref.merged.module@5.10.1120/kong.unirest.json.JSONElement.fromJson(Unknown Source)
at org.jabref.merged.module@5.10.1120/kong.unirest.json.JSONObject.(Unknown Source)
... 15 more

Import canceled

@Siedlerchr
Copy link
Member

Can you try this version? https://builds.jabref.org/pull/10099/merge
I tried to fix this issue with the certificate handling by merging the jdk certs with the custom ones

@Siedlerchr
Copy link
Member

@bhatiaa1 Any chance already testing the version I linked? That would be highly appreciated

@bhatiaa1
Copy link
Author

Hi @Siedlerchr, I tried the fixed version in portable mode (doing an admin level install will take significantly longer). Portable mode requires me to use "troubleshoot compatibility" mode in Windows (as before). ArXiv WebSearch continues to work fine with my corporate custom proxies and SSL certificate, ACM search on "computer" fails again with the following message -

Error importing
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 26 path $
at com.google.gson@2.10/com.google.gson.JsonParser.parseReader(Unknown Source)
at com.google.gson@2.10/com.google.gson.JsonParser.parseString(Unknown Source)
at org.jabref@5.10.31123/org.jabref.logic.importer.fileformat.ACMPortalParser.getBibEntriesFromDoiList(Unknown Source)
at org.jabref@5.10.31123/org.jabref.logic.importer.fileformat.ACMPortalParser.parseEntries(Unknown Source)
at org.jabref@5.10.31123/org.jabref.logic.importer.SearchBasedParserFetcher.getBibEntries(Unknown Source)
at org.jabref@5.10.31123/org.jabref.logic.importer.SearchBasedParserFetcher.performSearch(Unknown Source)
at org.jabref@5.10.31123/org.jabref.logic.importer.SearchBasedFetcher.performSearch(Unknown Source)
at org.jabref@5.10.31123/org.jabref.gui.importer.fetcher.WebSearchPaneViewModel.lambda$search$2(Unknown Source)
at org.jabref@5.10.31123/org.jabref.gui.util.BackgroundTask$1.call(Unknown Source)
at org.jabref@5.10.31123/org.jabref.gui.util.DefaultTaskExecutor$1.call(Unknown Source)
at org.jabref.merged.module@5.10.31123/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 26 path $
at com.google.gson@2.10/com.google.gson.stream.JsonReader.syntaxError(Unknown Source)
at com.google.gson@2.10/com.google.gson.stream.JsonReader.checkLenient(Unknown Source)
at com.google.gson@2.10/com.google.gson.stream.JsonReader.doPeek(Unknown Source)
at com.google.gson@2.10/com.google.gson.stream.JsonReader.peek(Unknown Source)
... 17 more

Import canceled

@HoussemNasri
Copy link
Member

HoussemNasri commented Aug 1, 2023

Hi @bhatiaa1

Thanks for providing all the info.

First, we need to make sure that the issue originates from JabRef, not the proxy. So can you open this Url in your browser and see if it returns a valid JSON?

Also, how did you configure the proxy? was it on the OS level or in JabRef (by enabling the custom proxy preference) or both?

It's interesting that all errors are triggered by an invalid JSON response, for example, the ACM Portal fetcher will first look up the DOI of the entry by scarping the HTML of the ACM website then it will perform another request with the DOI to get the JSON. This means that the first request was a success.

@bhatiaa1
Copy link
Author

bhatiaa1 commented Aug 3, 2023

Hi @HoussemNasri - confirming that pasting the url from above post into the browser returns a long page with lot of content in it (I assume it is JSON). Pasting first few and last few lines from the response below.

For the custom proxy, I am manually adding the proxy inside the JabRef and similarly, I am importing the SSL certificate as well within JabRef Preferences.

{"exportedDoiLength":20,"fileName":"acm","style":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<style xmlns=\"http://purl.org/net/xbiblio/csl\" class=\"in-text\" version=\"1.0\" demote-non-dropping-particle=\"sort-only\" default-locale=\"en-US\">\n    <!-- This style was edited with the Visual CSL Editor (http://editor.citationstyles.org/visualEditor/) -->\n 
MORE CONTENT......

In summary, the freshmen engineering students had a positive experience in gamified Physics instruction.","call-number":"10.1145/3377571.3377623","collection-title":"IC4E '20","container-title":"Proceedings of the 2020 11th International Conference on E-Education, E-Business, E-Management, and E-Learning","DOI":"10.1145/3377571.3377623","event-place":"Osaka, Japan","ISBN":"9781450372947","keyword":"Motivation, Gamification, Physics, Pedagogy, Strategy","number-of-pages":"7","page":"268–274","publisher":"Association for Computing Machinery","publisher-place":"New York, NY, USA","title":"Increasing Student Motivation in College Physics with Gamified Instruction","URL":"https://doi.org/10.1145/3377571.3377623"}}]}

@koppor koppor added the fetcher label Oct 18, 2023
@koppor
Copy link
Member

koppor commented Oct 18, 2023

To reproduce this, it gets hard. I assume:

  • Configure firewall to block all outgoing http requests
  • Install a proxy
  • Export SSL certificate from proxy and import into JabRef
  • Try

Does anyone have recommendations for such a setup? Maybe with autosetup using Vagrant, teraform or similar tools?

@koppor koppor changed the title WebSearch not working on Windows 10 21H2. WebSearch behind a proxy not working on Windows 10 21H2. Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs fetcher needs-reproducer
Projects
None yet
Development

No branches or pull requests

4 participants