cordova-plugin-device icon indicating copy to clipboard operation
cordova-plugin-device copied to clipboard

UUID in debug and release mode is different

Open kyoz opened this issue 6 years ago • 2 comments

Bug Report

Problem

What is expected to happen?

UUID is the same when debug and release cause that's uuid of device, doesn't have any thing relative to the app

What does actually happen?

In development, build debug, release, they have different UUID, is this valid ?

Environment, Platform, Device

Environment: Linux Platform: Android Device: Xiaomi Mi 8 Lite

Version information

Everything is latest SDK 26 (OREO)

Checklist

  • [x] I searched for existing GitHub issues
  • [x] I updated all Cordova tooling to most recent version
  • [x] I included all the necessary information above

kyoz avatar Dec 06 '19 10:12 kyoz

This doesn't seem to be a bug, but rather an expected behavior: unfortunately UUIDs may change between app installs (which you perform when you switch between debug and release).

References for iOS: StackOverflow, Apple docs

References for Android: StackOverflow, Android docs

ericgopak avatar Oct 28 '20 12:10 ericgopak

Thank you @ericgopak for investigating and providing links to relevant documentations. It does appear that this is the expected behaviour.

I think the Cordova documentation is out-dated:

The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.

I believe this may be remnants of how UUIDs worked on Android Pre API 26, where the UUIDs were essentially completely based on signing key so as long as the same signing key, you had the same UUID. Since Google Play requires API >= 29 (Effective November), I think we can update our documentation. PRs are welcome for anybody willing to make this change.

breautek avatar Oct 28 '20 12:10 breautek

This has been documented, so closing https://github.com/apache/cordova-plugin-device#android-quirk

jcesarmobile avatar Sep 06 '22 19:09 jcesarmobile