Open-EO / openeo-wcps-driver

A prototype implementation for WC(P)S backends
Apache License 2.0
4 stars 0 forks source link

get rid of xml error upon user registration #41

Open przell opened 4 years ago

przell commented 4 years ago

However, i ran the following code:

eurac = connect(host = euracHost)

p = processes()

udfName = "BFAST_udf.R"
udfCode = readChar(udfName, file.info(udfName)$size)

s2 = p$load_collection(id = p$data$openEO_S2_32632_10m_L2A, 
                       spatial_extent = list(west = 11.2792, 
                                             south = 46.4643, 
                                             east = 11.4072, 
                                             north = 46.5182), 
                       temporal_extent = c("2018-06-04T00:00:00Z","2018-06-23T00:00:00Z"))

udf = p$run_udf(data = s2, udf = udfCode, runtime = "R")

result = p$save_result(udf, format="GTiff")

debug()
compute_result(graph=result, format="GTiff", output_file = 'results_test2.tiff')

And I get the following:

*** Response ***
Status: 401
Headers:

date                                           Tue, 31 Mar 2020 16:00:06 GMT
server                                                     Apache-Coyote/1.1
access-control-allow-origin                                   37.201.170.203
access-control-allow-methods          OPTIONS, GET, POST, DELETE, PUT, PATCH
access-control-allow-headers     origin, content-type, accept, authorization
access-control-allow-credentials                                        true
access-control-expose-headers      Location, OpenEO-Identifier, OpenEO-Costs
www-authenticate                       Authorization header must be provided
content-type                                         text/html;charset=utf-8
content-language                                                          en
content-length                                                           975

Body:
[1] "Other formats not yet implemented."
SERVER-ERROR: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Apache Tomcat/7.0.76 - Error report</title>
<style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
</head>
<body>
<h1>HTTP Status 401 - Unauthorized</h1>
<hr size="1" noshade>
<p><b>type</b> Status report</p>
<p><b>message</b> <u>Unauthorized</u></p>
<p><b>description</b> <u>This request requires HTTP authentication.</u></p>
<hr size="1" noshade>
<h3>Apache Tomcat/7.0.76</h3>
</body>
</html>

First, the error message is in XML. Usually all server messages should be JSON. This is the responsibility of EURAC. The message says that you need a login for this, however the credentials provided are invalid (the same for as the ones in our internal document). @przell can you help here?

Apart from that your code failed, because I could not handle the quote statement. There is no translation from the quote object into JSON (usually list like structures). The run_udf parameter udf requires a text or an URL.

Originally posted by @flahn in https://github.com/Open-EO/openeo-usecases/issues/1#issuecomment-606724952

przell commented 4 years ago

First, the error message is in XML. Usually all server messages should be JSON. This is the responsibility of EURAC. The message says that you need a login for this, however the credentials provided are invalid (the same for as the ones in our internal document). @przell can you help here?

@aljacob We have talked about the error message that is returned in xml. I think you know what to do. I have provided correct login in the dedicated google docs.