-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
JNLPFileFactory runs into NullPointerException when Server answered to GET with "301 Moved Permanently" #226
Comments
Can you post the full log file please. |
Looks like the (manual) proxy settings where wrong and the jnlp file did not download at all.
|
is it working now? |
Well what do you consider fixed? I guess this issue is about improving the error handling in such a case. Something along the lines that the user is informed about the fact that the (re-)download failed due to some proxy error and that the user should check it‘s proxy settings. It would improve the user experience and help the user to fix the problem (instead of confronting him with a call stack and a NullPointerException). |
Yes you are right, this would be the best case. |
I am still experiencing this problem, steps to reproduce:
Problem also is with Step 4 I don't know how to manually fix it. |
no need to open a second ticket as we are maintaining both OWS and ITW together |
Sorry, I already did before I noticed your comment. |
We tried to reproduce the behavior. But if we use a semi correct setting, then we can reproduce it. So basically we did the following:
With semi correct settings I mean a host+port combination which exists but where there is another application (not a proxy) listening. In this case OWS can open a socket to the the semi correct proxy but will fail when starting the actual download. |
Ok thanks for narrowing this down.
2a. configure proxy 2 that would work (unless NPE) 2b. Configure „no proxy“ - which would work (unless NPE) 2c. Configure a proxy exclusion - which would work unless NPE Maybe a/b/c would all produce the same error because 1. is the main cause. Maybe something wrong in the cache that believes the cached file is present but it‘s not. |
Please let us know once you have tested. Thanks |
Who do you mean? As I said I don‘t really have time to test. |
Well we hoped that you have time after vacation ;) |
Looking for a temporary workaround (using 1.2.1 now). A) Deleting "cache by app" for this host does not help, this somehow does not remove the cached JNLP file? Manually looking for that JNLP Cache, does not seem to be under: So it seems to be here, trying to delete that: OK, the following workaround seems to work:
|
How can I re-open this ticket? Again, the steps to reproduce:
|
To efficiently debug this we would need your help. Could you please open the settings UI and make sure that logging to file and debug logging is activated. After this we need you to reproduce the error. Please attach all logs to this thread. Thank you |
2020-11-23_10_04_06.790-ows-stage1.log
Maybe what is also relevent: Hope this helps? |
The log contains the following line:
HTTP Code 301 is |
Thanks for looking this up so fast. I was so overwhelmed by this error popping up again, but this may actually be solvable on our side. We will have to check but I think what we did was:
Then again the question should be:
|
As an addition to the original Issue, maybe this is a "separate" issue on how OWS should react to HTTP 301? |
OWS sends out a HEAD request prior to the GET request. |
Ok, I cannot rename the ticket, it should state Workaround In our Scenario, we had the following setup:
Fix on user side: Possible fix on OWS side: If you don't want to follow up on this ticket, that's ok, but please rename it as stated above to make it more clear.
|
Does your server answer to HEAD requests? |
I tested it, and yes it does.
|
I tried to narrow down the code where the download takes place, and ended up here: Is this the right track? Can't find any HEAD requests. And I can't find code that would follow redirects, either? According to this: |
Pretty close. The code which handles the redirecting is in https://github.com/AdoptOpenJDK/IcedTea-Web/blob/master/core/src/main/java/net/adoptopenjdk/icedteaweb/resources/initializer/BaseResourceInitializer.java To further debug this you could enable debug logging and logging to file in the settings and then attach us a the stage 2 logfile to this issue. |
Here is another log, where it's not he HEAD but there was a SocketTimeoutException.
|
Current hypothesis: |
Yes, this is true. the NPE is kind of unfortunate as it hiding the real reason which is a failing in download. |
Well in this case it was a SocketTimeoutException, so it's a more general question on how BaseResouceInitializer handles problems an how it passes them on (e.g. state=INCOMPLETE), and how the "caller" deals with it. |
The ResourceInitializer has the job to determine if the resource is already in the cache and if it needs a refresh or download. |
Problem persists with 1.5.0. Yet only practical workaround seems to be:
|
Yes this is a bug. We are in the process of fixing it see AdoptOpenJDK/IcedTea-Web#846 |
Great to here that progress is being made on this topic! |
since AdoptOpenJDK/IcedTea-Web#846 is closed maybe this one can be closed too? |
At one time the file was not downloadeble due to proxy misconfiguration.
After correcting the proxy settings, ran into this.
Temporary Internet File Cache (under OWS Settings) shows no files at all.
Code
https://github.com/AdoptOpenJDK/IcedTea-Web/blob/master/core/src/main/java/net/sourceforge/jnlp/JNLPFileFactory.java
apparently, tracker.getCacheFile() yields null.
The text was updated successfully, but these errors were encountered: