i am using the caret package. At specific instances, as for example, but not exclusively per the example below, caret will produce the following error: 

```
Something is wrong; all the ROC metric values are missing:
Error in train.default(x, y, weights = w, ...) : Stopping

```

The strange thing is that caret might do this with nearly identical calls. E.g. - the first call per below works, the second call gives an error. i have had similar issue when i included e.g. the Verbose argument, keeping all things equal, or when i run specific packages in caret (e.g. SVMs). 

I have read that the issue might be definition of the class variable, but my main variable is a standard factor with 2 levels, e.g. (Factor w/ 2 levels "NP","P": 1 1 1 1 1 1 1 1 1 1 ...). 

Does anyone have any tips? 

(apologies for not including reproducible example)

```
Call 1
gbmFit1 <- train(class ~., data = dt_fulltrain,method = "gbm",metric="ROC",trControl = fitControl)

Call2
gbmFit1 <- train(class ~., data = dt_fulltrain,method = "gbm",metric="ROC",trControl = fitControl, strata = dt_fulltrain$class, sampsize = rep(nmin, 2))

```