Page MenuHomeFeedback Tracker

RestContext::GET_now returning "Pending to Process"
Closed, ResolvedPublic

Description

The non-callback variants of the rest context function API return Pending to Process as string result instead of the actual result. e.g. RestContext::GET_now
The callback-based variants seem to work, but it would be very useful if we are able to wait for the result in script. For example for saving a bit of information on controlled server shutdown, the server is blocked from terminating the process before all the HTTP calls went to the webserver.

s. reproduction steps below

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce
auto ctx = GetGame().GetRestApi().GetContext("https://webhook.site/8e4c0427-a4e2-48dd-b142-c8b50ed5633b/");
auto content = ctx.GET_now("/helloworld");
Print(content);

Event Timeline

Arkensor created this task.Jul 2 2022, 10:02 PM
Geez changed the task status from New to Assigned.Jul 11 2022, 11:30 PM
Geez changed the task status from Assigned to Confirmed Internally.Oct 21 2022, 3:11 PM
Arkensor updated the task description. (Show Details)May 29 2023, 2:32 PM

Any update on this? It has been nearly a year and still nothing?

Geez closed this task as Resolved.Jun 6 2023, 4:57 PM
Geez claimed this task.
Geez added a subscriber: Geez.

As has been accidentally posted in: https://feedback.bistudio.com/T173037

This info comes from the responsible developer:

  • it's actually status messsage because data are not present

however it does not make sense anyway - so status will be not returned in such case (to not be considered as data by anyone), but empty string instead

  • Also if possible, please attach logs and data in the future tickets as it makes harder for the devs to assume what you are trying to describe

Arkensor added a comment.EditedJun 6 2023, 5:10 PM

I don't understand why this ticket was resolved. Confusion aside, this is not what I asked for. To make it very clear, the issue is NOT resolved.

This code SHOULD RETURN string content ="hello from webapi" because that is what I configured the webhook test site to respond. However you get Pending to Process

auto ctx = GetGame().GetRestApi().GetContext("https://webhook.site/aef9bf8d-559a-4979-96b1-b444204e31f3/");
auto content = ctx.GET_now("helloworld");
Print(content);

UPDATE: The web api shows that the request arrives but the response from the api still is not the string result returned in script

Geez added a comment.EditedJun 7 2023, 1:46 PM

I don't understand why this ticket was resolved. Confusion aside, this is not what I asked for. To make it very clear, the issue is NOT resolved.

This code SHOULD RETURN string content ="hello from webapi" because that is what I configured the webhook test site to respond. However you get Pending to Process

auto ctx = GetGame().GetRestApi().GetContext("https://webhook.site/aef9bf8d-559a-4979-96b1-b444204e31f3/");
auto content = ctx.GET_now("helloworld");
Print(content);

Further message from the dev team:

You are requesting several updates to Api at once - this is part of changes which will make it's way to Stable in future. Repeating feedback is not neccessary.

Therefore some of the issues you have mentioned should be resolved in the future

Arkensor added a comment.EditedJun 29 2023, 2:12 PM

Hi @Geez,

coming back to this, I saw the behavior changing with todays 0.9.9.31 update but it is still not working. Instead of "pending to process" it now returns an empty string instead of what the webserver actually serves. Please double-check if the fix was considered merged, if so there must have been a mistake - or if the full fix was not planned to be included yet and the change in behavior was an unintended side effect of something else.

		auto ctx = GetGame().GetRestApi().GetContext("https://webhook.site/bc25de13-5a3c-4dae-8198-0d32b559ff4c/");
		auto content = ctx.GET_now("helloworld");
		Print(content);

SCRIPT : string content = ''

@Geez please reopen, this is still not fixed even in the exp update from today 0.9.9.38

Hey guys, I'm currently trying to create some basic CRUD operations within Arma Reforger, and I'm desperately waiting for the X_now functions to finally work properly, when can we expect this to happen finally :)

Dear Bohemia, are you still working? The bug has been known to you for over a year and a half and has been classified as "major" in importance. Unfortunately, there is still no progress to be seen from you. Do you not care about us as server creators? Your Arma series remains popular and is played at all thanks to the community's servers. It would be nice if the server developers could also experience more communication. Unfortunately, the description and explanation of RestAPI usage in the wiki is also not helpful if you can't manage to fix this bug. Many thanks for your help, your community

@Prangerle_Solutions the bug is fixed, and the example code in my reproduction work as intended.