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
userid is null #531
Comments
@fatemeh2sh If |
@jkasten2 i use in code @Override
public void onOSSubscriptionChanged(OSSubscriptionStateChanges stateChanges) {
if (!stateChanges.getFrom().getSubscribed() &&
stateChanges.getTo().getSubscribed()) {
new AlertDialog.Builder(this)
.setMessage("You've successfully subscribed to push notifications!")
.show();
// get player ID
stateChanges.getTo().getUserId();
}
Log.i("Debug", "onOSPermissionChanged: " + stateChanges);
} but userId return null. why userid return null?? get error: OneSignalRestClient: null Error thrown from network stack.
javax.net.ssl.SSLHandshakeException: Handshake failed
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:392)
at com.android.okhttp.Connection.upgradeToTls(Connection.java:1285)
at com.android.okhttp.Connection.connect(Connection.java:1197)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:392)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:295)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:491)
at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)
at com.onesignal.OneSignalRestClient.startHTTPConnection(OneSignalRestClient.java:146)
at com.onesignal.OneSignalRestClient.access$100(OneSignalRestClient.java:38)
at com.onesignal.OneSignalRestClient$4.run(OneSignalRestClient.java:94)
at java.lang.Thread.run(Thread.java:818)
Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xaec24200: Failure in SSL library, usually a protocol error
error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol (external/openssl/ssl/s23_clnt.c:740 0xaf056679:0x00000000)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:320)
... 13 more |
@fatemeh2sh This |
@jkasten2 i did, i opened browser and load onesignal.com . |
@fatemeh2sh Could provide a few more details.
The issue seems to be the device is trying to use an unsupported version of SSL. okhttp does have so more detail on this as well. square/okhttp#1628 Google has made a number of changes in Android 5. Some details here too |
@jkasten2 hi , my phone is glaxay note 3, with android 5. |
@fatemeh2sh Thanks for the device info. Have you tested on any other devices? Can you test on an emulator as well? Are you seeing this issue on both WiFi and a cell 3g/4g connection? |
@jkasten2 i tested on emulator with android 5 and return userId correctly, |
@fatemeh2sh I recommend making sure the date and time is correct on the device as this can cause SSL errors. If that is not the issue then it must be an issue with the your cell provider or ISP blocking or malforming the SSL handshake |
Closing due to inactivity, please provide more details if you believe the above isn't the case. Thanks. |
i have problem with userid in oneSignal.
OSPermissionSubscriptionState status = OneSignal.getPermissionSubscriptionState();
String userID = status.getSubscriptionStatus().getUserId();
boolean isSubscribed = status.getSubscriptionStatus().getSubscribed();
return userID to null in some phone
this is json
{
"permissionStatus": {
"enabled": true
},
"subscriptionStatus": {
"userId":null,
"pushToken": null,
"userSubscriptionSetting": false,
"subscribed": true
},
"emailSubscriptionStatus": {
"emailUserId": null,
"emailAddress": null,
"subscribed": false
}
}
The text was updated successfully, but these errors were encountered: