jhewt / gumer-psn

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

Error upon login #7

Closed znetstar closed 9 years ago

znetstar commented 10 years ago

I'm getting an error attempting to run the example:

gPSN | ERROR: {"error":"invalid_grant","error_description":"Bad request","docs":"http://docs.auth.api.ac.playstation.net/oauth/token","error_code":1}

jhewt commented 10 years ago

It is working for now, I just checked. Are your account details correct? Remember that the {{ }} only are there for telling you that you should replace it with your actual details, without the {{}}

znetstar commented 10 years ago

I made sure not to include the brackets. Hmmm, is it possibly because I'm trying it with a new account? I've logged in successfully on my Android. If needed I can provide the account details (I've setup a "dummy" account for using this library).

jhewt commented 10 years ago

I am not really sure if the source of the problem is the account because that's a request error rather than an invalid auth code. What version of the request module you have installed? Check it out with npm like this

npm list

It should return something like this but with express (I've installed express globaly)

gumer-psn@0.1.2 H:\Jose\GitHub\gumer-psn
└─┬ request@2.36.0
  ├── aws-sign2@0.5.0
  ├── forever-agent@0.5.2
  ├─┬ form-data@0.1.3
  │ ├── async@0.9.0
  │ └─┬ combined-stream@0.0.4
  │   └── delayed-stream@0.0.5
  ├─┬ hawk@1.0.0
  │ ├── boom@0.4.2
  │ ├── cryptiles@0.2.2
  │ ├── hoek@0.9.1
  │ └── sntp@0.2.4
  ├─┬ http-signature@0.10.0
  │ ├── asn1@0.1.11
  │ ├── assert-plus@0.1.2
  │ └── ctype@0.5.2
  ├── json-stringify-safe@5.0.0
  ├── mime@1.2.11
  ├── node-uuid@1.4.1
  ├── oauth-sign@0.3.0
  ├── qs@0.6.6
  ├─┬ tough-cookie@0.12.1
  │ └── punycode@1.2.4
  └── tunnel-agent@0.4.0

The lastest is 2.36.0 and works fine with gumer-psn at the moment

znetstar commented 10 years ago

Running npm list I get └─┬ request@2.36.0 ├── aws-sign2@0.5.0 ├── forever-agent@0.5.2 ├─┬ form-data@0.1.3 │ ├── async@0.9.0 │ └─┬ combined-stream@0.0.4 │ └── delayed-stream@0.0.5 ├─┬ hawk@1.0.0 │ ├── boom@0.4.2 │ ├── cryptiles@0.2.2 │ ├── hoek@0.9.1 │ └── sntp@0.2.4 ├─┬ http-signature@0.10.0 │ ├── asn1@0.1.11 │ ├── assert-plus@0.1.2 │ └── ctype@0.5.2 ├── json-stringify-safe@5.0.0 ├── mime@1.2.11 ├── node-uuid@1.4.1 ├── oauth-sign@0.3.0 ├── qs@0.6.6 ├─┬ tough-cookie@0.12.1 │ └── punycode@1.2.4 └── tunnel-agent@0.4.0

On Thu, Jun 5, 2014 at 1:57 AM, José A. Sächs notifications@github.com wrote:

I am not really sure if the source of the problem is the account because that's a request error rather than an invalid auth code. What version of the request module you have installed? Check it out with npm like this

npm list

It should return something like this but with express (I've installed express globaly)

gumer-psn@0.1.2 H:\Jose\GitHub\gumer-psn └─┬ request@2.36.0 ├── aws-sign2@0.5.0 ├── forever-agent@0.5.2 ├─┬ form-data@0.1.3 │ ├── async@0.9.0 │ └─┬ combined-stream@0.0.4 │ └── delayed-stream@0.0.5 ├─┬ hawk@1.0.0 │ ├── boom@0.4.2 │ ├── cryptiles@0.2.2 │ ├── hoek@0.9.1 │ └── sntp@0.2.4 ├─┬ http-signature@0.10.0 │ ├── asn1@0.1.11 │ ├── assert-plus@0.1.2 │ └── ctype@0.5.2 ├── json-stringify-safe@5.0.0 ├── mime@1.2.11 ├── node-uuid@1.4.1 ├── oauth-sign@0.3.0 ├── qs@0.6.6 ├─┬ tough-cookie@0.12.1 │ └── punycode@1.2.4 └── tunnel-agent@0.4.0

The lastest is 2.36.0 and works fine with gumer-psn at the moment

— Reply to this email directly or view it on GitHub https://github.com/jhewt/gumer-psn/issues/7#issuecomment-45183549.

xXREDXIIIIXx commented 10 years ago

@jhewt this problem randomly happens on the PHP version of this too. I'm not too sure why either.

@znetstar you have done nothing wrong it will go away by its self.

It may take up-to 12 hours for this to bug to disappear (my experience) also while that was happening I still had full access to the app and my PS4 so it wasn't like my account was blocked or anything so there must be something missing somewhere :)

EDIT: talking about this seems to have triggered this for me again today :/

you can still access all functions if you have the access_token, but the login just produces errors. (I use the PHP version)

znetstar commented 10 years ago

Thanks for the rapid responses! I'll try again in a couple of hours. Great project btw, have been looking for something like this for awhile.

On Thu, Jun 5, 2014 at 5:10 AM, xXREDXIIIIXx notifications@github.com wrote:

@jhewt https://github.com/jhewt this problem randomly happens on the PHP version of this too. I'm not too sure why either.

@znetstar https://github.com/znetstar you have done nothing wrong it will go away by its self.

It may take up-to 12 hours for this to bug to disappear (my experience) also while that was happening I still had full access to the app and my PS4 so it wasn't like my account was blocked or anything so there must be something missing somewhere :)

— Reply to this email directly or view it on GitHub https://github.com/jhewt/gumer-psn/issues/7#issuecomment-45197207.

jhewt commented 10 years ago

How many request per second are you guys doing? I recall there was a small throttling in PSN's servers. Next version will have a cache backend to avoid excesive requests.

Thank you @znetstar for the donation, I really appreciate it!