We are doing automation testing on mobile devices with Appium but testing fails because of the popup 'Allow USB debugging' even though the device is already connected through 'adb connect' and 'adb devices.' I already checked the 'Always allow from this computer' but sometimes the popup would occur causing the test to fail and sometimes it will pass when it will not show up. Can someone enlighten me on how to address this issue?
In my case, I was continually getting prompted with one fingerprint. I revoked all debugging permissions and next time the dialog popped up, I noticed the fingerprint had changed. So far I haven't been prompted again.
So: try revoking all debug permissions and then allowing USB debugging again.
One possibility for this problem may be located on PC side: May be you are running multiple adb daemons with different private keys. The private key is used for identifying the "this computer".
Another possibility would be a problem on device side that e.g. the adb server crashes and losses the data on previous authorized computers. Or it may be a bug in adb that causes the identification of the computer to fail.