Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agora flutterweb Error: TypeError: "{USERID}": type 'String' is not a subtype of type 'num #1850

Open
3 of 5 tasks
danilo1998271 opened this issue Jun 19, 2024 · 3 comments
Open
3 of 5 tasks
Labels
bug Something isn't working keep track platform-web

Comments

@danilo1998271
Copy link

danilo1998271 commented Jun 19, 2024

Version of the agora_rtc_engine

^6.3.2

Platforms affected

  • Android
  • iOS
  • macOS
  • Windows
  • Web

Steps to reproduce

  1. User 1 and User 2 joins the channel using joinChannelWithUserAccount
  2. User 1 is from flutter web cant hear User 2 from unity but User 2 can hear User 1.
  3. When speaking to the microphone using User 2 an error appears in User 1 saying "safeEmit event:user-info-updated error Error: TypeError: "{USERID}": type 'String' is not a subtype of type 'num?'"

Expected results

User 1(flutterweb) and User 2(unity) can hear each other

Actual results

User 1(flutterweb) can hear User 2(unity), but User 2(unity) can hear User 1(flutterweb)

Code sample

Code sample
[Paste your code here]

Screenshots or Video

joining of user in flutter web
_joinChannel() async {
isLiveSession.value = true;
await [
Permission.microphone,
].request();
if (kDebugMode) {
print("Agora RTC: joining channel");
}
await _engine.joinChannelWithUserAccount(
token: rtcToken,
channelId: rtcChannelName,
userAccount: authC.getUid(),
options: const ChannelMediaOptions(
publishScreenTrack: false,
publishSecondaryScreenTrack: true,
publishCameraTrack: false,
publishMicrophoneTrack: true,
publishScreenCaptureAudio: true,
publishScreenCaptureVideo: true,
publishRhythmPlayerTrack: true,
publishMediaPlayerAudioTrack: true,
publishMixedAudioTrack: true,
publishCustomAudioTrack: true,
autoSubscribeAudio: true,
enableAudioRecordingOrPlayout: true,
clientRoleType: ClientRoleType.clientRoleBroadcaster,
),
);
await _engine.adjustRecordingSignalVolume(100);
await _engine.adjustPlaybackSignalVolume(100);
await _engine.muteLocalAudioStream(false);
sessionStatusText.value = "Audio-only $sessionTypeText is running.";
}

joining of user in unity
// Enable the video module.
RtcEngine.EnableVideo();
RtcEngine.EnableAudio();
RtcEngine.EnableLocalVideo(false);
RtcEngine.EnableLocalAudio(true);

RtcEngine.SetParameters("{"che.audio.keep.audiosession": true}");

placeHolder.gameObject.SetActive(true);
placeHolder.text = "Joining session...";
remoteViewcover.SetActive(true);
LiveSessionPanel.SetActive(true);

// Set the user role as audience.
RtcEngine.SetClientRole(CLIENT_ROLE_TYPE.CLIENT_ROLE_BROADCASTER);

Debug.Log("Agora: Joining channel");
RtcEngine.RegisterLocalUserAccount(_appID, userId);
// Join a channel.
RtcEngine.JoinChannelWithUserAccount(token, channelName, userId);
RtcEngine.MuteLocalAudioStream(true);

Logs

safeEmit event:user-info-updated error Error: TypeError: "{USERID}": type 'String' is not a subtype of type 'num?'

Flutter Doctor output

Doctor output
[Paste your output here]
@danilo1998271 danilo1998271 changed the title Error: TypeError: "E7ZX7w0XMzPIWEa4obLwL6aeDiH2": type 'String' is not a subtype of type 'num Agora flutterweb Error: TypeError: "E7ZX7w0XMzPIWEa4obLwL6aeDiH2": type 'String' is not a subtype of type 'num Jun 19, 2024
@danilo1998271 danilo1998271 changed the title Agora flutterweb Error: TypeError: "E7ZX7w0XMzPIWEa4obLwL6aeDiH2": type 'String' is not a subtype of type 'num Agora flutterweb Error: TypeError: "{USERID}": type 'String' is not a subtype of type 'num Jun 19, 2024
@guoxianzhe
Copy link
Contributor

@danilo1998271 When using a string uid, there is no issue with web-to-web communication. However, problems may arise when communicating between web and native platforms. It is recommended to use a numerical uid to avoid these issues.
Maybe we will fix this issues in the feature.

@danilo1998271
Copy link
Author

Is there a work around in our case we need to use string uid in our unity app and in flutter web?

@littleGnAl
Copy link
Contributor

It's so sorry that there's no workaround for this issue at this time.

@littleGnAl littleGnAl added platform-web bug Something isn't working keep track labels Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working keep track platform-web
Projects
None yet
Development

No branches or pull requests

3 participants