Ressource doesn't working after update to 3.52.1

Hello again,

our ressource to the api from SAP Business One doesnt work anymore. Retool throw a "Internal server error"
image

When i try it with same credentials via Postman or else, it works.
Any ideas whats changed since 3.33.31?

Thanks!

Greetings
Hendrik

Hi,

Could someone please help me with troubleshooting? Unfortunately, I cannot use the new version until I have found the problem.

I have now installed 3.52.2 but unfortunately it still doesn't work.

In the log of the interface you can see the correct answer to the request. But it seems that Retool cannot process this response.

The Log-Entry from API-Interface:

[Thu Jun 20 10:20:02 2024] [192.168.120.48] [pid=4376] [Response] "POST /b1s/v1/Login HTTP/1.1"
Status Code:[200 OK]
Date:Thu, 20 Jun 2024 08:20:02 GMT
Server:Apache
Content-Type:application/json;odata=minimalmetadata;charset=utf-8
Set-Cookie:******************************************************************

{
	"odata.metadata" : "https://[My-Server]:[My-Port]/b1s/v1/$metadata#B1Sessions/@Element",
	"SessionId" : "e41c0d40-2edd-11ef-c000-005056bcd75b-6804-6212",
	"Version" : "1000220",
	"SessionTimeout" : 30
}

Retool:
image

image

In Version 3.33.31 it works fine:

Thanks!

Hi @Hendrik Can you send me a screenshot of the resource set up as well? Are all endpoints resulting in internal server errors?

I checked internally and see that we have a bug that was introduced between 3.331 and 3.52 where cookie based auth is not working as expected and resulting in internal server errors :thinking: I can update this post when I hear about a fix

Hi @Tess ,

thanks for helping! :grin:

This is the Ressource in 3.33.31:

This is the Ressource in 3.52.2:

And this is the Query in 3.33.31

And this is the Query in 3.52.2:

Please do not be confused by the different URLs. These only result from the different environments (productive/staging). The Problem occurs on each of them.

Thanks!

Greetings
Hendrik

Hi @Tess ,

are the screenshots useful?
Is there a time frame when the error will be fixed?
We can't use the actual stable version till this bug is fixed.

Thank you!

Greetings
Hendrik

Hi @Hendrik,

Looking at your setup and chatting with my team, I think this issue is different than the bug I had mentioned previously :thinking: :disappointed:

It would be helpful to see all of the container logs from when you attempt to run the query on 3.52

Hi @Tess ,

find the Log in the attachement :slight_smile:

Retool Api Container Log.json (26.4 KB)

Thanks for help! :slight_smile:

Greetings
Hendrik

Thanks! I see the error in Retool is "TypeError: option expires is invalid"

It looks like this happens when the "Expires" attribute on the set cookie header is not a valid date object or expires.valueOf() is not a valid number :thinking: Do you see an "Expires" attribute? If you run this query in Postman, what does it show in the Cookies section?

It seems there is no expire:

Hi @Tess

do you have some suggestions?

Thanks!

Greetings
Hendrik

Hey @Hendrik - Just reproduced this error, seems like it specifically affects APIs that set session cookies by not setting an Expires value in the Set-Cookie header. Looking like it started on 3.42, I'm following up with the development team on fixing this.

The fix for the internal server error on rest and graphql queries that set session cookies is included in the 3.52.11-stable image we just pushed to DockerHub!

1 Like

Hi @jmann,

thank you! That was it. It works now :smiley:

1 Like