Agora-Flutter-SDK icon indicating copy to clipboard operation
Agora-Flutter-SDK copied to clipboard

5.3 Android - error joining a call: "PlatformException (PlatformException(, Not except type: uid, null, null))"

Open dgilperez opened this issue 3 years ago • 7 comments

After upgrading, when I try to join a call I get this PlatformException

Not except type: uid

This is not happening on 5.2, without any other change.

This happens when calling joinChannel(null, channelName, null, uid)

To Reproduce Steps to reproduce the behavior:

  1. Wrap your join call on a try-catch
  2. Join a call
  3. See error captured

Expected behavior

Joining a call to proceed.

  • Flutter 3.0.5
  • Device: Poco M3
  • OS: Android

dgilperez avatar Jul 22 '22 17:07 dgilperez

Can you show more detail about the stack trace of this exception?

littleGnAl avatar Jul 24 '22 12:07 littleGnAl

that´s the stacktrace with the error @dgilperez commented

[0m [log] [31m PlatformException(, Not except type: uid, null, null) [0m [log] [31m #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7) #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:167:18) <asynchronous suspension> #2 _LiveVideoViewState._startAgora (package:rosita/features/live/live_video_view.dart:128:9) <asynchronous suspension> [0m

acanteroruiz avatar Jul 25 '22 09:07 acanteroruiz

@acanteroruiz Can you share what's the type of uid?

littleGnAl avatar Jul 25 '22 09:07 littleGnAl

Hi @littleGnAl , uId is type String

acanteroruiz avatar Jul 25 '22 09:07 acanteroruiz

@acanteroruiz is correct. What more information do you need?

For reference, our current status is of major blockade:

  • Flutter 3 will not work with Agora 4.2 (android will not compile). We're already in flutter 3.
  • Agora 5.3, will not work for Android (this issue) nor iOS (crash seen in other issues here)
  • Agora 5.2, crashes with iOS

Are you aware of this? Is there anything we can do to work around this blockade? Can you share some timeline on potential fixes from your side? We need to plan the next release ...

Thanks

dgilperez avatar Jul 26 '22 07:07 dgilperez

The uid should be int for the joinChannel function.

I'm not sure why the uid with String type works with the joinChannel function in your case if you need to use uid of String type you should use the joinChannelWithUserAccount function.

Here an example: https://github.com/AgoraIO/Agora-Flutter-SDK/blob/f76a0563482a5f3ff973e4e2cff802f04d57f5ef/example/lib/examples/basic/string_uid/string_uid.dart#L74

littleGnAl avatar Jul 26 '22 07:07 littleGnAl

@littleGnAl sorry for the confusion - joinChannel is in deed accepting an int as uid.

We are now able to operate apparently without issues. As you suggested, we moved from joinChannel to joinChannelWithUserAccount and suddenly everything works.

Digging this a bit deeper, it seems both methods use different API endpoints. A bit surprising if you ask me, but that's also probably a good hint for someone more knowledgeable to dig deeper: the first method is totally broken for us, the second works.

dgilperez avatar Jul 27 '22 06:07 dgilperez

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

github-actions[bot] avatar Aug 22 '22 03:08 github-actions[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.

github-actions[bot] avatar Apr 28 '23 11:04 github-actions[bot]