You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
SSL handshake time out when loading style results in black screen #4090
changed the title [-]map is black when failed to connect to api.mapbox.com about Android SDK[/-][+]SSL handshake time out when loading style results in black screen[/+]on Feb 25, 2016
@Trinea I have never seen this bug locally here or haven't seen any reports by other users. Since the message indicates a timeout, this has something to do with a bad internet connection and should not occur during normal usage.
Hi, @tobrun I am in China, so there may be a little delay of network.
But it's ok most of the time, it occurs our morning 10:00-11:00 about and 3:00-4:00 pm often, Is your server tuning this time. Our timezone twelve hours faster than you.
Been looking into the issue and what we do in cases of timeouts.
When such a connection problem occurs we pass a CONNECTION_ERROR down to mbgl:
@OverridepublicvoidonFailure(Callcall, IOExceptione) {
Log.w(LOG_TAG, String.format("[HTTP] Request could not be executed: %s", e.getMessage()));
inttype = PERMANENT_ERROR;
if ((einstanceofUnknownHostException) || (einstanceofSocketException) || (einstanceofProtocolException) || (einstanceofSSLException)) {
type = CONNECTION_ERROR;
} elseif ((einstanceofInterruptedIOException)) {
type = TEMPORARY_ERROR;
}
StringerrorMessage = e.getMessage() != null ? e.getMessage() : "Error processing the request";
mLock.lock();
if (mNativePtr != 0) {
nativeOnFailure(type, errorMessage);
}
mLock.unlock();
}
In case of such an error we are retrying the request up to 3 times with an exponential back off.
This will result in retrying in 1s, 2s, 4s and 16s. This is following the general standards related to timeouts and there is actually not much we can do in this case and circumvent this error would be a security risk because it means the other end cannot be trusted and the data could be intercepted by 3rd parties.
There is off course the possibility to build a version of mbgl yourself that ignores this error but this is something we highly encourage you not to do due to security reasons mentioned above.
Thank you @ControlTheBit for the report. Considering the age of this ticket, could you open a new ticket including any information that could be useful to reproduce the issue on our end? Thanks!
Activity
tobrun commentedon Feb 25, 2016
Removing android tag, since this is something related to core and will have also have impact on iOS.
[-]map is black when failed to connect to api.mapbox.com about Android SDK[/-][+]SSL handshake time out when loading style results in black screen[/+]Trinea commentedon Feb 25, 2016
Hi, @tobrun , Does this bug will be resolved in 4.0.0?
tobrun commentedon Feb 25, 2016
@Trinea I have never seen this bug locally here or haven't seen any reports by other users. Since the message indicates a timeout, this has something to do with a bad internet connection and should not occur during normal usage.
Trinea commentedon Feb 26, 2016
Hi, @tobrun I am in China, so there may be a little delay of network.
But it's ok most of the time, it occurs our morning 10:00-11:00 about and 3:00-4:00 pm often, Is your server tuning this time. Our timezone twelve hours faster than you.
Trinea commentedon Mar 1, 2016
@tobrun Whether you tuning server of api.mapbox.com sometimes, so cannot connect to api.mapbox.com then.
I thought you can tested when api.mapbox.com is not connected, then the map will black.
Trinea commentedon Mar 8, 2016
@tobrun
Map is black again, log is above, network is ok
tobrun commentedon Mar 8, 2016
Been looking into the issue and what we do in cases of timeouts.
When such a connection problem occurs we pass a
CONNECTION_ERRORdown to mbgl:In case of such an error we are retrying the request up to 3 times with an exponential back off.
This will result in retrying in 1s, 2s, 4s and 16s. This is following the general standards related to timeouts and there is actually not much we can do in this case and circumvent this error would be a security risk because it means the other end cannot be trusted and the data could be intercepted by 3rd parties.
There is off course the possibility to build a version of mbgl yourself that ignores this error but this is something we highly encourage you not to do due to security reasons mentioned above.
zugaldia commentedon Mar 11, 2016
Hey @Trinea I'd love to gather more information on this issue. Is this timeout something that you're observing on a particular network?
Also, we're releasing offline maps functionality soon, this could help mitigate the issue. You can find more information on the current functionality here: https://www.mapbox.com/help/mobile-offline/
tobrun commentedon Mar 14, 2016
@ianshward
Could we have your 👀 on this?
From SDK point of view we are doing the appropriate thing here.
Trinea commentedon Mar 14, 2016
@zugaldia it's ok most of the time, it occurs our morning 10:00-11:00 about and 3:00-4:00 pm often. Our timezone twelve hours faster than you.
This may due to China's firewall
leobut commentedon Nov 5, 2019
I also had this issue today at 13:27 UTC, Iceland - Android 9.
Dependency: com.mapbox.mapboxsdk:mapbox-android-sdk:5.4.1
zugaldia commentedon Nov 12, 2019
Thank you @ControlTheBit for the report. Considering the age of this ticket, could you open a new ticket including any information that could be useful to reproduce the issue on our end? Thanks!