Google Nearby Connections 2.0 sometime ask for Bluetooth pairing PIN number

During testing of Google Nearby Connections 2.0 using the sample walkie-talkie program in automatic mode, sometimes the device will ask for Bluetooth pairing pin number. I have seen two scenarios:

  1. Only one device has a pop-up dialog asking for pin. Enter any data or dismiss the dialog will cause the connection to fail

  2. Both devices have pop-up dialogs. One to ask for setting up pin and other ask to enter the pin. After pin has been entered, the connection was a success.

Senario 1 happens more often.

How can I avoid this problem? I can not find any information on the Nearby Connections 2.0 SDK documentation.