jhewt / gumer-psn

A Playstation Network API written in Node.js
MIT License
346 stars 71 forks source link

node.js #2

Closed KJThaDon closed 10 years ago

KJThaDon commented 10 years ago

Hello!

Just wanted to thank you again for working on the code for this. Unfortunately I have no knowledge of running node.js and it appears my hosting account does not allow it on shared hosting. I am going to try and figure out how to run node.js on my localhost, because I really want to see this working.

Question: Is this the same thing you had on your site running? Because I noticed the file asked for login information. Is that only to login and actually 'view' other peoples trophies etc?

Can you give me any hints or guides on how to get started with node.js?

Thank you!

jhewt commented 10 years ago

@KJThaDon

Yes! It is the same that runs on my website but better organized (the one hosted is a really unreadable chuck of lines). Unfortunately it does require a valid PSN account in order to access their mobile API but as I mentioned in the README can be a new account if you don't want to expose yours.

First you need to install Node.js, I don't know in what platform you are but the installation process ain't hard at all

Ubuntu/Debian

  1. Install node $ sudo apt-get install node check if node is installed by running and if npm is installed: $ node -v $ npm -v
  2. Create a directory somewhere $ npm install gumer-psn $ cd node_modules/gumer-psn/examples/ $ node index.js If this gives you that it cannot found the Express module install it with "npm install express"

WIndows

On Windows you can download a installer, it should install node and npm. (Remember to close any cmd window open) Download the right for you here: http://nodejs.org/download/

Once installed:

Reply if you have any trouble. Thanks for checking it out!

KJThaDon commented 10 years ago

Great! thank you. I have managed to install it using the windows installer. Afterwards, I opened a CMD and created the directory on my server. I then used these commands to get the dependencies installed, or so it appears..

npm install <-- installed dependencies - Created folder "node_modules" and installed only "htmlparser2" and "requests"

npm install express <-Ran command to install express (should "npm install" install express also?)

node example/index.js <- starts the PSN example you provided at http://localhost:3000

So my directory structure is like this.

WWW -> -----> gumer-psn ---------------> node_modules ----------------------------> express ----------------------------> htmlparser2 ----------------------------> requests directory

Seems like it may be running, but when accessing localhost:3000, I get the error 'Cannot GET /'

jhewt commented 10 years ago

Read the README please! :P

KJThaDon commented 10 years ago

My fault :P after reading all these sites/tutorials about node, I was in a rush to get it working after you helped out :D

I have successfully pulled json using!!! http://localhost:3000/PSN/KJThaDon

Since my host does not allow node.js, is there an alternative you could suggest so that I could run this live?

Thank you very much, i appreciate all your help!

jhewt commented 10 years ago

An alternative should be running the script on a SaaS (Software as a Service) provider such as appfog (used to have freebies with less than 256MB ram, it's enough), azune, etc... Then you can pull it from PHP like a restful API.

Another alternative should be.... creating your PHP port of this and then contribute it! :P

KJThaDon commented 10 years ago

Thank you for your suggestions. I am trying out Heroku. After much testing, I believe I have got the application to deploy, by creating a Procfile with the text web: node index.js

index.js being your example moved to the root folder. However, I continue to get "Application Error" http://quiet-chamber-7509.herokuapp.com/

Is there something I am missing? Should something be changed in the files first?

I am using these commands git clone git://github.com/jhewt/gumer-psn.git cd gumer-psn heroku create git push heroku master heroku open

Thanks!

jhewt commented 10 years ago

Many SaaS doesn't let you listen in the port you want, many requires to use their ENV variables. I'm not sure about Heroku, but you should check their documentation about Node.js apps, I am quite sure it requires you to use the port they choose for you. (You can't have a dedicated IP, so, they choose the port not you)

KJThaDon commented 10 years ago

Dang :/ Looks like I'm screwed until a php port comes along.. I would donate to have this working. Even just pulling avatar and some profile info..

Thank you

jhewt commented 10 years ago

Don't worry, I'll be checking the SaaS thinggy so I can make a How-to with hosting recommendations.

jhewt commented 10 years ago

@KJThaDon I've managed to run the last example on Heroku with only 1 dyn, more "dyns" will require me to pay and I do not have a credit card hehe.

Live example: http://gumer-psn.herokuapp.com/PSN/KJThaDon/ http://gumer-psn.herokuapp.com/PSN/KJThaDon/trophies http://gumer-psn.herokuapp.com/PSN/KJThaDon/trophies/NPWR05452_00 (Resogun I believe) http://gumer-psn.herokuapp.com/PSN/KJThaDon/trophies/NPWR05452_00/groups http://gumer-psn.herokuapp.com/PSN/KJThaDon/trophies/NPWR05452_00/1

KJThaDon commented 10 years ago

@jhewt Nice! Anything special you had to do? All I would get was Application Error. Maybe I am doing something wrong.. I even followed this whole guide, and still can't get it working..

https://devcenter.heroku.com/articles/getting-started-with-nodejs

jhewt commented 10 years ago

@KJThaDon Yes, I had to do a few modifications to the code but only a few. First of all, move the example file where "psn.js" is and rename it web.js (no really necessary I think, do it anyways) and install the dependencies.

npm install 
npm install express
npm install body-parser

Create a file named Procfile with the following:

web: npm start

Now you have to edit package.json to make it look like this

{
    "name": "gumer-psn",
    "description": "A Playstation Network API",
    "version": "0.1.1",
    "author": {
        "name": "José Augusto Sächs",
        "email": "admin@jsachs.net"
    },
    "contributors": [
        {
            "name": "José Augusto Sächs",
            "email": "admin@jsachs.net"
        }
    ],
    "dependencies": {
        "htmlparser2": "3.4.0",
        "request": "2.20.0",
        "express": "4.0.0",
        "body-parser": "1.0.2",
        "logfmt": "1.1.2"
    },
    "main": "web.js",
    "scripts": {
        "start": "node web.js",
        "test": "echo \"Error: no test specified\" && exit 1"
    },
    "license": "MIT"
}

Now you have to edit the app port listener in web.js (at the bottom of the file)

// We listen in the port 3000
app.listen(Number(process.env.PORT || 5000)); 
console.log('gumerPSN Example running at port: ' + Number(process.env.PORT || 5000));

After those modifications are ready, you have to push it with git.

After pushing, now you can set a "dyno" so it can run

$ heroku ps:scale web=1

And it should be working at the URL you desired when creating the app

jhewt commented 10 years ago

I had to close the Heroku example, it seems someone was too lazy to set up their own enviroment, so whoever that was decided to use my example setup for getting PSN data, and since Heroku isn't free it started to cost me $0.6 usd per hour. I cannot pay them since I do not have an international credit card (I am from Argentina, that's why I ask for small donations to a PayPal account).

Let me know if you need the example running again. Good luck!

KJThaDon commented 10 years ago

Ehhh, that's dumb who's that lazy. I'm trying to learn so I can do it myself too...Can't you make it private or something?

I searched for a while for a free node.js host, and they where one of the few I found. How can they charge you, don't they just limit you as a free user? I do remember seeing the "dynos" or something that you can add more, for money. I had no idea what those are though lol

I would supposed it's like more bandwidth?

Thanks for the explanation above! I haven't had a chance to get back to this, but I'm gonna try it out today or tomorrow.

KJThaDon commented 10 years ago

Sweeeet, I got it working!

Change the files @jhewt posted above then, run the following commands. These are the steps I took for any noobs like me :)

  1. cd C:/Server/www/psn_ <- Wherever you have the files stored.
  2. heroku login
  3. npm install
  4. npm install express
  5. npm install body-parser
  6. git init
  7. git add .
  8. git commit -m "init"
  9. heroku create
  10. git push heroku master
  11. heroku ps:scale web=1
  12. heroku open

Do you know what the limits are on this?

KJThaDon commented 10 years ago

Ahhh now I'm getting

{"error":true,"message":"Something went terribly wrong, submit an issue on GitHub please!"}

jhewt commented 10 years ago

@KJThaDon What was the request that gave you that error?

About the limits of Heroku free one, there is a limit of 600 req/min, 2TB/month and you cannot write to the disk (like user uploads, etc) You only have 100MB of space for the code.

I believe is just enough because this is just I/O, there are no CPU intensive task whatsoever, even less demanding if you implement some sort of caching on your server code.

KJThaDon commented 10 years ago

Nice! 600re/min & 2tb a month should be plenty :)

It seems to be back up again..It was doing it for /PSN/KJthaDon & PSN/KJthaDon/trophies

I don't wanna post the link here and have all my bandwidth taken by these leechers, but i'll email you the link for future purposes.

I don't know why but it seems when i was requesting my profile a few times, I though I noticed an online status object, or was I going crazy lol?

I would like to pull that if it's available to show a user online or offline, however I don't see it anymore.

KJThaDon commented 10 years ago

Ahh, getting that error again..

jhewt commented 10 years ago

Remember to use caching, PSN may have a slight throttling. If the server is using an account that is being used on a SONY system logout from there. (Not sure, but worth a try).

You should change the lines with

res.send({
    error: true, message: "Something went terribly wrong, submit an issue on GitHub please!"
})

with:

res.send({
    error: true, message: trophyData
})

That will resend SONY's error message. Leave it here so we can check the error you're getting.

jhewt commented 10 years ago

@KJThaDon There's is an online flag if that person you're getting data for is either your friend with the account used by the script or has the privacy settings on public

KJThaDon commented 10 years ago

The website I plan on running it on has caching, and cloudflare. I can just use cloudflare, right?

It's only randomly it will show me online status etc, only for my PSN name.. I tried others.. It's not even the name I linked in the source either.. Maybe because I've logged in on my name on my PC? or maybe I'm logged in..

Idk, it's weird.

These are the objects that only show sometimes, and only when I pull my PSN name.

->presence->primaryInfo->onlineStatus; ->presence->primaryInfo->lastOnlineDate; ->personalDetail->firstName; ->personalDetail->lastName; ->personalDetail->profilePictureUrl;

I would like to use at least "onlinestatus" but it does not seem I will be able to since it requires some authorization from the user, correct?

Thank you!

On Fri, Apr 18, 2014 at 11:31 PM, José A. Sächs notifications@github.comwrote:

@KJThaDon https://github.com/KJThaDon There's is an online flag if that person you're getting data for is either your friend with the account used by the script or has the privacy settings on public

— Reply to this email directly or view it on GitHubhttps://github.com/jhewt/gumer-psn/issues/2#issuecomment-40859618 .

KJThaDon commented 10 years ago

Do you see the "extra" information when you search my account? PSN/KJThaDon

On Sat, Apr 19, 2014 at 12:26 AM, Josh kjthadon@gmail.com wrote:

The website I plan on running it on has caching, and cloudflare. I can just use cloudflare, right?

It's only randomly it will show me online status etc, only for my PSN name.. I tried others.. It's not even the name I linked in the source either.. Maybe because I've logged in on my name on my PC? or maybe I'm logged in..

Idk, it's weird.

These are the objects that only show sometimes, and only when I pull my PSN name.

->presence->primaryInfo->onlineStatus; ->presence->primaryInfo->lastOnlineDate; ->personalDetail->firstName; ->personalDetail->lastName; ->personalDetail->profilePictureUrl;

I would like to use at least "onlinestatus" but it does not seem I will be able to since it requires some authorization from the user, correct?

Thank you!

On Fri, Apr 18, 2014 at 11:31 PM, José A. Sächs notifications@github.comwrote:

@KJThaDon https://github.com/KJThaDon There's is an online flag if that person you're getting data for is either your friend with the account used by the script or has the privacy settings on public

— Reply to this email directly or view it on GitHubhttps://github.com/jhewt/gumer-psn/issues/2#issuecomment-40859618 .

KJThaDon commented 10 years ago

Hello again.

Just wanted to say thank you again for putting this api together. I have had many hours of searching and trying to make something work before you introduced yours. I wanted to show you what I have done with it so far, and it you would like my code for it I would have no problem giving it.

Here I have a Clan Roster setup for my psn clan http://---.com/clan-roster/

By clicking on the PS3 or PS4 icon on the same row as any of the clan members, it should load the page with a popup and what I have done.

Thanks!

On Sat, Apr 19, 2014 at 12:27 AM, Josh kjthadon@gmail.com wrote:

Do you see the "extra" information when you search my account? PSN/KJThaDon

On Sat, Apr 19, 2014 at 12:26 AM, Josh kjthadon@gmail.com wrote:

The website I plan on running it on has caching, and cloudflare. I can just use cloudflare, right?

It's only randomly it will show me online status etc, only for my PSN name.. I tried others.. It's not even the name I linked in the source either.. Maybe because I've logged in on my name on my PC? or maybe I'm logged in..

Idk, it's weird.

These are the objects that only show sometimes, and only when I pull my PSN name.

->presence->primaryInfo->onlineStatus; ->presence->primaryInfo->lastOnlineDate; ->personalDetail->firstName; ->personalDetail->lastName; ->personalDetail->profilePictureUrl;

I would like to use at least "onlinestatus" but it does not seem I will be able to since it requires some authorization from the user, correct?

Thank you!

On Fri, Apr 18, 2014 at 11:31 PM, José A. Sächs <notifications@github.com

wrote:

@KJThaDon https://github.com/KJThaDon There's is an online flag if that person you're getting data for is either your friend with the account used by the script or has the privacy settings on public

— Reply to this email directly or view it on GitHubhttps://github.com/jhewt/gumer-psn/issues/2#issuecomment-40859618 .

KJThaDon commented 10 years ago

Oh and I will definitely donate to you as soon as I can. I have my brother coming in from out of State next week so money will be tight, but I will for sure.

On Sun, Apr 20, 2014 at 3:42 AM, Josh kjthadon@gmail.com wrote:

Hello again.

Just wanted to say thank you again for putting this api together. I have had many hours of searching and trying to make something work before you introduced yours. I wanted to show you what I have done with it so far, and it you would like my code for it I would have no problem giving it.

Here I have a Clan Roster setup for my psn clan http://ngx2gaming.com/clan-roster/

By clicking on the PS3 or PS4 icon on the same row as any of the clan members, it should load the page with a popup and what I have done.

Thanks!

On Sat, Apr 19, 2014 at 12:27 AM, Josh kjthadon@gmail.com wrote:

Do you see the "extra" information when you search my account? PSN/KJThaDon

On Sat, Apr 19, 2014 at 12:26 AM, Josh kjthadon@gmail.com wrote:

The website I plan on running it on has caching, and cloudflare. I can just use cloudflare, right?

It's only randomly it will show me online status etc, only for my PSN name.. I tried others.. It's not even the name I linked in the source either.. Maybe because I've logged in on my name on my PC? or maybe I'm logged in..

Idk, it's weird.

These are the objects that only show sometimes, and only when I pull my PSN name.

->presence->primaryInfo->onlineStatus; ->presence->primaryInfo->lastOnlineDate; ->personalDetail->firstName; ->personalDetail->lastName; ->personalDetail->profilePictureUrl;

I would like to use at least "onlinestatus" but it does not seem I will be able to since it requires some authorization from the user, correct?

Thank you!

On Fri, Apr 18, 2014 at 11:31 PM, José A. Sächs < notifications@github.com> wrote:

@KJThaDon https://github.com/KJThaDon There's is an online flag if that person you're getting data for is either your friend with the account used by the script or has the privacy settings on public

— Reply to this email directly or view it on GitHubhttps://github.com/jhewt/gumer-psn/issues/2#issuecomment-40859618 .

jhewt commented 10 years ago

It is looking nice, keep the work coming!. I've started this back in December 2013, I started a web project for a gaming show in Argentina, a complete social experience with profiles full of gaming info, including XLive, Steam and PSN but since all the PSN API were gone by that time I started looking as you did and I ended up contacting a person that wanted me to sell "access". That is completely illegal under most countries' laws and of course it is against Sony's ToS. With no other choice I had to do reverse engineering (that is... also against the ToS) but I don't see the issue by making it public.

About the donation apparently nobody can send me anything to my PayPal account sadly.

"We are sorry. We are not able to complete personal payments to account holders in Argentina at this time"

My stupid government in all of it's glory.

KJThaDon commented 10 years ago

Thank you, I will definitely keep working on it. I plan on doing a separate full profile page with trophies etc, like you have on your site. Unfortunately I am only sufficient in html php javascript and css right now, so i'm trying to make it work with what I know and learn at the same time.

Nice! I would love to check it out if it's still active?

I did see a script on github sometime back that did something like that, although I can't remember the name now. I tried it out and from what I recall, everything worked besides psn.

That sucks about Paypal. Maybe setup a payment processor on your website for donations?

Also, are those "private" fields I was pulling not going to be accessible? As in onlineStatus ? That is the main one I would like to display, but I have a feeling it's not possible?

Thanks!

On Sun, Apr 20, 2014 at 5:25 PM, José A. Sächs notifications@github.comwrote:

It is looking nice, keep the work coming!. I've started this back in December 2013, I started a web project for a gaming show in Argentina, a complete social experience with profiles full of gaming info, including XLive, Steam and PSN but since all the PSN API were gone by that time I started looking as you did and I ended up contacting a person that wanted me to sell "access". That is completely illegal under most countries' laws and of course it is against Sony's ToS. With no other choice I had to do reverse engineering (that is... also against the ToS) but I don't see the issue by making it public.

About the donation apparently nobody can send me anything to my PayPal account sadly.

"We are sorry. We are not able to complete personal payments to account holders in Argentina at this time"

My stupid government in all of it's glory.

— Reply to this email directly or view it on GitHubhttps://github.com/jhewt/gumer-psn/issues/2#issuecomment-40905327 .

KJThaDon commented 10 years ago

Actually here is the logs..

λ heroku logs 2014-04-26T00:20:36.902623+00:00 heroku[web.1]: State changed from crashed to starting 2014-04-26T00:20:38.699833+00:00 heroku[web.1]: Starting process with command npm start 2014-04-26T00:20:39.989813+00:00 app[web.1]: 2014-04-26T00:20:39.989897+00:00 app[web.1]: > gumer-psn@0.1.1 start /app 2014-04-26T00:20:39.989900+00:00 app[web.1]: > node web.js 2014-04-26T00:20:39.989902+00:00 app[web.1]: 2014-04-26T00:20:40.336417+00:00 app[web.1]: 2014-04-26T00:20:40.324314+00:00 app[web.1]: Starting PSN 2014-04-26T00:20:40.337080+00:00 app[web.1]: ^ 2014-04-26T00:20:40.337050+00:00 app[web.1]: res.send({ 2014-04-26T00:20:40.339574+00:00 app[web.1]: at Module._compile (module.js:456:26) 2014-04-26T00:20:40.339568+00:00 app[web.1]: ReferenceError: res is not defined 2014-04-26T00:20:40.339572+00:00 app[web.1]: at Object. (/app/web.js:172:1) 2014-04-26T00:20:40.339585+00:00 app[web.1]: at node.js:902:3 2014-04-26T00:20:40.339583+00:00 app[web.1]: at startup (node.js:119:16) 2014-04-26T00:20:40.339576+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10) 2014-04-26T00:20:40.339579+00:00 app[web.1]: at Function.Module._load (module.js:312:12) 2014-04-26T00:20:40.339581+00:00 app[web.1]: at Function.Module.runMain (module.js:497:10) 2014-04-26T00:20:40.339578+00:00 app[web.1]: at Module.load (module.js:356:32) 2014-04-26T00:20:40.346729+00:00 app[web.1]: 2014-04-26T00:20:40.336766+00:00 app[web.1]: /app/web.js:172 2014-04-26T00:20:40.335937+00:00 app[web.1]: gumerPSN Example running at http://localhost:5000/ 2014-04-26T00:20:40.352593+00:00 app[web.1]: npm ERR! gumer-psn@0.1.1start: node web.js 2014-04-26T00:20:40.352846+00:00 app[web.1]: npm ERR! Exit status 8 2014-04-26T00:20:40.353078+00:00 app[web.1]: npm ERR! 2014-04-26T00:20:40.353305+00:00 app[web.1]: npm ERR! Failed at the gumer-psn@0.1.1 start script. 2014-04-26T00:20:40.353956+00:00 app[web.1]: npm ERR! This is most likely a problem with the gumer-psn package, 2014-04-26T00:20:40.354144+00:00 app[web.1]: npm ERR! not with npm itself. 2014-04-26T00:20:40.354321+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system: 2014-04-26T00:20:40.354512+00:00 app[web.1]: npm ERR! node web.js 2014-04-26T00:20:40.355150+00:00 app[web.1]: npm ERR! There is likely additional logging output above. 2014-04-26T00:20:40.355859+00:00 app[web.1]: npm ERR! command "/app/vendor/node/bin/node" "/app/vendor/node/bin/npm" "start" 2014-04-26T00:20:40.356110+00:00 app[web.1]: npm ERR! cwd /app 2014-04-26T00:20:40.354763+00:00 app[web.1]: npm ERR! You can get their info via: 2014-04-26T00:20:40.355408+00:00 app[web.1]: npm ERR! System Linux 3.8.11-ec2 2014-04-26T00:20:40.354946+00:00 app[web.1]: npm ERR! npm owner ls gumer-psn 2014-04-26T00:20:40.356365+00:00 app[web.1]: npm ERR! node -v v0.10.26 2014-04-26T00:20:40.356524+00:00 app[web.1]: npm ERR! npm -v 1.4.3 2014-04-26T00:20:40.356651+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2014-04-26T00:20:40.358106+00:00 app[web.1]: npm ERR! 2014-04-26T00:20:40.358284+00:00 app[web.1]: npm ERR! Additional logging details can be found in: 2014-04-26T00:20:40.358502+00:00 app[web.1]: npm ERR! /app/npm-debug.log 2014-04-26T00:20:40.358778+00:00 app[web.1]: npm ERR! not ok code 0 2014-04-26T00:20:41.713846+00:00 heroku[web.1]: Process exited with status 1 2014-04-26T00:20:41.722164+00:00 heroku[web.1]: State changed from starting to crashed 2014-04-26T00:21:10.019082+00:00 heroku[api]: Scale to web=1 by kjthadon@gmail.com 2014-04-26T00:21:17.193664+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=hidden-atoll-6612.herokuapp.comrequest_id=225bbc5f-26a6-4ebd-a176-f161e45dfb12 fwd="96.27.20.135" dyno= connect= service= status=503 bytes= 2014-04-26T00:21:17.984659+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host= hidden-atoll-6612.herokuapp.comrequest_id=085ac8a5-c2b2-47ad-af64-6b339264dac7 fwd="96.27.20.135" dyno= connect= service= status=503 bytes= 2014-04-26T00:21:20.883454+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=hidden-atoll-6612.herokuapp.comrequest_id=ed88e23a-7c4f-44cf-9fe4-03ab83556219 fwd="96.27.20.135" dyno= connect= service= status=503 bytes= 2014-04-26T00:21:21.328274+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host= hidden-atoll-6612.herokuapp.comrequest_id=097c8fa3-2b73-482d-995e-978483e75c16 fwd="96.27.20.135" dyno= connect= service= status=503 bytes= 2014-04-26T00:21:25.058442+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/PSN host=hidden-atoll-6612.herokuapp.comrequest_id=bd4b369d-22bc-4312-8205-7abe857f831c fwd="96.27.20.135" dyno= connect= service= status=503 bytes= 2014-04-26T00:21:25.367292+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host= hidden-atoll-6612.herokuapp.comrequest_id=ed05bc87-e163-4ea5-8bc2-9784dfa01816 fwd="96.27.20.135" dyno= connect= service= status=503 bytes= 2014-04-26T00:22:23.233423+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=hidden-atoll-6612.herokuapp.comrequest_id=1187c4c7-4486-40dc-82a9-a5ac114e8026 fwd="96.27.20.135" dyno= connect= service= status=503 bytes= 2014-04-26T00:22:24.046464+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host= hidden-atoll-6612.herokuapp.comrequest_id=6b1fe234-5074-48cf-84d1-53fe59d26317 fwd="96.27.20.135" dyno= connect= service= status=503 bytes= 2014-04-26T00:22:58.245740+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=hidden-atoll-6612.herokuapp.comrequest_id=de93750c-6bf9-46ca-b77b-d8e58b8933c7 fwd="96.27.20.135" dyno= connect= service= status=503 bytes= 2014-04-26T00:22:59.326945+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host= hidden-atoll-6612.herokuapp.comrequest_id=b791a77d-e6d8-450f-9db3-ba8b9ea0942b fwd="96.27.20.135" dyno= connect= service= status=503 bytes= 2014-04-26T00:46:53.084435+00:00 heroku[web.1]: State changed from crashed to starting 2014-04-26T00:46:54.759480+00:00 heroku[web.1]: Starting process with command npm start 2014-04-26T00:46:56.659268+00:00 app[web.1]: > gumer-psn@0.1.1 start /app 2014-04-26T00:46:56.659270+00:00 app[web.1]: > node web.js 2014-04-26T00:46:56.659248+00:00 app[web.1]: 2014-04-26T00:46:56.659271+00:00 app[web.1]: 2014-04-26T00:46:57.637199+00:00 app[web.1]: /app/web.js:172 2014-04-26T00:46:57.636461+00:00 app[web.1]: gumerPSN Example running at http://localhost:5000/ 2014-04-26T00:46:57.656783+00:00 app[web.1]: npm ERR! gumer-psn@0.1.1start: node web.js 2014-04-26T00:46:57.656955+00:00 app[web.1]: npm ERR! Exit status 8 2014-04-26T00:46:57.657082+00:00 app[web.1]: npm ERR! 2014-04-26T00:46:57.657187+00:00 app[web.1]: npm ERR! Failed at the gumer-psn@0.1.1 start script. 2014-04-26T00:46:57.657711+00:00 app[web.1]: npm ERR! This is most likely a problem with the gumer-psn package, 2014-04-26T00:46:57.658132+00:00 app[web.1]: npm ERR! You can get their info via: 2014-04-26T00:46:57.658221+00:00 app[web.1]: npm ERR! npm owner ls gumer-psn 2014-04-26T00:46:57.657988+00:00 app[web.1]: npm ERR! node web.js 2014-04-26T00:46:57.657890+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system: 2014-04-26T00:46:57.657804+00:00 app[web.1]: npm ERR! not with npm itself. 2014-04-26T00:46:57.658432+00:00 app[web.1]: npm ERR! System Linux 3.8.11-ec2 2014-04-26T00:46:57.658687+00:00 app[web.1]: npm ERR! command "/app/vendor/node/bin/node" "/app/vendor/node/bin/npm" "start" 2014-04-26T00:46:57.660052+00:00 app[web.1]: npm ERR! cwd /app 2014-04-26T00:46:57.660179+00:00 app[web.1]: npm ERR! node -v v0.10.26 2014-04-26T00:46:57.660418+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2014-04-26T00:46:57.660307+00:00 app[web.1]: npm ERR! npm -v 1.4.3 2014-04-26T00:46:57.661829+00:00 app[web.1]: npm ERR! 2014-04-26T00:46:57.658307+00:00 app[web.1]: npm ERR! There is likely additional logging output above. 2014-04-26T00:46:57.662217+00:00 app[web.1]: npm ERR! not ok code 0 2014-04-26T00:46:57.661967+00:00 app[web.1]: npm ERR! Additional logging details can be found in: 2014-04-26T00:46:57.662106+00:00 app[web.1]: npm ERR! /app/npm-debug.log 2014-04-26T00:46:57.636901+00:00 app[web.1]: 2014-04-26T00:46:57.637430+00:00 app[web.1]: res.send({ 2014-04-26T00:46:57.637432+00:00 app[web.1]: ^ 2014-04-26T00:46:57.625755+00:00 app[web.1]: Starting PSN 2014-04-26T00:46:57.639895+00:00 app[web.1]: at Object. (/app/web.js:172:1) 2014-04-26T00:46:57.639897+00:00 app[web.1]: at Module._compile (module.js:456:26) 2014-04-26T00:46:57.639898+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10) 2014-04-26T00:46:57.639892+00:00 app[web.1]: ReferenceError: res is not defined 2014-04-26T00:46:57.639899+00:00 app[web.1]: at Module.load (module.js:356:32) 2014-04-26T00:46:57.639901+00:00 app[web.1]: at Function.Module._load (module.js:312:12) 2014-04-26T00:46:57.639902+00:00 app[web.1]: at Function.Module.runMain (module.js:497:10) 2014-04-26T00:46:57.639903+00:00 app[web.1]: at startup (node.js:119:16) 2014-04-26T00:46:57.639904+00:00 app[web.1]: at node.js:902:3 2014-04-26T00:46:57.651454+00:00 app[web.1]: 2014-04-26T00:46:59.248570+00:00 heroku[web.1]: State changed from starting to crashed 2014-04-26T00:46:59.235229+00:00 heroku[web.1]: Process exited with status 1

On Thu, Apr 24, 2014 at 1:33 PM, Josh kjthadon@gmail.com wrote:

Hello,

Been working on a page. Believe me this takes me time since i'm still learning lol

http://ngx2gaming.com/psn/trophies.php?psnid=KJThaDon

Let me know what you think. I am still working on it as I type though and it will look a lot better eventually :)

also, can we show if a person is online ?

Thank you!

On Sun, Apr 20, 2014 at 8:29 PM, Josh kjthadon@gmail.com wrote:

Thank you, I will definitely keep working on it. I plan on doing a separate full profile page with trophies etc, like you have on your site. Unfortunately I am only sufficient in html php javascript and css right now, so i'm trying to make it work with what I know and learn at the same time.

Nice! I would love to check it out if it's still active?

I did see a script on github sometime back that did something like that, although I can't remember the name now. I tried it out and from what I recall, everything worked besides psn.

That sucks about Paypal. Maybe setup a payment processor on your website for donations?

Also, are those "private" fields I was pulling not going to be accessible? As in onlineStatus ? That is the main one I would like to display, but I have a feeling it's not possible?

Thanks!

On Sun, Apr 20, 2014 at 5:25 PM, José A. Sächs notifications@github.comwrote:

It is looking nice, keep the work coming!. I've started this back in December 2013, I started a web project for a gaming show in Argentina, a complete social experience with profiles full of gaming info, including XLive, Steam and PSN but since all the PSN API were gone by that time I started looking as you did and I ended up contacting a person that wanted me to sell "access". That is completely illegal under most countries' laws and of course it is against Sony's ToS. With no other choice I had to do reverse engineering (that is... also against the ToS) but I don't see the issue by making it public.

About the donation apparently nobody can send me anything to my PayPal account sadly.

"We are sorry. We are not able to complete personal payments to account holders in Argentina at this time"

My stupid government in all of it's glory.

— Reply to this email directly or view it on GitHubhttps://github.com/jhewt/gumer-psn/issues/2#issuecomment-40905327 .

jhewt commented 10 years ago

Can you post the web.js code?