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

[BUG] Unhandled Exception: PlatformException(17, request to join channel is rejected, null, null) #68

Closed
Nader2004 opened this issue Feb 18, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Nader2004
Copy link

Hello, while just running the basic example:

import 'package:agora_uikit/agora_uikit.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final AgoraClient client = AgoraClient(
    agoraConnectionData: AgoraConnectionData(
      appId: "<--My App Id-->",
      channelName: "test",
    ),
    enabledPermission: [
      Permission.camera,
      Permission.microphone,
    ],
  );

  @override
  void initState() {
    super.initState();
    initAgora();
  }

  void initAgora() async {
    await client.initialize();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Agora UIKit'),
          centerTitle: true,
        ),
        body: SafeArea(
          child: Stack(
            children: [
              AgoraVideoViewer(
                client: client,
              ),
              AgoraVideoButtons(
                client: client,
              ),
            ],
          ),
        ),
      ),
    );
  }
}

I couldn't join the channel with this error :
Unhandled Exception: PlatformException(17, request to join channel is rejected, null, null)
Although I have read the docs about error code 17 at https://docs.agora.io/en/Video/error_rtc?platform=Flutter
Non of the the mentioned causes were used or exist in the basic example

@Meherdeep
Copy link
Contributor

@Nader2004 This error occurs when the user hasn't left the channel and you're trying to join the channel again. Make sure that you disconnect the call and leave the channel before joining again.

@Meherdeep
Copy link
Contributor

@Nader2004 Closing this issue for now. Feel free to open it again if you're still facing this issue.

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