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

"type 'int' is not a subtype of type 'Iterable<dynamic>' " when I call enumeratePlaybackDevices() or enumerateRecordingDevices() #2042

Open
1 of 5 tasks
HarukaOki opened this issue Oct 4, 2024 · 0 comments

Comments

@HarukaOki
Copy link

HarukaOki commented Oct 4, 2024

Version of the agora_rtc_engine

6.3.2

Platforms affected

  • Android
  • iOS
  • macOS
  • Windows
  • Web

Steps to reproduce

To be honest, I haven't figured out a reliable way to reproduce this issue. However, occasionally, when I call getAudioDeviceManager().enumeratePlaybackDevices() or getAudioDeviceManager().enumerateRecordingDevices() on MacOS, an error log appears.
I'm a beginner and not very familiar with creating issues like this, so please feel free to let me know if there's any missing information or anything you're concerned about.

Expected results

I hope no such error occurs, or it becomes clearer what I should fix when an error does occur.

Actual results

Occasionally, an error occurs. Please refer to the log below for details.

Code sample

Code sample
...
    late RtcEngine agoraEngine;
    try {
      agoraEngine = createAgoraRtcEngine();
      await agoraEngine.initialize(
        const RtcEngineContext(
          appId: '0cd8cb48f23b418eabdfa90730f956bd',
        ),
      );
    } on Exception catch (e) {
      Log.warn(
        'failed to create RtcEngine',
        e: e,
        fields: {
          'type': 'AgoraEngine',
        },
      );
      rethrow;
    }
    
    if(Platform.isMacOS) {
        final audioInputDeviceInfoList =
        await ragorEngine.getAudioDeviceManager().enumerateRecordingDevices();
    }
...

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs

This is a typical Firebase Crashlytics log.

Non-fatal Exception: FlutterError
type 'int' is not a subtype of type 'Iterable<dynamic>'
0x0 DeviceInfoListExt.fill + 15 (audio_device_manager_impl.dart:15)
1  ???                            0x0 AudioDeviceManagerImpl.enumerateRecordingDevices + 71 (audio_device_manager_impl.dart:71)
2  ???                            0x0 AgoraEngine.getAvailableInputDevices + 690 (agora.dart:690)
... 

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.3 23D56 darwin-arm64, locale ja-JP)
    • Flutter version 3.24.3 on channel stable at /Users/harukaoki/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (3 weeks ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/harukaoki/Library/Android/sdk
    • Platform android-35, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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 17.0.10+0-17.0.10b1087.21-11609105)

[✓] VS Code (version 1.94.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.98.0

[✓] Connected device (4 available)
    • iPhone (8) (mobile)             • 00008020-001124CE3CE9002E • ios            • iOS 17.6.1 21G93
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 14.3 23D56 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 14.3 23D56 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 129.0.6668.90

[✓] Network resources
    • All expected network resources are available.

• No issues found!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant