KernelPCA produces NaNs
The NaNs are produced because the eigenvalues (self.lambdas_) of the input matrix are negative which provoke the ValueError as the square root does not operate with negative values.
The issue might be overcome by setting KernelPCA(remove_zero_eig=True, ...) but such action would not preserve the original dimensionality of the data. Using this parameter is a last resort as the model's results may be skewed.
Actually, it has been stated negative eigenvalues indicate a model misspecification, which is obviously bad. Possible solution for evading that fact without corroding the dimensionality of the data with remove_zero_eig parameter might be reducing the quantity of the original features, which are greatly correlated. Try to build the correlation matrix and see what those values are. Then, try to omit the redundant features and fit the KernelPCA() again.
After applying KernelPCA to my data and passing it to a classifier (SVC) I'm getting the following error:

ValueError: Input contains NaN, infinity or a value too large for
  dtype('float64').

and this warning while performing KernelPCA:

RuntimeWarning: invalid value encountered in sqrt X_transformed =
  self.alphas_ * np.sqrt(self.lambdas_)

Looking at the transformed data I've found several nan values.
It makes no difference which kernel I'm using. I tried cosine, rbf and linear.
But what's interesting:

My original data only contains values between 0 and 1 (no inf or nan), it's scaled with MinMaxScaler
Applying standard PCA works, which I thought to be the same as KernelPCA with linear kernel.

Some more facts:

My data is high dimensional ( > 8000 features) and mostly sparse.
I'm using the newest version of scikit-learn, 18.2 

Any idea how to overcome this and what could be the reason?