-
Notifications
You must be signed in to change notification settings - Fork 1.2k
requesting larger chunks of json is not working… #413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
seems to be duplicate of #380 |
Hmm actually we did save the version number with the gruntfile pre 2.0, but with the refactoring that must have gotten removed. We should probably add that to the yo.rc.json file. You can update a 2.0+ version just by rerunning the generator in the project, it will ask you if you want to replace files that were updated. Make sure your project is backed up or commited before doing this. You can do a diff afterwords with git and decide what changes you want to keep. So the strange thing about this bug is that it only seems to effect the way the data is rendered in the browser. I tried running a test to see if the response was actually duplicated and it seemed to work fine to me. Do you have some example client side javascript thats hitting the endpoint where you're seeing this become a real issue? |
@DaftMonk, I see this bug on Chrome, and it doesn't show on Postman for me either, but I think this might just be Postman only displaying the first complete JSON object? My Angular code is failing because of this bug. I just have a vanilla $http.get call.
The entire Angular app fails even when the success function is empty, because Angular is crashing when it tries to parse variable "data" as a JSON. |
@joelkek Do you think your issue is also caused by the size of your JSON object? How big is it? |
|
My issue (#744) is about the same problem... |
Ok, I closed my issue so I'm going to repost this here : Hello, I've been experiencing problems with json and generator-angular-fullstack recently. You'll notice that at some point there's the end of the JSON "]" and then its starts again right away "[". I don't think the amount of data is too large since it should be a able to display hundreds of things and not be limited to somewhat approximately 90 items. Do you guys know about this, and is there a workaround ? Thanks ! |
I can confirm the issue as well. If anyone would like to follow along or take a stab: expressjs/compression#20 |
Hmm, it would seem that By upgrading ( @kevinfoerster, @benjipott, @mathieuartu, @Awk34 can you all confirm this? |
So this issue was only happening in dev? |
It would seem so. Were you able to confirm the resolution? |
nah I'm still at work, will take a look when I get home |
As additional information, someone needs to make a PR to change https://github.com/DaftMonk/generator-angular-fullstack/blob/master/app/templates/_package.json#L75 to require some version of |
closed by #1065 |
hi there,
i just tried to request some records from mongodb and saw some strange behavior, in my case I requested all records of a given table, in this case 429 records, after receiving them successfully I used
res.json(200, videos)
to output that object as a json.it seems like my browser does not receive the full 429 records (look like twice the same output), therefor it is not valid json and cant be used for anything. while investigating this issue, i found out that limiting the number of results by using
videos = videos.slice(0, 43);
before sending the json solves that issue but limits the output.including one more item of the videos array will break the json again… there is nothing wrong with next entry as
videos = videos.slice(20, 60);
is also working as well, displaying 45 elements will break it again.i tried to output the same data using an older version of the generator (1.4.3) without any problems, all 429 records show as expected.
intresting tidbit: chrome, firefox and safari seem to render the json twice which makes it invalid,a simple
curl http://localhost:9000/api/videos | subl
does not show the json duplicated. I tried a second computer to be sure that its not my browser plugins messing with me.btw… how can i figure out which version generator-angular-fullstack was used to create a project and is there a way to update an existing project?
The text was updated successfully, but these errors were encountered: