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

PlatformException(-17, request to join channel is rejected, null, null) Or when I end the call PlatformException(-7, , null, null) #92

Closed
waqadArshad opened this issue Jun 26, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@waqadArshad
Copy link

waqadArshad commented Jun 26, 2022

@maxxfrazer @Meherdeep

First of all, thanks a lot for this fantastic package and its regular maintenance.
I am getting the following error sometimes.

PlatformException(-17, request to join channel is rejected, null, null)

I also get this log every time, even if I successfully join the call

[log] Error while initializing Agora RTC SDK

This is the partial console output that I am getting after initiating the call:

I/AudioManager(20303): In isBluetoothScoOn(), calling application: com.example.nikah_match
E/CheckPermission(20303): _bluetooth code = 3 
D/BluetoothHeadset(20303): Binding service...
E/CheckPermission(20303): _bluetooth code = 11 
E/CheckPermission(20303): _bluetooth code = 3 
D/BluetoothA2dp(20303): Binding service...
D/agora-jni(20303): android bridge create done...
E/libc    (20303): Access denied finding property "net.dns1"
E/libc    (20303): Access denied finding property "net.dns2"
E/libc    (20303): Access denied finding property "net.dns3"
E/libc    (20303): Access denied finding property "net.dns4"
D/spdlog  (20303): [2022-06-26 18:56:16.377] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/android/iris_rtc_engine_impl_android.cc:186 CallApi Android RtcEngine handle 502091976576
D/spdlog  (20303): [2022-06-26 18:56:16.377] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:114 CallApi ret 0 result 
E/libc    (20303): Access denied finding property "net.dns1"
E/libc    (20303): Access denied finding property "net.dns2"
E/libc    (20303): Access denied finding property "net.dns3"
E/libc    (20303): Access denied finding property "net.dns4"
W/PlatformViewsController(20303): Creating a virtual display of size: [720, 1512] may result in problems(https://github.com/flutter/flutter/issues/2897).It is larger than the device screen size: [720, 1456].
D/spdlog  (20303): [2022-06-26 18:56:16.463] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:104 CallApi api_type 132 params {"code":1}
D/spdlog  (20303): [2022-06-26 18:56:16.463] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:114 CallApi ret 0 result general failure
W/        (20303): general failure
D/spdlog  (20303): [2022-06-26 18:56:16.464] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:104 CallApi api_type 132 params {"code":1}
D/spdlog  (20303): [2022-06-26 18:56:16.464] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:114 CallApi ret 0 result general failure
W/        (20303): general failure
D/spdlog  (20303): [2022-06-26 18:56:16.486] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:129 CallApi api_type 20 params {"canvas":{"uid":0,"channelId":null,"renderMode":4,"mirrorMode":0}}
D/spdlog  (20303): [2022-06-26 18:56:16.486] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:139 CallApi ret 0 result 
D/ColorViewRootUtil(20303): initSwipState, isDisplayCompatApp false
D/ColorViewRootUtil(20303): don't initSwipState because display 404 is not default display
D/WindowManager(20303): Add to mViews: DecorView@7cbdd47[MainActivity], this = android.view.WindowManagerGlobal@85513eb,pkg= com.example.nikah_match
D/spdlog  (20303): [2022-06-26 18:56:16.534] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:104 CallApi api_type 162 params {"appType":4}
D/spdlog  (20303): [2022-06-26 18:56:16.535] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:114 CallApi ret 0 result 
W/ple.nikah_matc(20303): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
I/PswFrameworkFactoryImpl(20303): get feature:IPswScreenModeFeature
I/AGORA_SDK(20303): Surface changed to width 720 height 1512
D/spdlog  (20303): [2022-06-26 18:56:16.569] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:104 CallApi api_type 127 params {}
D/spdlog  (20303): [2022-06-26 18:56:16.569] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:114 CallApi ret 0 result 3.6.2.70
D/ColorViewRootUtil(20303): initSwipState, isDisplayCompatApp false
D/ColorViewRootUtil(20303): don't initSwipState because display 404 is not default display
[GETX] "EmojiController" onDelete() called
[GETX] "EmojiController" deleted from memory
E/MethodChannel#io.agora.rtm(20303): Failed to handle method call
E/MethodChannel#io.agora.rtm(20303): java.lang.NullPointerException: null cannot be cast to non-null type kotlin.collections.Map<kotlin.String, kotlin.Any>
E/MethodChannel#io.agora.rtm(20303): 	at io.agora.agorartm.AgoraRtmPlugin.onMethodCall(AgoraRtmPlugin.kt:72)
E/MethodChannel#io.agora.rtm(20303): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
E/MethodChannel#io.agora.rtm(20303): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:296)
E/MethodChannel#io.agora.rtm(20303): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:320)
E/MethodChannel#io.agora.rtm(20303): 	at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$TsixYUB5E6FpKhMtCSQVHKE89gQ.run(Unknown Source:12)
E/MethodChannel#io.agora.rtm(20303): 	at android.os.Handler.handleCallback(Handler.java:899)
E/MethodChannel#io.agora.rtm(20303): 	at android.os.Handler.dispatchMessage(Handler.java:100)
E/MethodChannel#io.agora.rtm(20303): 	at android.os.Looper.loop(Looper.java:238)
E/MethodChannel#io.agora.rtm(20303): 	at android.app.ActivityThread.main(ActivityThread.java:7853)
E/MethodChannel#io.agora.rtm(20303): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#io.agora.rtm(20303): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/MethodChannel#io.agora.rtm(20303): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:984)
[log] Error while initializing Agora RTC SDK
D/spdlog  (20303): [2022-06-26 18:56:16.703] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:104 CallApi api_type 15 params {}
E/libc    (20303): Access denied finding property "vendor.camera.aux.packagelist"
D/spdlog  (20303): [2022-06-26 18:56:16.712] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:114 CallApi ret 0 result 
D/spdlog  (20303): [2022-06-26 18:56:16.714] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:104 CallApi api_type 41 params {"interval":200,"smooth":3,"report_vad":true}
D/spdlog  (20303): [2022-06-26 18:56:16.715] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:114 CallApi ret 0 result 
W/ple.nikah_matc(20303): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
D/spdlog  (20303): [2022-06-26 18:56:18.277] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:104 CallApi api_type 4 params {"token":"00640216abc119348c4a6236c11ab1a0c3eIAAI4hCisBf6j/+5OVV9lYmvpGJNyzGkK/x4432vdF+aZ7PH3okAAAAAIgCDjQQABLe5YgQAAQCUc7hiAgCUc7hiAwCUc7hiBACUc7hi","channelId":"uYd4YdP30Lb49h4JDYOJuLjtbmp2 - rLO0Ybh7y3d1qmrfmfZbIQVfy9G3","info":null,"uid":0,"options":null}
I/AudioManager(20303): In setSpeakerphoneOn(), on: true, calling application: com.example.nikah_match
D/AudioManager(20303): setSpeakerphoneOn on=true from com.example.nikah_match
D/AudioManager(20303): setSpeakerphoneOn keys: get_speaker_authority=com.example.nikah_match, mAuthoriyStr = true
E/libc    (20303): Access denied finding property "net.dns1"
E/libc    (20303): Access denied finding property "net.dns2"
E/libc    (20303): Access denied finding property "net.dns3"
E/libc    (20303): Access denied finding property "net.dns4"
D/spdlog  (20303): [2022-06-26 18:56:18.300] [0] [debug] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/iris_rtc_engine.cc:114 CallApi ret 0 result 
D/GDPGlUtil(20303): EGLContext created, client version 3
I/GDPAndroid(20303): cores:8
I/chatty  (20303): uid=10273(com.example.nikah_match) GENP.0 identical 4 lines
I/GDPAndroid(20303): cores:8
D/*WEBRTCN*(20303): SetRenderAndroidVM
I/GDPAndroid(20303): cores:8
E/libc    (20303): Access denied finding property "vendor.camera.aux.packagelist"
I/GDPAndroid(20303): cores:8
I/chatty  (20303): uid=10273(com.example.nikah_match) GENP.0 identical 1 line
I/GDPAndroid(20303): cores:8
I/GDPAndroid(20303): max freq:2016000
I/GDPAndroid(20303): total mem:3818426368
D/        (20303): TrackPlayerBase::~TrackPlayerBase()
D/        (20303): PlayerBase::~PlayerBase()
I/AudioManager(20303): In isSpeakerphoneOn(), calling application: com.example.nikah_match
D/AudioManager(20303): setMode mode=3 from com.example.nikah_match
I/spdlog  (20303): [2022-06-26 18:56:18.771] [0] [info] /tmp/jenkins/IRIS-SDK/rtc/cxx/src/internal/rtc_engine_event_handler.cc:72 onJoinChannelSuccess channel uYd4YdP30Lb49h4JDYOJuLjtbmp2 - rLO0Ybh7y3d1qmrfmfZbIQVfy9G3 uid 2565195964
[AgoraUIKit] onJoinChannel: uYd4YdP30Lb49h4JDYOJuLjtbmp2 - rLO0Ybh7y3d1qmrfmfZbIQVfy9G3, uid: 2565195964
E/libc    (20303): Access denied finding property "persist.vendor.camera.privapp.list"
D/        (20303): PlayerBase::PlayerBase()
D/        (20303): TrackPlayerBase::TrackPlayerBase()
I/libOpenSLES(20303): Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2)
D/AudioTrack(20303): set() streamType 0, sampleRate 16000, format 0x1, channelMask 0x3, frameCount 0, flags #104, notificationFrames -2, sessionId 4817, transferType 0, uid -1, pid -1 cbf 1
D/AudioTrack(20303): gATLogLevel = 0
D/AudioTrack(20303): createTrack state 0 output.outputId=13
W/AudioTrack(20303): createTrack_l(0): AUDIO_OUTPUT_FLAG_FAST denied by server; frameCount 0 -> 648
D/mmscene (20303): getHint applicationScene=com.example.nikah_match,idx=5 none
D/OppoSmartVolume(20303): mEnginerringFeatureSwtich:1, mSmartVolumeAPKSwtich:-22, mSmartVolumePcmDumpSwitch:0
D/OppoSmartVolume(20303): mWechatDbLevel:19, mWechatUseDynamicMode:1
D/IAtlas  (20303): IAtlas::init CallingPid 20303
D/IAtlas  (20303): IAtlas::init this 0x768e8dbd10
E/libc    (20303): Access denied finding property "vendor.camera.aux.packagelist"
D/AudioTrack(20303): start(874): prior state:STATE_STOPPED output 13 stream 0 session 4817
D/voice_scence_discern(20303): add name:sample_rate,  value:16000
V/voice_scence_discern(20303): add name:sample_rate value:16000 list:0x768ee2e080
D/voice_scence_discern(20303): add name:channels,  value:2
V/voice_scence_discern(20303): add name:channels value:2 list:0x768ee2e080
D/voice_scence_discern(20303): get scence process pid:20303, name:com.example.nikah_match
V/voice_scence_discern(20303): this process not in init apk. apk_list:0x7626e78220
V/MediaRouter(20303): Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
W/libOpenSLES(20303): Conversion from OpenSL ES positional channel mask 0x4 to Android mask 0 loses channels
I/libOpenSLES(20303): Emulating old channel mask behavior (ignoring positional mask 0x4, using default mask 0x10 based on channel count of 1)
I/AudioRecord(20303): set(): inputSource 7, sampleRate 16000, format 0x1, channelMask 0x10, frameCount 0, notificationFrames 0, sessionId 0, transferType 1, flags 0x5, opPackageName  uid -1, pid -1
D/AudioRecord(20303): set(): mSessionId 0
E/libc    (20303): Access denied finding property "vendor.camera.aux.packagelist"
D/AudioRecord(20303): set(878): status 0
D/IAtlas  (20303): IAtlas::init CallingPid 20303
D/IAtlas  (20303): IAtlas::init this 0x74dd829850
D/AudioRecord(20303): start(878): sync event 0 trigger session 0
D/AudioRecord(20303): 2022-06-26 18:56:18 <>[record][]:[AudioRecord::start()] LocalRecording [16000,1,0x1]
[log] Local audio state changed state: AudioLocalState.Recording and error: AudioLocalError.Ok
[log] Local audio state changed state: AudioLocalState.Encoding and error: AudioLocalError.Ok
[log] Local video state changed state: LocalVideoStreamState.Capturing and error: LocalVideoStreamError.OK
I/GDPAndroid(20303): getCpuTemperature valid path:/sys/class/thermal/thermal_zone0/temp
I/GDPAndroid(20303): getCpuTemperature valid path:/sys/class/thermal/thermal_zone0/temp
E/libc    (20303): Access denied finding property "net.dns1"
E/libc    (20303): Access denied finding property "net.dns2"
E/libc    (20303): Access denied finding property "net.dns3"
E/libc    (20303): Access denied finding property "net.dns4"
[log] Local video state changed state: LocalVideoStreamState.Encoding and error: LocalVideoStreamError.OK
I/GDPAndroid(20303): getCpuTemperature valid path:/sys/class/thermal/thermal_zone0/temp
E/libc    (20303): Access denied finding property "net.dns1"
E/libc    (20303): Access denied finding property "net.dns2"
E/libc    (20303): Access denied finding property "net.dns3"
E/libc    (20303): Access denied finding property "net.dns4"
I/GDPAndroid(20303): getCpuTemperature valid path:/sys/class/thermal/thermal_zone0/temp
E/libc    (20303): Access denied finding property "net.dns1"
E/libc    (20303): Access denied finding property "net.dns2"
E/libc    (20303): Access denied finding property "net.dns3"
E/libc    (20303): Access denied finding property "net.dns4"
I/GDPAndroid(20303): getCpuTemperature valid path:/sys/class/thermal/thermal_zone0/temp
E/libc    (20303): Access denied finding property "net.dns1"
E/libc    (20303): Access denied finding property "net.dns2"
E/libc    (20303): Access denied finding property "net.dns3"
E/libc    (20303): Access denied finding property "net.dns4"
I/GDPAndroid(20303): getCpuTemperature valid path:/sys/class/thermal/thermal_zone0/temp
I/GDPAndroid(20303): getCpuTemperature valid path:/sys/class/thermal/thermal_zone0/temp
I/GDPAndroid(20303): getCpuTemperature valid path:/sys/class/thermal/thermal_zone0/temp

Also, every time I end the call, I get:

Unhandled Exception: PlatformException(-7, , null, null)

Agora version:

agora_uikit: ^1.0.2

Here is my configuration:

final AgoraClient client = AgoraClient(
    agoraConnectionData: AgoraConnectionData(
      appId: "40216abc119348c4a6236c11ab1a0c3e",
      tokenUrl: "https://nikah----match.herokuapp.com",
      // tokenUrl: "https://nikah--match.herokuapp.com/access_token?",
      channelName: currentChannel,
      uid: 0,
      rtmEnabled: false,
    ),
    enabledPermission: [
      Permission.camera,
      Permission.microphone,
    ],
  );

using this in initState:

  void initAgora() async {
    log("Channel name before client.initialize() is: $channelName");
    try {
      await client.initialize();
    } catch (e) {
      showErrorDialog(
        title: "Error!",
        description: "Some unknown error was thrown while joining the call. Trying again.",
      );
      log("exceotion is: $e"); // this logs that above error.
      await client.initialize();
    }
  }

and my flutter doctor -v:

[√] Flutter (Channel stable, 2.10.5, on Microsoft Windows [Version 10.0.19044.1706], locale en-US)
    • Flutter version 2.10.5 at C:\Flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5464c5bac7 (10 weeks ago), 2022-04-18 09:55:37 -0700
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at C:\Users\waqad\AppData\Local\Android\sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.68.1)
    • VS Code at C:\Users\waqad\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (4 available)
    • RMX2030 (mobile)  • b37273eb • android-arm64  • Android 10 (API 29)
    • Windows (desktop) • windows  • windows-x64    • Microsoft Windows [Version 10.0.19044.1706]
    • Chrome (web)      • chrome   • web-javascript • Google Chrome 102.0.5005.115
    • Edge (web)        • edge     • web-javascript • Microsoft Edge 102.0.1245.44

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Can you please have a look? I search for it but could understand what is causing this. It is really very annoying. Thanks for your time.

@waqadArshad waqadArshad added the bug Something isn't working label Jun 26, 2022
@waqadArshad waqadArshad changed the title PlatformException(-17, request to join channel is rejected, null, null) PlatformException(-17, request to join channel is rejected, null, null) Or when I end the call PlatformException(-7, , null, null) Jun 26, 2022
@Meherdeep
Copy link
Contributor

Meherdeep commented Jul 5, 2022

Hey @waqadArshad,
sorry, for the delayed response. I tried building using the code that you shared and the initialisation error can be ignored as it shows the internal state. But for the end user the a successful initialisation will be followed by a successful join channel callback.

The error code 17 that you're getting can be due to an incorrect token provided or by logging again with the same UID when the leave channel wasn't successful or not completed.

@Meherdeep
Copy link
Contributor

Closing this issue for now. If you're still facing this issue feel free to reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants