Zapier - Got a non-object result, expected an object from create ([{"http_result":"1"}]) - response

I am getting an error when using my own App via CLI in a create on zapier.
I have looked at the logs and can see:
== Log
Unhandled error: CheckError: Invalid API Response:
Got a non-object result, expected an object from create ([{"http_result":"1"}])
What happened:
Executing creates.results.operation.perform with bundle
Invalid API Response:
Got a non-object result, expected an object from create ([{"http_result":"1"}])
CheckError: Invalid API Response:
Got a non-object result, expected an object from create ([{"http_result":"1"}])
at checkOutput (/var/task/node_modules/zapier-platform-core/src/app-middlewares/after/checks.js:42:15)
at Object. (/var/task/node_modules/zapier-platform-core/src/middleware.js:80:37)
at bound (domain.js:421:15)
at Object.runBound (domain.js:432:12)
at Object.tryCatcher (/var/task/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/var/task/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/var/task/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromiseCtx (/var/task/node_modules/bluebird/js/release/promise.js:641:10)
at _drainQueueStep (/var/task/node_modules/bluebird/js/release/async.js:97:12)
at _drainQueue (/var/task/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/var/task/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/var/task/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:464:21)
at process.topLevelDomainCallback (domain.js:152:15)
at process.callbackTrampoline (internal/async_hooks.js:128:24)
I can't work out what Zapier wants as a response from a create function. I have a similar looking result set when I do a search function... but create must need something different... HELP :)

Related

Post request returns 400 Bad Request in RobotFramework

I've been using a RobotFramework for sending a POST request
My code is the following :
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
*** Variables ***
${API_Base_Endpoint} http://thetestingworldapi.com/
*** Test Cases ***
Post_Req_Test
Create Session AddData ${API_Base_Endpoint}
${body}= create dictionary first_name=Tester1 middle_name=NAN last_name=Tester2 date_of_birth=01/01/1999
LOG TO CONSOLE ${body}
${header}= create dictionary Content-Type=application/json
${response}= post on session AddData api/studentsDetails data=${body} headers=${header}
But from some reason I'm getting a "HTTPError: 400 Client Error: Bad Request for url: http://thetestingworldapi.com/api/studentsDetails"
I've tried to send same request via Postman , and it works with no issues.
Any ideas what may go wrong ?
With the help of #MatthewKing I was referenced to this solution Worked for me

Send string variable via TCP connection Lua

I am sending data between two ESP8266 modules via TCP connection every 10 seconds in Lua:
string="abc"
cl=net.createConnection(net.TCP, 0)
cl:connect(80,"192.168.4.1")
tmr.alarm(2, 10000, 1, function()
cl.send("The string variable is: "..string.."")end)
However, if I want to send string variable as in the code above, I keep getting error message:
PANIC: unprotected error in call to Lua API (init.lua:26: bad argument #1 to 'send' (net.socket expected, got string))
PANIC: unprotected error in call to Lua API (bad argument #1 (Server/Socket expected))
It works for me just when sending numerical variables. Is there any way to send string variable?
Thanks,
Kaki
The error message is that the first argument to send call is expected to be the socket, not a string.
You should be using cl:send("value") instead of cl.send("value") as the first one is really a short form for cl.send(cl, "value").

Message: Invalid argument supplied for foreach() for Flickr

I recently switched our site to a different server for ExpressionEngine and all of a sudden I'm getting errors when trying to access a drop down list of Flickr albums.
This is what the error says:
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: flickr_sets/ft.flickr_sets.php
Line Number: 35
Here is the code for the php file...line 35-37
foreach($sets['photoset'] as $photoset) {
$photo_sets[$photoset['id']] = $photoset['title'];
}
I haven't changed anything but am wondering if I need to reauthorize the token since I switched to a different server.
Anyone has any idea?

Newbie OAuth issue: Error when trying to use the PHPoAuthLib OAuth lib

I've got an issue using this OAuth lib when connecting with twitter:
https://github.com/Lusitanian/PHPoAuthLib
I'm using the following url to connect:
http://www.myserver.com/oauth/examples/twitter.php?go=go
I'm getting the following error:
Fatal error: Uncaught exception 'OAuth\Common\Http\Exception\TokenResponseException' with message 'file_get_contents(https://api.twitter.com/oauth/request_token): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized ' in /webDeploy/V2/sites/wandexBB/oauth/src/OAuth/Common/Http/Client/StreamClient.php:75 Stack trace: #0 /webDeploy/V2/sites/wandexBB/oauth/src/OAuth/OAuth1/Service/AbstractService.php(52): OAuth\Common\Http\Client\StreamClient->retrieveResponse(Object(OAuth\Common\Http\Uri\Uri), Array, Array) #1 /webDeploy/V2/sites/wandexBB/oauth/examples/twitter.php(59): OAuth\OAuth1\Service\AbstractService->requestRequestToken() #2 {main} thrown in /webDeploy/V2/sites/wandexBB/oauth/src/OAuth/Common/Http/Client/StreamClient.php on line 75
It looks like the request body is empty.
I see in the code the following params are being used:
$_GET['oauth_token'],
$_GET['oauth_verifier'],
What are these params? I see in my twitter account I have various tokens available after I created my app on twitter, is it something to do with that?
I'm lost :/ This could be the wrong approach altogether.
Can anyone help with this?
Thanks in advance.
This lib seems to have a bug relating to the twitter implementation. Now using a different lib and got that going much more easily:
https://github.com/sudocode/ohmy-auth

Java NullPointerException null when calling forge.ajax

When calling forge.ajax and request returns a 401 with JSON, under Android only (both device and emulator) I'm getting the following error message:
[ INFO] D/Forge (25373): Returning: {"content":{"type":"UNEXPECTED_FAILURE","message":"Forge Java error: NullPointerException: null","full_error":"java.lang.NullPointerException\n\tat io.trigger.forge.android.modules.request.API$1$1.getPasswordAuthentication(API.java:107)\n\tat java.net.Authenticator.requestPasswordAuthentication(Authenticator.java:140)\n\tat libcore.net.http.HttpURLConnectionImpl.getAuthorizationCredentials(HttpURLConnectionImpl.java:432)\n\tat libcore.net.http.HttpURLConnectionImpl.processAuthHeader(HttpURLConnectionImpl.java:407)\n\tat libcore.net.http.HttpURLConnectionImpl.processResponseHeaders(HttpURLConnectionImpl.java:356)\n\tat libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:292)\n\tat libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:168)\n\tat io.trigger.forge.android.modules.request.API$1.run(API.java:285)\n\tat io.trigger.forge.android.core.ForgeTask$1.doInBackground(ForgeTask.java:112)\n\tat android.os.AsyncTask$2.call(AsyncTask.java:287)\n\tat java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:137)\n\tat android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)\n\tat java.lang.Thread.run(Thread.java:856)\n"},"status":"error","callid":"46C2A570-7229-4427-9BF8-F64FB12F6D8F"}
The forge.ajax error callback is being fired but the error.content object contains the string above and does not have the response.
Notice that this is not happening on iOS.
You can see this in action when running the app from the play store and trying to login with a wrong password/non existing user.
Full source code is available on github
This arose when attempting to access HTTP resources protected with basic auth, and no username was supplied to request.ajax.
The bug was fixed in v1.4.24 of the platform - sorry for the inconvenience!
http://docs.trigger.io/en/v1.4/release-notes.html#v1-4-24

Resources