Getting error: "The content-type is not JSON compatible" after a period of time - apollo

I'm not really sure exactly how long it takes before I get this error, but after a period of time, I get "The content-type is not JSON compatible" error. I am able the query just fine from graphql playground but not in my app. I am using persisted queries, so not sure if that is the cause.
The only fix is to restart my app.
Here is the
stacktrace

Based on the stacktrace you posted I can see that the server (in particular, probably the resolver for whatever query/mutation you are sending) is returning something unexpected i.e. not "JSON compatible".
Based on what you provided, that's all I can say. Please add more details and I can provide additional help. Just including the stacktrace is not enough to determine the cause of this issue.

Related

"An error was encountered with the requested page" in jmeter even capture variables by using regular expression extractor

I have used jmeter to record login flow of application , when i re run it there are some requests failing so i fetch dynamic values from earlier responses and supplies those values to subsequent requests
I am facing some issues there is State token in requests but format of this is changing dynamically so because of that when i rerun some time requests are passing some time failing
Here those are
Fail case
{"stateToken":"00UaBoY\x2D81AIL32Nz9qmUJrIarSv3OgfUdd8FHGSkb"}
{"stateToken":"00C8O4pt\x2DcSPEzHrt69zqmEGta9KbjdwywEVdkICku"}
{"stateToken":"00JgMsy7\x2DzXDP0gxaeWv4dj8EguFTWtnLxV\x2DBKTkIq"}
Working case
{"stateToken":"00fswJVHKpW7dNhNVK0bRclBBrsuMLHBBevJ8IS1Wz"}
{"stateToken":"00ZVZXpSJn7v3lxNTrEqy1mAGydgroO5apvoTlWH2u"}
My regular expression for capture state token is stateToken":"(.+?)"
what is issue here ?
the second issue is saml,relay state are not working even regax working fine in regax tester , i am getting "An error was encountered with the requested page". in debug sampler those 2 variables are getting and passed ( screenshot is attached )
Anyone have ideas related above 2 issues please give some ideas to sort out this
Your failing requeststokens have\x`.
You will have to encode the value and send the request.
In HTTP Request
Check the filed URL encode?
Encoding the value with function
It sounds like a bug in your application, I don't think it's JMeter issue, presumably it's due to presence of these \x2D characters (may be incorrect work of unicode escape)
I don't know what does your application expect instead of this \x2D try to inspect the JavaScript code of the application to see what it does do the tokens, when you figure this out you can replicate this token conversion logic in JSR223 PreProcessor and Groovy language

Getting gskey: request denied

Hey trying to insert and update a list items on one of my tabs but i'm getting the error msg "gskey: request denied error".
I don't understand what this error means. Can someone please clarify what would be the cause for this error.
A call to the checkgskey function on the server side gives the "gskey: request denied" error if the X-GSREQ-KEY in the POST request is missing.
X-GSREQ-KEY is automatically transmitted by a dedicated parameter in either ajxpgn or reload tab. The content of the gskey is output by the emitgskey function.
emitgskey('unique_phrase');
checkgskey('unique_phrase');
As long as the two unique phrases match, the request is not blocked. The unique phrase acts as a seed to compute a protective challenge that's unique to the user, session and location. In a way, the purpose of a GSKey is similar to a nounce.
Additional documentation here.
Turns out the gskey wasn't being passed in with the call. You get that error when there's a key expected but not given.

Trouble Adding Publishing Action to append to an existing big query table?

I have a dataflow flow that appends to an existing bigquery table which has been working for the last few weeks. When i run it now it gives me the error "Cannot run job. Please reload the page and try again." and won't even start the job.
After trying a lot of things, i made a copy of the flow and when the publishing action is creating a new csv file, it works but when i try to
Add a publishing action to an existing big query table,it keeps giving me another bizarre error "SyntaxError: Unexpected token C in JSON at position 0".
I have no idea what is happening since everything used to work perfectly and i made no changes whatsoever.
I am not adding anything new, but I want to give you an answer.
It seems that one of your JSON inputs may be malformed. Try logging it to see what's the problem - and also try skipping malformed JSON strings.
As mentioned in past comments, I suggest to check your logs in StackDriver to find out why are you getting the:
"Cannot run job. Please reload the page and try again."
Also if you can retrieve more information about the error from those logs, It'd be useful to assist you further.
Besides the above, maybe we can solve this issue easier by only just checking the json format, here I put an easy third party json validator and here you can check where you have the error in your json.

Zero-length URL Segments

Using the latest versions of Flask and Flask-RESTful, I have some very basic routes defined as such:
def build_uri_rules(uri_map):
for cls, uri in uri_map.iteritems():
api.add_resource(cls, uri)
uris = {
SampleController: '/samples/<string:hash_or_id>',
SampleFamilyController: '/samples/<string:hash_or_id>/family',
}
build_uri_rules(uris)
This works for uris requested 'properly', but what if the /samples/ endpoint is hit without a parameter, or the sample*family endpoint is hit with an empty sample id? Currently, this results in a 404 error. This works well enough, but I believe the proper thing here would be to throw a 400 error, as they found a proper URL but their data is improperly structured. Is there a way that I can force this behavior?
As a side note:
Looking through the Werkzeug docs, I see that werkzeug.routing allows a minimum length for certain url parameters, but I also see that it's got a minimum of 1. Admittedly, I've not look for why this is the case, but would this be the right tree to bark up? or should I rather simply create a global 404 handler that checks for the length of the parameter and raise the proper error from there?
Thanks!
EDITED: For code correctness.
I would say that hitting /samples/ or /samples/family (or even /samples//family) should result in a 404 as there is nothing at that endpoint.
If, however, you want to do otherwise, the simplest way to handle it would be create a 404 handler for just /samples/ and /samples/family that returns a note with more information about what the consumers of your API are most likely doing wrong.
uris = {
Explanitory400Controller: '/samples/',
SampleController: '/samples/<string:hash_or_id>',
Explanitory400Controller: '/samples/family',
SampleFamilyController: '/samples/<string:hash_or_id>/family',
}

Hash anchor tag causing errors in URL

On very rate occasions, my error log is showing the following error:
"You specified a Fuseaction of registrationaction#close which is not defined in Circuit public."
The full link is:"http://myUrl/index.cfm?do=public.registrationAction#close"
As you can see, the has merely points to an anchor (close) on the page.
This code is working 99% of the time, but on the odd occasion, Coldfusion / Fusebox throws this error out.
Why is this happening?
Could it be related to the device accessing my page somehow? Like a cell phone or Apple product that for some reason does handle hashes the way I am expecting it to?
Could it be javascript / JQuery being disabled?
Any guidance would be appreciated
Thanks
I used to see stuff like that. Older versions of Internet Explorer were not handling the hashtag properly when there were URL parameters. The best solution I could come up with was kludgey at best, but basically it forced the anchor tag to separate from the URL parameter.
http://myUrl/index.cfm?do=public.registrationAction&#close
I'm not sure there is a simple answer to this. We get odd exceptions all the time on our site for all sorts of reasons. Sometimes it's people not using the site the way you expect and sometimes it stuff like you mention such as user-agent edge cases etc.
Basically you need to start to gather evidence and see what comes up that's unusual with these requests.
So to start: do you catch exceptions in you application? If so dumping all scopes (CGI/CLIENT/FORM/URL/SESSION) in an email along with the full exception and emailing them to a custom emails address (such as errors#yourdomain.com) will give you a reference you can square up to your error times and this might give you a hint as to the real issue.
Hope that helps some!