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

Not able to subscribe when running the App from Chrome. #49

Closed
redjanym opened this issue May 21, 2021 · 2 comments
Closed

Not able to subscribe when running the App from Chrome. #49

redjanym opened this issue May 21, 2021 · 2 comments
Assignees
Labels
status: done This issue is considered resolved. type: bug This issue reports a bug.

Comments

@redjanym
Copy link

redjanym commented May 21, 2021

We are having issues running our app in web version.

    PubNub pubnubInstance;

    pubnubInstance = PubNub(
      defaultKeyset: Keyset(
        subscribeKey: 'sub-k',
        uuid: UUID("some-uuid"),
      ),
    );

    pubnubSubscription = pubnubInstance.subscribe(
        channels: {"some-channel"},
        channelGroups: {'all_channels'}
    );

    pubnubSubscription.messages.listen((envelope) {
      useMessage(envelope.payload);
    });

When we subscribe to pubnub we get this error:

Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
Debug service listening on ws://127.0.0.1:64067/_uT-RC-LZX4=/ws

Running with unsound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety
Debug service listening on ws://127.0.0.1:64067/_uT-RC-LZX4=/ws
Error: UnimplementedError
    at Object.throw_ [as throw] (http://localhost:64017/dart_sdk.js:5333:11)
    at stub.RequestHandler.new.get isCancelled [as isCancelled] (http://localhost:64017/packages/pubnub/src/networking/request_handler/stub.dart.lib.js:36:24)
    at subscribe_loop.SubscribeLoop.new._loop (http://localhost:64017/packages/pubnub/src/subscribe/subscribe_loop/subscribe_loop.dart.lib.js:146:55)
    at _loop.next (<anonymous>)
    at _AsyncStarImpl.new.runBody (http://localhost:64017/dart_sdk.js:31858:40)
    at _RootZone.runUnary (http://localhost:64017/dart_sdk.js:38888:58)
    at _FutureListener.thenAwait.handleValue (http://localhost:64017/dart_sdk.js:33874:29)
    at handleValueCallback (http://localhost:64017/dart_sdk.js:34434:49)
    at Function._propagateToListeners (http://localhost:64017/dart_sdk.js:34472:17)
    at _Future.new.[_completeWithValue] (http://localhost:64017/dart_sdk.js:34314:23)
    at async._AsyncCallbackEntry.new.callback (http://localhost:64017/dart_sdk.js:34337:35)
    at Object._microtaskLoop (http://localhost:64017/dart_sdk.js:39175:13)
    at _startMicrotaskLoop (http://localhost:64017/dart_sdk.js:39181:13)
    at http://localhost:64017/dart_sdk.js:34688:9

Flutter version: 2.0.6
Pubspec file:

name: portable_app
description: A new Flutter project.
version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.2
  http: ^0.13.3
  pubnub: ^3.2.0
  scoped_model: ^1.1.0
  shared_preferences: ^2.0.5

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter:
  uses-material-design: true

Flutter Doctor output:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 2.0.6, on Mac OS X 10.15.6 19G2021 darwin-x64, locale en-AL)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[!] Xcode - develop for iOS and macOS
    ! CocoaPods 1.9.1 out of date (1.10.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.0)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

Thanks in advance.

@are
Copy link
Contributor

are commented May 21, 2021

Hi! Thanks for reporting the issue! This is fixed in our latest version 4.0.0-beta.0. Let me know if the issue persists after upgrading!

@are are added status: waiting This issue waits for feedback from author. type: bug This issue reports a bug. labels May 21, 2021
@are are self-assigned this May 21, 2021
@redjanym
Copy link
Author

Now it works. Thanks for the fast reply :)

@are are added status: done This issue is considered resolved. and removed status: waiting This issue waits for feedback from author. labels May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: done This issue is considered resolved. type: bug This issue reports a bug.
Projects
None yet
Development

No branches or pull requests

2 participants