[Plugin] Http/s REST, blueprintable JSON and Parse REST API manager at once (VaRest)

New plugin release: https://github.com//VaRest/releases/tag/v1.1-r14

Release notes:

  • [Feature] Useful functions separated into blueprint library

  • [Feature] CallURL function for fast URL processing #72

  • [Feature] Base64 encoding helpers #75

  • [Feature] Custom tags for requests #68

  • [Feature] Static requests for C++ raw bindings

  • [Feature] Request status and URL getter #67

  • [Bugfix] Switch Editor module type to Developer to prevent crashing while Standalone launch #69

  • [Bugfix] Response code for unsuccessfull requests fixed #71

  • [Bugfix] Crash on empty field name #58 #70

  • [Refactoring] Flattened folder structure to help with blueprint nativization

  • [Refactoring] Enums changed to classes instead of old-style namespaced enums

  • [Refactoring] Additional requests log

Supported engine versions: UE 4.11-4.12

I am too having problems exporting to HTML. I started from a blank project with only the attached code (in the level blueprint), and the plugin enabled (installed from the marketplace). My Unreal version is 4.12.5. Also attached is the error log. Is there any known previous version without this issue?


Cmd: OBJ SAVEPACKAGE PACKAGE="/Game/App" FILE="../../../../../../Users/modelical/Documents/Unreal Projects/VaRestHTMLTest/Saved/Autosaves/Game/UEDPCApp.umap" SILENT=true AUTOSAVING=true KEEPDIRTY=true
LogSavePackage: Save=66.60ms
LogSavePackage: Moving '../../../../../../Users/modelical/Documents/Unreal Projects/VaRestHTMLTest/Saved/UEDPCAppB90B0EE346BE1BC20DB145BD14B6C1B1.tmp' to '../../../../../../Users/modelical/Documents/Unreal Projects/VaRestHTMLTest/Saved/Autosaves/Game/UEDPCApp.umap'
LogSavePackage:Display: Finished SavePackage ../../../../../../Users/modelical/Documents/Unreal Projects/VaRestHTMLTest/Saved/Autosaves/Game/UEDPCApp.umap
LogEditorTransaction: Undo Spawn Play From Here Start
MainFrameActions: Packaging (HTML5): Running AutomationTool...
MainFrameActions: Packaging (HTML5): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject=C:/Users/modelical/Documents/Unreal Projects/VaRestHTMLTest/VaRestHTMLTest.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=C:/Users/modelical/Documents/Unreal
MainFrameActions: Packaging (HTML5):  Projects/VaRestHTMLTest/VaRestHTMLTest.uproject -cook -stage -archive -archivedirectory=C:/Users/modelical/Desktop/VaRestHTMLTest -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -prereqs -nodebuginfo -targetplatform=HTML5 -build -CrashReporter -utf8output
MainFrameActions: Packaging (HTML5): Automation.Process: Setting up command environment.
MainFrameActions: Packaging (HTML5): BuildCookRun.SetupParams: Setting up ProjectParams for C:\Users\modelical\Documents\Unreal Projects\VaRestHTMLTest\VaRestHTMLTest.uproject
MainFrameActions: Packaging (HTML5): Project.Build: ********** BUILD COMMAND STARTED **********
MainFrameActions: Packaging (HTML5): CommandUtils.Run: Run: C:\Program Files (x86)\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe VaRestHTMLTest HTML5 Development -Project="C:\Users\modelical\Documents\Unreal Projects\VaRestHTMLTest\VaRestHTMLTest.uproject"  "C:\Users\modelical\Do
MainFrameActions: Packaging (HTML5): cuments\Unreal Projects\VaRestHTMLTest\VaRestHTMLTest.uproject"  -remoteini="C:\Users\modelical\Documents\Unreal Projects\VaRestHTMLTest" -noxge -generatemanifest -NoHotReloadFromIDE
MainFrameActions: Packaging (HTML5): CommandUtils.Run: Run: Took 0,7970456s to run UnrealBuildTool.exe, ExitCode=0
MainFrameActions: Packaging (HTML5): CommandUtils.Run: Run: C:\Program Files (x86)\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe VaRestHTMLTest HTML5 Development -Project="C:\Users\modelical\Documents\Unreal Projects\VaRestHTMLTest\VaRestHTMLTest.uproject"  "C:\Users\modelical\Documents\Unreal Projects\VaRestHTMLTest\VaRestHTMLTest.uproject"  -r
emoteini="C:\Users\modelical\Documents\Unreal Projects\VaRestHTMLTest" -noxge -NoHotReloadFromIDE -ignorejunk
MainFrameActions: Packaging (HTML5): UnrealBuildTool: Setting Emscripten SDK 
MainFrameActions: Packaging (HTML5): UnrealBuildTool: Performing 1 actions (4 in parallel)
MainFrameActions: Packaging (HTML5): UnrealBuildTool: [1/1] python.exe VaRestHTMLTest.js
MainFrameActions: Packaging (HTML5): UnrealBuildTool: INFO:root:(Emscripten: Running sanity checks)
MainFrameActions: Packaging (HTML5): UnrealBuildTool: INFO:root:Closure compiler (C:\Program Files (x86)\Epic Games\4.12\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.35.0	hird_party\closure-compiler\compiler.jar) does not exist, check the paths in C:\Program Files (x86)\Epic Games\4.12\Engine\Intermediate\Build\HTML5\.emscripten
MainFrameActions: Packaging (HTML5): UnrealBuildTool: INFO:root:closure compiler will not be available
MainFrameActions: Packaging (HTML5): UnrealBuildTool: error: Linking globals named '_Z14UELinkerFixupsv': symbol multiply defined!
MainFrameActions: Packaging (HTML5): UnrealBuildTool: Traceback (most recent call last):
MainFrameActions: Packaging (HTML5): UnrealBuildTool:   File "C:\Program Files (x86)\Epic Games\4.12\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.35.0\emcc", line 1309, in <module>
MainFrameActions: Packaging (HTML5): UnrealBuildTool:     final = shared.Building.llvm_opt(final, link_opts, DEFAULT_FINAL)
MainFrameActions: Packaging (HTML5): UnrealBuildTool:   File "C:\Program Files (x86)\Epic Games\4.12\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.35.0	ools\shared.py", line 1465, in llvm_opt
MainFrameActions: Packaging (HTML5): UnrealBuildTool:     assert os.path.exists(target), 'Failed to run llvm optimizations: ' + output
MainFrameActions: Packaging (HTML5): UnrealBuildTool: AssertionError: Failed to run llvm optimizations: 
MainFrameActions: Packaging (HTML5): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: C:\Users\modelical\Documents\Unreal Projects\VaRestHTMLTest\Binaries\HTML5\VaRestHTMLTest.js
MainFrameActions: Packaging (HTML5): UnrealBuildTool: Total build time: 26,67 seconds
MainFrameActions: Packaging (HTML5): CommandUtils.Run: Run: Took 26,7875321s to run UnrealBuildTool.exe, ExitCode=5
MainFrameActions: Packaging (HTML5): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Command failed (Result:5): C:\Program Files (x86)\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe VaRestHTMLTest HTML5 Development -Project="C:\Us
MainFrameActions: Packaging (HTML5): ers\modelical\Documents\Unreal Projects\VaRestHTMLTest\VaRestHTMLTest.uproject"  "C:\Users\modelical\Documents\Unreal Projects\VaRestHTMLTest\VaRestHTMLTest.uproject"  -remoteini="C:\Users\modelical\Documents\Unreal Projects\VaRestHTMLTest" -noxge -NoHotReloadFromIDE -ignorejunk. See logfile for details: 'UnrealBuildTool-
2016.08.07-18.56.24.txt' 
MainFrameActions: Packaging (HTML5):    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars)
MainFrameActions: Packaging (HTML5):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
MainFrameActions: Packaging (HTML5):    at AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars)
MainFrameActions: Packaging (HTML5):    at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars, Nullable`1 InChangelistNumberOverride, Dictionary
`2 InTargetToManifest)
MainFrameActions: Packaging (HTML5):    at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
MainFrameActions: Packaging (HTML5):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
MainFrameActions: Packaging (HTML5):    at AutomationTool.BuildCommand.Execute()
MainFrameActions: Packaging (HTML5):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
MainFrameActions: Packaging (HTML5):    at AutomationTool.Automation.Process(String] CommandLine)
MainFrameActions: Packaging (HTML5):    at AutomationTool.Program.MainProc(Object Param)
MainFrameActions: Packaging (HTML5):    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
MainFrameActions: Packaging (HTML5):    at AutomationTool.Program.Main()
MainFrameActions: Packaging (HTML5): Program.Main: AutomationTool exiting with ExitCode=5 (5)
MainFrameActions: Packaging (HTML5): Domain_ProcessExit
MainFrameActions: Packaging (HTML5): copying UAT log files...
MainFrameActions: Packaging (HTML5): BUILD FAILED
PackagingResults:Error: Error Unknown Error

Hello,

I updated to 1.1-r15 and now I am able to export to HTML but I get error -1 all the time. (But not the marketplace version, I am using the GitHub downloaded version).

Hello again,

After a few hours testing, I think I found the culprit for the -1 response codes. In my case, it was a problem with same-origin policy. I find it out looking at the browser console ouput. Now I am testing with localhost requests and it seems to work fine. Now I am going to set my remote server to accept cross-domain petitions.

Construct Pointer Object Node removed

Amazing plugin been using it since 4.8,
But the latest update to the plugin for UE4.12. I noticed that constuct pointer object node been removed, Can anyone give me a heads up on, how create the pointer now that that node has been removed. Grateful for any info
Cobjject.jpg

I’ve removed Parse support from plugin few releases ago, so now this node isn’t available out the box. Latest release with parse support is https://github.com//VaRest/releases/tag/v1.1-r12

Thank you for the quick response.
Is that version of plugin compatible with ue 4.12
if not is where no other way with the nodes available to crerte a pointer object. as im using nodechef which using the parse api.

You can make it in blueprints by appending strings:

{“__type”:“Pointer”,“className”:"
<ClassName>
“,“objectId”:”
<ObjectId>
"}

Oh of course… silly me… thank you for helping.

Hi Everyone!

I only have a one simple problem, I don;t know how to capture whole Json data received from a website into separate variables inside unreal.
Could someone show me and everyone an example or point to the right direction? I saw few people asking and they were ignored.

Thanks a lot! :slight_smile:

I haven’t had time to make a full guide yet, but I’ve got a screen shot on my blog that shows how I was doing it. You’ll need to know the field names in your JSON though.

http://blog.patrickbarnhardt.info/2016/06/19/using-varest-to-connect-ue4-to-wordpress-2/

Check the very first image.

Hi !

Thanks for replying and giving a hand!

Can you show an image of what you have before the get field functions?
I would really like to know and see what is your way of processing the Json request and how are you exactly getting the response.
Could I also ask about the precise formatting of your Json? Whether you have nested or simplified. etc.

I would really appreciate it, I have been investigating for two weeks, scouting the interwebz but to no avail.

I appreciate your time, I will be following your blog to see how you try to implement varest use with Wordpress :)!

Thanks again!

Greetings! Awesome plugin, but im having a problem. Is it not possible to set the header?
When attempting this, no header at all is present in the GET request.

There must be some way to set the header right? Im not sure what im doing wrong here.
Thanks for any advice!
/Best Regards

Oh, never mind! I just found the solution, turns out I needed an empty content type for this GET request. Im very novice with this json business :slight_smile:
The header shows up as expected.

Thanks for the awesome plugin!
/Best Regards

Does this plugin have any documentation? All I can find is 2-3 over-assuming and fragmented blueprint screenshots and a few lines on GitHub. And a link to a an old non-working UE4 project… Why release something like this to the community and not document it? It should come with a warning: Yes, please use my plugin, but you’re better off writing your own plugin rather than spending hours and hours trying to solve a puzzle simply based on arbitrary naming of BP nodes, if you can find them that is… It’s better to charge $10-$20 and actually document the plugin and properly support it.

Hi folks, I really want to get this working… does anyone have an idiots guide to getting something up and running? So far I’ve installed the plugin and created a player controller blueprint as in the image example… Clearly there is more to do (apart from the URL) … help? please? :slight_smile:

I should say, all I would like to do at this stage is get a height map from a server and create the geometry… how hard can it be… Ha! (irony)

Unfortunately I don’t have that version of that project anymore, I did a rebuild and haven’t reconstructed the system just yet so I can’t provide anything before that right now.
As for the formatting of the JSON, it’s just the default spit out by the wordpress API. It seemed to work fine.

Assigning JSON GET response field values to blueprint variables

After going through all the entries on this thread I’ve seen several people ask about parsing the response from a GET call back into variables, but don’t see any clear answers. I do a GET on my server and receive a response back of the form

{“ItemsMap”:{“ItemId”:“TankBInput”,“AccessRight”:“2”,“ItemType”:“2”},{“ItemId”:“FloatSwitch”,“AccessRight”:“0”,“ItemType”:“0”}]}

I want to extract the value of ItemId from the first entry of the ItemsMap array. I can’t figure out the proper collection of boxes to do so. Is there an example that illustrates this in Blueprint or C++? I figured I just needed to do a Get Response Object in response to an OnComplete event, set that to a Json Buffer, and then Get Object Array Field with ItemsMap as the field name, but can’t figure out the proper function to extract the first item of the array to get to the ItemId field. The image show’s what I’ve got in blueprint for the decomposition so far. I’m new to blueprint, so a lot of this blueprint programming is hit and miss.

Can somebody explain how I’d complete this assignment? I also wonder if this wouldn’t be easier in C++, but I don’t see any examples of VaRest that are C++ based. Any pointers are appreciated.

EDIT2: I got a problem when I want tu use https request, when I connect to my website in Chrome with https://… it works but when I do this from the plugin I get stuck in Bind Event to OnRequestComplete, I use wireshark to see what happend:

http://img4.hostingpics.net/pics/688077errorhttps.jpg

Event
EDIT: It’s ok I found the solution this plugin is reaaly impressive ^^ now I would like to know if I can use blueprint varest on a dedicated server or in C++ class ?

Hello everyone, I found this plugin and look very amazing but I have a question for you. There is someone who already use this plugin with an authentification system based on JSON Web Tokens (from https://jwt.io/) ?

I explain why, i’m currently using jhipster to generate a project based on springboot and the authentification system of JWT and I would like to know if someone already done this to explain me a way to explore. I sucess to send post/get request but I think it’s more complex than this to use the JWT concept by write a header for exemple with a secret key.

Any tips is good to have ! :slight_smile:

Thank in advance.

VaRest login system with PHP/MySQL

Hi guys,

I need help. I am doing a login system using MySQL, PHP and VaRest and the result that PHP is returning is not being accepted by VaRest. I will demonstrate below whole process I did:

PHP Class function to encode Json to send to VaRest

public static function efetuarLogin($username, $pass)
    {
        require_once 'MySQLDC.php';
            
        $query = "CALL SP_LoginUser('$username', '$pass');";
            
        $mysql = new MySQLDC();
            
        $result = $mysql->execSPForDataSet($query);
            
        $JSON = json_encode ( $result );
    
        if($JSON=="null"){
            $JSON="]";
        }
    
        return '"data":' . $JSON . ']';
    }    

and here the images of my BP to parse the result

&stc=1

&stc=1

&stc=1

&stc=1

&stc=1

&stc=1

and the Widget BP to send information to system to check if true or not and parse

&stc=1

&stc=1

The error I reviced

&stc=1

Anyone cam help-me? what am I doing wrong?

Thanks