API-Examples-Web icon indicating copy to clipboard operation
API-Examples-Web copied to clipboard

Why Server agora java can't use uid ??

Open tientai241102 opened this issue 4 years ago • 2 comments
trafficstars

Why Server agora java can't use uid ?? I was test use uid but token was generated can't use to join channel. If I don't use uid and uid has value 0, This token was generated can use to join channel.

I don't know any server has this problem but if you has problem with token, I can set uid = 0.

tientai241102 avatar Jul 16 '21 02:07 tientai241102

According to the FAQ of string type user names, currently users can not mix parameter types within the same channel.

A common reason for the issue may due to the mixed parameter types(String and int) for user ID. Agora server will generate a user ID(as a 32-bit signed integer) if the user ID value is not assigned or set to 0 according to the Java API reference.

As a workaround, you may:

  • Modify code logic and assign users only with uids with a 32-bit unsigned integer with a value ranging from 1 to (2^32-1).
  • If it's necessary to use String type for uid, please assign all users with uids with String type.

yuna-ran avatar Jul 16 '21 06:07 yuna-ran

oh. Thank you very much.

tientai241102 avatar Jul 18 '21 13:07 tientai241102