Open-EO / openeo-web-editor

An interactive and easy to use web-based editor for the OpenEO API.
https://editor.openeo.org
Apache License 2.0
12 stars 17 forks source link

Error with basic auth? #169

Closed mmacata closed 3 years ago

mmacata commented 3 years ago

After the merge of Better OpenID Connect integration, incl. refresh token support (#161) I get an error connecting to the GRASS GIS backend, e.g. https://openeo.mundialis.de.

Before (tested locally with git checkout 81c0fb98115555311f1a3c48f3114d7e5f917267: openeoweb_before

Now: openeoweb_after

Error in javascript console says:

TypeError: Cannot read property 'description' of null
    at fn (ConnectForm.vue?d071:3)
    at r (vue.runtime.esm.js:2590)
    at a.Me [as _t] (vue.runtime.esm.js:2686)
    at Tabs.vue?9702:1
    at a.Le [as _l] (vue.runtime.esm.js:2630)
    at a.s (Tabs.vue?9702:1)
    at a.t._render (vue.runtime.esm.js:3548)
    at a.r (vue.runtime.esm.js:4066)
    at nr.get (vue.runtime.esm.js:4479)
    at nr.run (vue.runtime.esm.js:4554) "render"

The openeo-grassgis-backend does not support OIDC Authentication yet.

m-mohr commented 3 years ago

If you don't support OIDC, you should not list it as supported. Your back-end lists it in the capabilities and returns with a success status code on the endpoint. That's invalid behavior. The Web Editor doesn't tolerate this behavior any longer and thus shows an error.

mmacata commented 3 years ago

Allright, I feared something like this. I will remove it there. Thanks for the hint.

mmacata commented 3 years ago

Sorry to reopen again - I removed the OIDC part from the capabilities so that they do not appear in the response anymore:

         },
-        {
-            "path": "/credentials/oidc",
-            "methods": [
-                "GET"
-            ]
-        },
         {
             "path": "/credentials/basic",

And also disabled the endpoint totally. The fatal error (same javascript error) still appears. Requests to the openeo-grassgis-driver are:

Do you have any more hints?

m-mohr commented 3 years ago

I can connect to openeo.mundialis.de with the master version right now. There's no error for me. We had a similar issue yesterday with EURAC, but the issue was some kind of dependency issue with npm. Could you try deleting node_modules + package_lock.json and run npm install etc. again to check whether it still errors with freshly loaded dependencies?

mmacata commented 3 years ago

Now I get CORS errors? I rebuilt the docker image without cache and also tried it out locally without docker but no success. Which npm + node version are you using?

m-mohr commented 3 years ago

Hmm, that sounds like a connectivity issue or so. We could try to do a video call to debug, I can't reproduce it right now.

npm 7.10.0 node 14.3.0

mmacata commented 3 years ago

🤦 I had http instead of https in my drop-down server suggestion list... That explains the CORS error. The other error really seemed to disappear after clearing the cache. Now it works for master branch both ways: locally and with docker.

Thank you for your help!