pubnub / dart

PubNub Dart SDK
Other
28 stars 15 forks source link

`addMessageAction` throws PubNubException: 400 error: No JSON payload #48

Closed vikmind closed 3 years ago

vikmind commented 3 years ago

Simple code for adding message actions was working fine on PubNub 3.0.2, stopped working on newer versions (checked on (3.1.0 and 3.2.0)

_pubNub.addMessageAction(
  'report',
  'report',
  _messagesChannel,
  Timetoken(timetoken),
);

Stacktrace:

[VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: PubNubException: 400 error: No JSON payload
#0      new PubNubException (package:pubnub/src/core/exceptions.dart:9:29)
#1      getExceptionFromDefaultResult (package:pubnub/src/dx/_utils/exceptions.dart:41:10)
#2      getExceptionFromAny (package:pubnub/src/dx/_utils/exceptions.dart:7:12)
#3      _defaultFlow (package:pubnub/src/dx/_utils/default_flow.dart:82:11)
<asynchronous suspension>
#4      defaultFlow.<anonymous closure> (package:pubnub/src/dx/_utils/default_flow.dart:18:19)
#5      Fiber.run (package:pubnub/src/core/supervisor/fiber.dart:37:32)
#6      defaultFlow (package:pubnub/src/dx/_utils/default_flow.dart:27:15)
#7      MessageActionDx.addMessageAction (package:pubnub/src/dx/message_action/message_action.dart:86:12)
<asynchronous suspension>
#8      _MyHomePageState.build.<anonymous closure>.<anonymous closure> (package:pubnub_meta_demo/main.dart:124:41)
#9      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dar<…>

PubNub version: 3.2.0 and 3.1.0 Flutter 1.22.6 Example code

are commented 3 years ago

Hi! Thanks for reporting this issue. It's already been resolved in version 4.0.0-beta.0.

vikmind commented 3 years ago

Hi! Thanks for reporting this issue. It's already been resolved in version 4.0.0-beta.0.

Works fine with 4.0.0-beta.0 👍 , any ETA for stable release?

are commented 3 years ago

We are awaiting feedback from customers about our beta release! Feel free to let us know what do you think we should improve/change/fix for our stable release. I can't give an ETA right now, but if there are no additional problems with that release we can expect the stable 4.0.0soon.