ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 208 forks source link

"SSLv3 methods disabled" Error #256

Closed ldarren closed 8 years ago

ldarren commented 8 years ago

nodejs version: 6.1 node-gcm:0.14.3 os:ubuntu-server 14.4

it was ok with nodejs version 4, after updated to 6.1,

gcmSender.send(msg, ids, retry, (err)=>{
  if (err) return console.error(err) // SSLv3 methods disabled
})

anyone facing the same error?

hypesystem commented 8 years ago

This is very weird! How exactly are you seeing that the SSLv3 methods are disabled?

ldarren commented 8 years ago

This is the full error msg

Error: SSLv3 methods disabled at Error (native) at new SecureContext (_tls_common.js:24:20) at Object.createSecureContext (_tls_common.js:43:11) at Object.exports.connect (_tls_wrap.js:997:48) at Agent.createConnection (https.js:82:22) at Agent.createSocket (_http_agent.js:182:26) at Agent.addRequest (_http_agent.js:144:10) at new ClientRequest (_http_client.js:158:16) at Object.exports.request (http.js:31:10) at Object.exports.request (https.js:199:15)

are you using nodejs 6 lts?

ldarren commented 8 years ago

I searched the internet, i couldn't find similar case, this closest issue i can find is https://github.com/nodejs/node/issues/3695

hypesystem commented 8 years ago

I just updated to most recent node (6.2.2) and I am not getting this error.

What are the values you are using for msg, ids, retry? (Obviously don't share anything secret, but what type of arguments are they?)

How did you instantiate your Sender? Did you pass it any options for the underlying request?

ldarren commented 8 years ago

we found the culprit! it is this line https.globalAgent.options.secureProtocol = 'SSLv3_method'

we added it to support an old oauth server some time ago

hypesystem commented 8 years ago

@ldarren great that you solved it! Just to be sure: is it correct that this was something in your code, that you have now removed? :smile:

ldarren commented 8 years ago

Yes it was in my code, it has nothing to do with node-gcm