GithubHelp home page GithubHelp logo

Error: TypeError: Instance of 'LinkedMap<String, dynamic>': type 'LinkedMap<String, dynamic>' is not a subtype of type 'JSObject' about flutter-webrtc HOT 8 OPEN

tolotrasamuel avatar tolotrasamuel commented on May 25, 2024
Error: TypeError: Instance of 'LinkedMap': type 'LinkedMap' is not a subtype of type 'JSObject'

from flutter-webrtc.

Comments (8)

SaloxiddinTursunaliev avatar SaloxiddinTursunaliev commented on May 25, 2024 1

cloudwebrtc

This didn't work

from flutter-webrtc.

lingguox avatar lingguox commented on May 25, 2024 1

我也遇到了,需要帮忙解决,谢谢。
errors.dart:297 Uncaught (in promise) Error: TypeError: Instance of 'LinkedMap<String, dynamic>': type 'LinkedMap<String, dynamic>' is not a subtype of type 'JSObject'
at Object.throw_ [as throw] (errors.dart:297:3)
at Object._failedAsCheck (rti.dart:1385:3)
at dart_rti.Rti.new._generalAsCheckImplementation (rti.dart:1363:3)
at createPeerConnection (factory_impl.dart:45:39)
at createPeerConnection.next ()
at runBody (async_patch.dart:84:54)
at Object._async [as async] (async_patch.dart:127:5)
at factory_impl.RTCFactoryWeb._internal.createPeerConnection (factory_impl.dart:33:49)
at Object.createPeerConnection (factory_impl.dart:90:8)

from flutter-webrtc.

cloudwebrtc avatar cloudwebrtc commented on May 25, 2024

It has been fixed in dart-webrtc 1.4.1. Please delete pubspec.lock under your project and re-run flutter pub get. This issue will be fixed.

https://github.com/flutter-webrtc/dart-webrtc/releases/tag/1.4.1

from flutter-webrtc.

Thasln avatar Thasln commented on May 25, 2024

It has been fixed in dart-webrtc 1.4.1. Please delete pubspec.lock under your project and re-run flutter pub get. This issue will be fixed.

https://github.com/flutter-webrtc/dart-webrtc/releases/tag/1.4.1

This issue same as mine. But the code using flutter_webrtc instead of dart_webrtc. I have done what you've said but it still don't working. Also when im using dart_webrtc, i cant use some methods like RTCVideoRenderer. I dont know what should i do. Can you help.

from flutter-webrtc.

cloudwebrtc avatar cloudwebrtc commented on May 25, 2024

Hey, you don't need to change to dart-webrtc. In fact, flutter-webrtc depends on dart 1.4.0 and above, but when you run flutter pub get for the first time, pubspec.lock should be locked to 1.4.0, but when You delete pubspec.lock and run flutter pub get again, it should be updated to 1.4.1

https://github.com/flutter-webrtc/flutter-webrtc/blob/main/pubspec.yaml#L11

from flutter-webrtc.

mitch2na avatar mitch2na commented on May 25, 2024

I am getting this same error when running dart-webrtc 1.4.1

Looks like you reverted the mapper in 1.4.0 to this:

final jsRtcPc = web.RTCPeerConnection(
        {...constr, ...configuration} as web.RTCConfiguration);

but back in dart-webrtc 1.3.0 it was this:

final jsRtcPc = web.RTCPeerConnection(
        jsify({...constr, ...configuration}) as web.RTCConfiguration);

from flutter-webrtc.

lingguox avatar lingguox commented on May 25, 2024

fixed!已经搞定!
不要替换换PUB_HOSTED_URL环境变量,要继续使用https://pub.dev。是版本兼容问题,flutter 3.19.5升级dart-webrtc到1.4.3

pubspec.yaml:
name: flutter_hello
description: "A new Flutter project."

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.0+1

environment:
sdk: '>=3.3.3 <4.0.0'

dependencies:
flutter:
sdk: flutter

cupertino_icons: ^1.0.2
http: ^1.2.1
flutter_webrtc: ^0.10.3
path_provider: ^2.0.2
web_socket_channel: ^2.2.0
fluttertoast: ^8.2.4
permission_handler: ^10.2.0
sdp_transform: ^0.3.2

dev_dependencies:
flutter_test:
sdk: flutter
pedantic: ^1.11.0
flutter_lints: ^3.0.0

flutter:

uses-material-design: true

from flutter-webrtc.

lingguox avatar lingguox commented on May 25, 2024

pub get后自动升级了dart_webrtc
pubspec.lock:

dart_webrtc:
dependency: transitive
description:
name: dart_webrtc
sha256: ef3ba75d13e8b8d9949bf4389de4d5dc5d9914faae8004f59b44fa0c15889d9e
url: "https://pub.dev"
source: hosted
version: "1.4.3"

from flutter-webrtc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.