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

Unable to run jnlp files for Intel MFSys25 KVM (Could not read or parse the JNLP File) #469

Closed
conathan opened this issue Oct 17, 2019 · 11 comments · Fixed by #731
Closed
Assignees
Labels
question Further information is requested
Milestone

Comments

@conathan
Copy link

When using javaws (icedtea-netx-1.8-0ubuntu8, on Xubuntu 19.10) to run a jnlp file generated by a Intel MFSys25 V1 (latest eol firmware), It fails due to 'Could not read or parse the JNLP File'.

I believe due to the following line at the end of the .jnlp file

(Specifically deleting that line allows it to work. This works out of the box in Oracle's Java version 8 JNLP file is attacked with some information masked/removed. Stacktrace: net.sourceforge.jnlp.LaunchException: Fatal: Read Error: Could not read or parse the JNLP file. You can try to download this file manually and send it as bug report to IcedTea-Web team. at net.sourceforge.jnlp.Launcher.fromUrl(Launcher.java:489) at net.sourceforge.jnlp.Launcher.launch(Launcher.java:289) at net.sourceforge.jnlp.runtime.JnlpBoot.run(JnlpBoot.java:67) at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:270) at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:63) at java.base/java.security.AccessController.doPrivileged(Native Method) at net.sourceforge.jnlp.runtime.Boot.main(Boot.java:210) Caused by: net.sourceforge.jnlp.ParseException: Invalid XML document syntax. at net.sourceforge.jnlp.XMLParser.getRootNode(XmlParser.java:118) at net.sourceforge.jnlp.MalformedXMLParser.getRootNode(MalformedXMLParser.java:79) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at net.sourceforge.jnlp.Parser.getRootNode(Parser.java:1380) at net.sourceforge.jnlp.JNLPFile.parse(JNLPFile.java:866) at net.sourceforge.jnlp.JNLPFile.(JNLPFile.java:233) at net.sourceforge.jnlp.JNLPFile.(JNLPFile.java:215) at net.sourceforge.jnlp.JNLPFile.(JNLPFile.java:200) at net.sourceforge.jnlp.JNLPFile.(JNLPFile.java:186) at net.sourceforge.jnlp.Launcher.fromUrl(Launcher.java:453) ... 6 more Caused by: net.sourceforge.nanoxml.XMLParseException: XML Parse Exception during parsing of a jnlp element at line 80: Expected: = at net.sourceforge.nanoxml.XMLElement.expectedInput(XMLElement.java:1184) at net.sourceforge.nanoxml.XMLElement.scanElement(XMLElement.java:962) at net.sourceforge.nanoxml.XMLElement.scanElement(XMLElement.java:1018) at net.sourceforge.nanoxml.XMLElement.parseFromReader(XMLElement.java:514) at net.sourceforge.nanoxml.XMLElement.parseFromReader(XMLElement.java:466) at net.sourceforge.jnlp.XMLParser.getRootNode(XmlParser.java:114) ... 18 more netx: Read Error: Could not read or parse the JNLP file. (Invalid XML document syntax. (XML Parse Exception during parsing of a jnlp element at line 80: Expected: =)) line: 83 line: 82 line: 81 line: 80

line: 79
line: 78
line: 77 1
line: 76 -keyboardtype
line: 75 2
line: 74 -mousemode
line: 73 4
line: 72 -accelthreshold
line: 71 2
line: 70 -mouseaccel
line: 69 6371
line: 68 -fdport
line: 67 6341
line: 66 -cdport
line: 65 0
line: 64 -sslvm
line: 63 0
line: 62 -sslkvm
line: 61 31313732303136303331303034303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930
line: 60 -ticket
line: 59 6241
line: 58 -vport
line: 57 intelunit2.vc.bravenet.com
line: 56 -hostname
line: 55 Remote KVM - Server 1
line: 54 -fullscreentitle
line: 53 Remote KVM Session to Server 1
line: 52 -title
line: 51
line: 50
line: 49
line: 48
line: 47
line: 46
line: 45
line: 44
line: 43
line: 42
line: 41
line: 40
line: 39
line: 38
line: 37
line: 36
line: 35
line: 34
line: 33
line: 32
line: 31
line: 30
line: 29
line: 28
line: 27
line: 26
line: 25
line: 24
line: 23
line: 22
line: 21
line: 20
line: 19
line: 18
line: 17
line: 16
line: 15
line: 14 JViewer Networked KVM Application
line: 13 JViewer Networked KVM Application
line: 12
line: 11 the remote computer to give him complete control over the remote machine.
line: 10 It also enables the user to redirect his local keyboard, mouse, CD-ROM and floppy drives to
line: 9 JViewer enables a user to view the video display of managed server via KVM.
line: 8
line: 7
line: 6 Intel Corporation
line: 5 <title>Networked KVM applet for Intel(R) Modular Server</title>
line: 4
line: 3
line: 2

Using MalformedXMLParser
JNLP file location: KvmViewer_3.30a-1.jnlp
Proceeding with jnlp
Read 577 entries from Firefox's preferences
Found preferences file: /home/ncoulson/.mozilla/firefox/scymb86a.default/prefs.js
Using firefox's profiles file: /home/ncoulson/.mozilla/firefox/profiles.ini
Starting security dialog thread
Forcing of offline set to: false
WARNING: key deployment.system.cachedir has no value, setting to default value
Loading User level properties from: file:/home/ncoulson/.config/icedtea-web/deployment.properties
Ico provider registered correctly.
KvmViewer_3.30a-1.jnlp.txt

cache: /home/ncoulson/.cache/icedtea-web file exists:true
config: /home/ncoulson/.config/icedtea-web file exists: true
System is already following XDG .cache and .config specifications

@karianna karianna added this to the 1.8.x milestone Oct 23, 2019
@karianna karianna added the question Further information is requested label Oct 23, 2019
@hendrikebbers
Copy link
Member

Can you please add a JNLP file.

@sclassen
Copy link
Contributor

sclassen commented Nov 11, 2019

@hendrikebbers
The JNLP is linked in at the end of the issue description.
It looks like the lines in question are the following:

   <argument>1</argument>
  </application-desc>
</jnlp>
<?-- JViewerVersion 3.30a -->

@conathan
Copy link
Author

conathan commented Nov 14, 2019

I have the entire jnlp file attached to this ticket named KvmViewer_3.30a-1.jnlp.txt (It didn't allow me to upload a file with a .jnlp extension), but aye exactly as sclassen says.

A xml comment is <!-- text -->, while not sure if <?-- text --> is anything at all. (I am probably not a valid source of all things xml, but suspect Intel used a ? instead of ! when making their jnlp file)

To get javaws to load it, I just have to delete the line: <?-- JViewerVersion 3.30a -->

@conathan
Copy link
Author

Is there anything further I need to provide for this? It is currently flagged as needing further information

@sclassen
Copy link
Contributor

No, but we currently have no resources to solve this issue.
The jnlp you have is not valid xml. Thus it is not valid according to the JSR-56.

If you are able to provide a pull request, we are more than happy to review and merge your contribution.

@conathan
Copy link
Author

Looking through the code, it looks like you use MalformedXMLParser for similar cases, sounds like it uses a library called tagsoup that can deal with some invalid xml issues.

Don't know at this time if tagsoup can deal with < ? - - ... - - > yet,

Timewise not sure when, but I'll see if I can get a environment together that can compile and test the below

@sclassen
Copy link
Contributor

I guess stripping <?-- ... --> from the input stream would be the way to go.
Look at the class XMLSanitizer it already removes comments...

@Jamila891
Copy link

@conathan do you still plan to do a pull request? If not, we're going to close this issue.

@Jamila891 Jamila891 reopened this Sep 21, 2020
@conathan
Copy link
Author

I have not had a chance to work on this, but still wanting to see if I can make a patch and a pull request for this.

@hendrikebbers
Copy link
Member

@conathan cool :) If you need help or have questions just ping us.

@conathan
Copy link
Author

This is completely untested, (Specifically need some work on my Linux from Scratch development machine to get this to compile), but I believe this should strip out comments in the pattern of:

 < ? - -

icedtea-web-1.8-allow_questionmark_comment.patch.txt

Thank you.

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

Successfully merging a pull request may close this issue.

5 participants