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

MVCRestClient hangs in iOS app #654

Open
cebacci opened this issue Apr 27, 2023 · 0 comments
Open

MVCRestClient hangs in iOS app #654

cebacci opened this issue Apr 27, 2023 · 0 comments

Comments

@cebacci
Copy link

cebacci commented Apr 27, 2023

By using MVCRestClient to connect to a DMVC server, the client hangs indefinitely in certain situations. The same project running in Windows or Android Environment works perfectly.
To exemplify this, I have prepared a simple project that connects to our client's server: a form containing a memo to enter the access token (which I provide separately), an edit to enter the endpoint of the call, a button and another memo for the result.
The code to make the call is as follows:
procedure TForm1.ButtonTestClick(Sender: TObject);
var
MVCRestClient: IMVCRestClient;
lRestResponse: IMVCRestResponse;
begin
MemoResponse.Lines.Clear;
MVCRestClient:=TMVCRestClient.New;
MVCRestClient.BaseURL('https://areapersonale.mutuabcc.it:8091/rest/api');
MVCRestClient.SetBearerAuthorization(MemoToken.Text);
try
MemoResponse.Lines.Add('Before');
lRestResponse:=MVCRestClient.GET('/'+EditEndPoint.Text);
MemoResponse.Lines.Add('After');
except
on E:Exception do begin
MemoResponse.Lines.Add('Exception on Get: '+E.Message);
Exit;
end;
end;
MemoResponse.Lines.Add(lRestResponse.Content);
end;
If the endpoint entered is "GetSezioni," the component crashes, but only on iOS; on Windows it works. An endpoint that works in all environments, however, is "GetNews." The server response is similar in the two cases; we do not understand why the first one in iOS crashes
Test.zip

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