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

File browser encounters "root ERROR Error when loading drives." #13232

Closed
bfitzpat opened this issue Apr 24, 2019 · 2 comments
Closed

File browser encounters "root ERROR Error when loading drives." #13232

bfitzpat opened this issue Apr 24, 2019 · 2 comments

Comments

@bfitzpat
Copy link

bfitzpat commented Apr 24, 2019

Description

We are attempting to add a new plugin to the Che extension registry (see https://github.com/eclipse/che-plugin-registry/issues/120) and ran into a strange error with our extension. We use a file dialog -- vscode.window.showOpenDialog (see https://github.com/camel-tooling/vscode-wsdl2rest/blob/5851297b8459d1ace95a22a6657b3a7b67e12736/src/extension.ts#L105) to retrieve the path to a local wsdl file in the workspace. When the dialog comes up, we see this in the console:

root ERROR Error when loading drives. PKK+/p</e.prototype.get/<@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1625725
Ht+z/b</t.prototype.drives/</<@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1320304
s/</<@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1318826
s/<@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1318144
Ht+z/a</<@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1317846
Ht+z/a<@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1317623
Ht+z/b</t.prototype.drives@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1320185
daay/s</t.prototype.doLoadDrives@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:2453010
t@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:2452086
FWg+/y</n.prototype.createLocationListRenderer@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1198679
n@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1198278
t@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1200756
htTD/t.resolveInstance/a<@https://static.developers.redhat.com/che/theia_artifacts/vendors.c110bfbb4aa2cd71c473.js:79:11023
htTD/t.resolveInstance@https://static.developers.redhat.com/che/theia_artifacts/vendors.c110bfbb4aa2cd71c473.js:79:11002
c/<@https://static.developers.redhat.com/che/theia_artifacts/vendors.c110bfbb4aa2cd71c473.js:1:4823
+AHF/t.resolve@https://static.developers.redhat.com/che/theia_artifacts/vendors.c110bfbb4aa2cd71c473.js:1:5054
DKDb/_</e.prototype._planAndResolve/<@https://static.developers.redhat.com/che/theia_artifacts/vendors.c110bfbb4aa2cd71c473.js:1:605677
DKDb/_</e.prototype._get@https://static.developers.redhat.com/che/theia_artifacts/vendors.c110bfbb4aa2cd71c473.js:1:605423
DKDb/_</e.prototype.get@https://static.developers.redhat.com/che/theia_artifacts/vendors.c110bfbb4aa2cd71c473.js:1:604132
PMar/t.default</</<@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1630912
VZ+H/p</e.prototype.$showOpenDialog/</<@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1972726
s/</<@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1970970
s/<@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1970288
a@https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1:1969821
theia.1d311f546664ae04b5d2.js:1:3990911
    log https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1
    get https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1
    getLog https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1
    log https://static.developers.redhat.com/che/theia_artifacts/theia.1d311f546664ae04b5d2.js:1

Note: This works fine in a standalone version of the latest Theia, but not in Che7 at present.

Reproduction Steps

I am using a branch to test the new plugin entry. I add to the attributes:

  "attributes": {
    "plugins": "che-machine-exec-plugin:0.0.1,https://raw.githubusercontent.com/bfitzpat/che-plugin-registry/120-AddVSCodeWSDL2RestVSCodeExtension/plugins/camel-tooling.vscode-wsdl2rest:0.0.7",

Then, in the che.openshift.io instance, I am invoking the wsdl2rest activity with a local wsdl in the workspace (F1, type "wsdl2rest" and use the local file option).

image

The file dialog appears, but clicking the Open WSDL File button does nothing. You have to cancel out by hitting the x in the upper right.

image

Looking in the Chrome debug console, I see the ERROR while loading drives problem.

If we cancel out of the file dialog, we can continue with the extension and work all the way through to the point where we invoke the wsdl2rest utility under the covers. We see this as the output... It makes sense, because the value of the file url is coming back as undefined from the file browse dialog.

Executing Wsdl2Rest...
Retrieving document at 'file:/home/theia/undefined'.
 
Error executing command
javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at 'file:/home/theia/undefined'.: java.io.FileNotFoundException: This file was not found: file:/home/theia/undefined
	at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2291)
	at org.jboss.fuse.wsdl2rest.impl.WSDLProcessorImpl.process(WSDLProcessorImpl.java:98)
	at org.jboss.fuse.wsdl2rest.impl.Wsdl2Rest.process(Wsdl2Rest.java:79)
	at org.jboss.fuse.wsdl2rest.impl.Main.mainInternal(Main.java:60)
	at org.jboss.fuse.wsdl2rest.impl.Main.main(Main.java:36)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.io.FileNotFoundException: This file was not found: file:/home/theia/undefined
	at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(StringUtils.java:173)
	at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2270)
	... 12 more
 
Process finished. Return code 1.

OS and version:

Chrome browser on Windows, accessing Che instance on che.openshift.io

Diagnostics:

@bfitzpat
Copy link
Author

bfitzpat commented May 2, 2019

Shifted Che plugin PR here - eclipse-che/che-plugin-registry#136

@bfitzpat
Copy link
Author

bfitzpat commented Jul 2, 2019

Testing today with the v3 version and the latest theia used on che.openshift.io, this is no longer an issue. I'm going to go ahead and close it

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

No branches or pull requests

1 participant