« first day (2074 days earlier)      last day (2857 days later) » 

8:02 PM
To me the error means: "A response was sent, but i wasn't expecting one and therefore i'm throwing an error"
I don't see anything in your route handler that would cause that though.
 
It comes down to him needing to learn how to debug code. We can't just magically see all issues by peering at code that is probably unrelated to the actual error
 
it's not the first time that he comes here with a large snippet asking for help
 
@KevinB i thought that it means there's no response or it's a void object.. i thought that could be the case
 
but, look at the error type: Response Validation
 
Hi folks, I'm having some trouble getting the Google Maps api / MarkerClusterer to add markers to my map.. could use some input. Thanks :) stackoverflow.com/questions/37930787/…
 
8:08 PM
that means something is validating your response before sending it to the client, and is finding it invalid because you returned a value when none was expected.
 
correct, that's the validator.js from swagger
 
@JoeSaad have you tried reaching out to whoever made that instead of us? You haven't given us anything that will help us debug your problem. Please try reaching out to other people instead.
 
@ndugger you don't have to respond to my question, do you? you can just ignore my question
@ndugger you are much better coder than to look at my silly naive question :)
 
@JoeSaad I'm here to help control the room; if all you're doing is filling up the room with bad questions and laziness, I will control it.
 
@ndugger where's the laziness here?
 
8:12 PM
@JoeSaad You're not debugging your issue, and finding where the error is even happening. You just want us to magically look at it and debug it for you
 
these are the number of tabs i had x2 browsers in searching that...
 
the explanation of the problem is right there in your error message.
 
along with all my debugging of commenting the code
 
Searching google for the error is not the same thing as learning how to debug your code
 
The response is invalid, because it is specified as needing to be void.
 
8:13 PM
or learning how to read error messages
 
The problem is that we are prepared to help you, but there is barely any improvements from your side. Despite our help, you come back with almost same problems. You say that there is a problem, but is unable to reduce to where the problem is coming from, which is not the first time.
 
Why did you specify that it should be void.
 
and that tab ? I have also 100+ tabs right now. I'm lazy to close em
anyways, goodnight
 
@KarelG good night
@KevinB i don't recall anywhere where i specified a void part
that's what got me confused
 
You defined a spec for this route, right?
 
8:17 PM
yes
 
that's where you define what it should be returning..
and apparently it thinks it should be returning void... so... where should you look for a problem?
in the spec.
 
I copy pasted your error message
 
@ndugger i read that same error like 20 times this past few days
 
@ndugger I have my PT physical tonight
and I'm sore af
I'm gonna die
 
it's amazing you got me google and think i didn't do that
 
8:18 PM
He's gonna know I'm so weak
 
@JoeSaad Dude, it tells you how to fix it in there... Learn how to read. No more vamping from you, or I'll kick you.
@SterlingArcher Usually, people that see a PT are weak; it's why they see a PT
Don't fret so much
 
Stop flagging the word fuck
@ndugger you're probably going to be suspended... mob flags :(
 
Morons
It wouldn't surprise me if it's @JoeSaad flagging messages
since he's such a help vampire
 
It's up to 8 flags... -_-
 
Awesome
If I get suspended, kick Joe for me if he keeps vamping
 
8:23 PM
I think enough people are invalidating it and keeping you alive xD
 
htm is basic for java
 
touché
 
@KevinB it consumes "application/json" and produces "application/json"
shouldn't the post produce "application/json" ?
 
@MadaraUchiha please stop this
 
Please cool it with the attacks and flags. They go out to every high rep user online in any chat room
3
 
8:27 PM
I have to go to target to get a cheap crappy table and a $20 chair until I get my workbench to stand at while I'm on my home computer
@RaghavSood flaggers don't care if it inconveniences other people.
We have to deal with flaggers on a daily basis, because they get mad that we won't give answers away to help vampires
 
Luggage and Nick just got suspended
Thanks, twits.
 
dunno, never used swagger. seems like that would be the case, but, again, never used it.
 
@KevinB no i mean generally.. shouldn't post produces "application/json" ?
 
@MadaraUchiha Can you stop this? Someone's abusing flags now
 
Someone's having fun with flags.
 
8:31 PM
Sorry about the ping
 
Flags?
 
Flags everywhere!
 
several dozen flags just happened in here over the past 5min
 
They were validated, and now Luggage and nick (double nick) are no longer with us
@MadaraUchiha nick asked me to ask you to unsuspend them pls
room topic changed to JavaScript: ECMAScript 2016 Released: Topic: JavaScript, ECMAScript. Read this: javascriptroom.github.io/rules. Before asking inform yourself on the XY problem goo.gl/taIqf | devdocs.io Documentation™ Helps. Room meta discussions: github.com/JavaScriptRoom/culture [ecmascript] [ecmascript-next] [javascript] [node.js] [rlemon] [stop-flag-abuse]
 
What if we just ... oh, I don't know, sort of invalidated the flag system
browser plugin... auto invalidate
All it would take was, say, 5 10k users running it
And then we wouldn't be at the mercy of this type of trolling.
 
8:34 PM
but we also wouldn't be able to flag the things that needed to be flagged.
 
Move message works just fine.
And if it is really something that cannot remain then there is nothing wrong with moving it to the bin and creating a custom message there for it to be handled.
 
@SterlingArcher Madara isn't here just to unsuspend people when they get flagged.
 
thanks his lawyer
 
^ orly
lol i know
 
@MadaraUchiha thanks boo
 
8:35 PM
@VeronicaDeane I am when people abuse flags
 
@VeronicaDeane - He is also here for witty comments ;)
 
lol oke
 
Is that really abuse given what got flagged?
 
too bad you weren't around earlier
 
Whaaa
 
8:36 PM
I actually expected to get flagged so that they were spread around to more people and the abuse was more obvious
 
Now, flagger, wanna interrupt my GoT again?
 
t the f is going on
@MadaraUchiha I just finished the episode. Such Fangasm
 
Go on
 
@JanDvorak Yes, it's abuse. A known help vamp was vamping again, and I decided to be stern with him so that he understands that his vamping is not welcome.
 
I assume you know who it is and just can't say anything (which is understood).
 
8:37 PM
PSA: Not every message that contains the word "fuck" is flag worthy. Chat is PG13, not PG3.
27
 
@Cerbrus - So sword. Much fire.
 
@KevinB it seems that it is ok to have any kind of response content-type for post.. in my case it is application/json
 
Nick and I did time together.
Like 3-4 minutes.
 
sounds about right for hard time
 
We bunked up and shagged
 
8:41 PM
now it's different on the outside.
 
anything more than that is challenging
 
Well folks, time to run to target. Kick Joe Saad if he continues to vamp
!!afk oi oi oi
 
does your setup (that you STILL haven't given us) look anything like the documentation? github.com/apigee-127/swagger-tools/blob/master/docs/…
 
yes it does
that's the thing, apigee has provided example of get, but i couldn't find any good example of post except of 2 or 3 questions about post but none of them really solve this problem even when they get the same error
 
guess i'll be a little less cryptic.... your problem is in your spec, the spec you still haven't provided how can we help you with code you haven't provided.
keep in mind i've never used swagger, i'm simply following documentation on how to build a swagger config object.
 
8:52 PM
  /jobs:
    x-swagger-router-controller: jobs
    x-a127-apply: {}
    post:
      description: new job created
      # used as the method name of the controller
      consumes:
        - application/json
        - application/x-www-form-urlencoded
      produces:
        - application/json
      operationId: jobspost
      responses:
        "201":
          description: Success - job created
          headers:
            Location:
              description: "location"
              type: string
 
Anyone here uses Android
 
@KevinB sure i understand.. i appreciate even you giving any kind of hints
 
missing schema property.
> A definition of the response structure. It can be a primitive, an array or an object. If this field does not exist, it means no content is returned as part of the response.
 
@GandalftheWhite yes
 
8:57 PM
@KevinB , i had this earlier but i commented it.. i got back that code and here it is..
  /jobs:
    x-swagger-router-controller: jobs
    x-a127-apply: {}
    post:
      description: new job created
      consumes:
        - application/json
        - application/x-www-form-urlencoded
      produces:
        - application/json
      operationId: jobspost
      parameters:
        - name: id
          in: body
          description: description
          required: false
          schema:
            $ref: '#/definitions/task'
      responses:
        "201":
          description: Success - job created
still got that same error though
 
that's still missing the schema property
 
and i defined the schema below in that same file
 
under the 201 response
 
no, at the very bottom.. i'm following this same gist in structure: gist.github.com/arno-di-loreto/…
 
your not associating a schema with the response though.
like this from the gist: gist.github.com/arno-di-loreto/…
 
9:00 PM
so that gist is not correct?
yes you can define the schema in its definition section
that's what i did.. it doesn't have to be in that same block
 
canyou link to a line in the gist for what you're referring to?
(click on the linenumber to get a direct link)
 
and... it still defines a schema in the response object. gist.github.com/arno-di-loreto/…
or, references it rather.
If you don't tell it what schema to use, it uses void.
!!afk fresh air
 
that seems the case with the get, always has a schema in response. in that example there aren't schema within the post responses.. it's only within parameters section
 
POSTS can have both parameters and a response
 
9:14 PM
i know, but is the schema required within the response of the posts ?
 
are you responding with data?
 
no, i'm not responding with data.. i tried both ways though.. one time to respond with json and without
 
why set a content type of you're not responding with data
i would have expected that to cause a response validation, since the body wouldn't match the content type if you sent no response
 
many content types will still be close enough without any data, but not JSON
 
text/html ?
 
9:21 PM
not allowing an empty body is a little weird on their part
 
Especially considering he left off the schema, so it should be expecting an empty body
 
An empty literal doesn't represent a valid value, so that makes sense
 
@JanDvorak don't think so, because html requires the schema
 
the error seems to indicate that it is not getting an empty body though
 
so JSON and HTML require a body, with at least {} or <html>, respectively
 
9:22 PM
I guess "quirks mode" is not an answer?
 
nah, we haven't even reached the client
 
text/plain should accept an empty body :-)
 
this is swagger-tools validation
 
I just keep adding mods to KSP. Hooray for 64-bit!
 
tried the doom demo last night... and had to buy the full version
 
9:24 PM
I started playing it on my roommate's PS4 last night
tried DS3, got pissed off, started smashing things in Doom <3
 
yeah... dunno why, but i totally wasn't expecting to be sent into hell
 
what is the right way for post, shouldn't it respond with no data?
 
data is optional
 
what's that game where you're a blob like in the universe and you move slowly around?
it has a nice soundtrack to it, also
 
can you detect sim card's number on android?
as in the phone number
 
9:27 PM
@GandalftheWhite what do the docs say?
 
serial number is there
it isn't my work
I am just google searching
serial number is different for different sim cards
 
@bitten Solar 2 fits that description
 
solar 2 is one of my favorite casual games
 
@VeronicaDeane i'll check it out
oh it's not quite like this.. if i remember you were really slow at accelerating and you couldn't bump into objects (or planets?) larger than you otherwise you'd be consumed by them
 
sounds like solar 2, dude
you go around collecting asteroids and planets and eating them
 
9:30 PM
yeah it doesn't look like this though, heh
 
if you mean blob blob, there was a miniclip game like that
 
there was more ambience, no shooting
 
@bitten agar.io?
 
ohh nice
that looks good
 
Osmos
Your descriptions are too vague
 
9:32 PM
this is it??
@VeronicaDeane yes!
 
osmos was dope, but had shooting
solar has no shooting by you, just by the little minions
 
@VeronicaDeane sorry..
@ssube it had shooting?
 
agar has real blobs and shooting but not a good soundtrack
pretty sure you can spit goo at other blobs in osmos
it has so many different game modes, though
 
@VeronicaDeane thanks 100
 
@ssube I wouldn't call that shooting, shooting generally implies a disadvantage for the one being shot.
 
9:35 PM
@VeronicaDeane doesn't it push them out of the way or something?
it's been forever since I played that game and only did because some adorable european youtube person did a lets-play
 
Kind of, maybe
it grows them
 
@KevinB so seems the the only way is to try to return some data. i try with json, produces application/json in the schema and i defined the schema in the response and in my node code i'm returning json
and here's the error: "message": "Response validation failed: invalid content type (text/plain). These are valid: application/json, application/x-yaml, application/json, application/x-yaml",
i'm getting the data i want back and that's good, relieving actually.. but just this error is there now
 
and, you're still setting the contentType header to application/json?
 
i tried both ways.. i put contentType in the node code, still got that error
 
res.json({foo:bar}) should be setting the header properly
 
9:41 PM
in setting it in the code, this is what i get Error: Can't set headers after they are sent.
 
have you looked up what that error means?
it's pretty descriptive
 
erm. that shouldn't happen unless you're setting it after you send.
 
here's the line of code i had
res.writeHead(201, {'Content-Type': 'application/json' }).location('/jobs/' + newID).json(job).end();
and i tried it another way:
res.writeHead(201, {'Content-Type': 'application/json' }).location('/jobs/' + newID).end(job);
both gave the same error
 
you shouldn't need .end()
on the first
 
location(...).otherStuff(...) :|
 
9:44 PM
i read some blogs to use end(), anyways.. i tried it without end too and still the same error
 
he needs to set the location header, which .location() does
but i assume it also sends the response
thus causing the error
 
it's probably a redirect-related helper
rather than the simple header set
that looks all kinds of out of order, tbh
 
doesn't seem like it would do a send,
 
hooray for detailed docs
9
Q: How to set the location response HTTP header in Express framework?

gremoHow to set the response Location HTTP header in Express? I've tried this, but it's not working: Controller.prototype.create = function(prop, res) { var inst = new this.model(prop); inst.save(function(err) { if (err) { res.send(500, err); } res.location = '/c...

 
it's saying invalid content type text (text/plain)
i don't know where this is set.. i have it set everywhere to be application/json
 
9:48 PM
and res.json() should be setting it
note that your swagger config won't set the content type, that's just a specification that will throw a validation error if you don't follow it.
 
have you tried, like, making the request from a browser or curl and actually taking a look at the response?
 
i'm doing all this via postman
it's actually giving me the data right
the issue is that error just comes there..
 
is this an okay way to update my react view?
 
uʍop ǝpısdn
 
Hi everybody, I have setup a basic http server via Express for local development
it runs on port 3000
in parallel i have setup a restAPI on port 8080
now i want to make a request from port 3000 to port 8080
is this possible without running into cross origin problems ?
 
9:55 PM
Yes, if you follow CORS rules
 
which means ? can you give me alink ?
 
or reverse proxy the http server on 3000 to a folder within the 8080 server.
or reverse proxy the api to a subfolder of the 3000
 
Ok thanks for the input
will try tomorrow, it GOT time, c ya !
 
10:09 PM
@KevinB @JanDvorak @ssube Thanks for all the hints and trials with me today. I haven't solved it completely since i'm still getting that error but definitely i'm way progressed from all last week attempts.. thank you :)
 
10:48 PM
anyone familiar with react online?
 
fuckity fuck fuck fuck that feels better
 
I've never heard of "react online".
Is it like a react MMO?
 
11:06 PM
@Luggage :,)
 
They probably created an experiment that played directly into Edge's strengths. I won't trust a test made by the people that have the only point to prove
 
@ndugger I would agree except they tested four different browsers. Surely there goal wasn't to make chrome look the worst
 
No, their goal was to make Edge look the best, and so they created an "experiment" that would do that. The results were manufactured.
 
Yes my point was how poor chrome did
 
@VeronicaDeane wtf..
 
11:13 PM
i've never away from a power outlet for more than 4 hours anyway
plus i rarely watch 2 films back to back
lel
 
To be fair it is a slightly funny experiment. The only time I have streamed a video through a browser while not connected to an outlet is on an airplane and now adays they all have outlets.
 
yeah, i'm just being annoying :3
naw i don't know what i'm talking about
 

« first day (2074 days earlier)      last day (2857 days later) »