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

RedisRuntimeError(got element that cant not be parsed) #92

Open
nhatpham0301 opened this issue Dec 1, 2023 · 1 comment
Open

RedisRuntimeError(got element that cant not be parsed) #92

nhatpham0301 opened this issue Dec 1, 2023 · 1 comment

Comments

@nhatpham0301
Copy link

Redis version 4.0.0.
Flutter 3.13.0-0.2.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision ac71592bc6 (5 months ago) • 2023-07-18 14:53:57 -0600
Engine • revision e14db68a86
Tools • Dart 3.1.0 (build 3.1.0-262.2.beta) • DevTools 2.25.0

I connected success with redisconnection. But i can't use GET or SET of send_object.

My code:

RedisConnection conn = RedisConnection();
conn.connect('localhost', 8081).then((cmd) {
    debugPrint('success');
    cmd.send_object(["SET", "key", "value"]).then((value) {
        print(value);
      }).catchError((onError) {
        debugPrint('Error set redis: $onError');
      });
  }).catchError((onError) {
    debugPrint('Error connect redis: $onError');
  });

I always see error: RedisRuntimeError(got element that cant not be parsed)

Please point out my mistakes in the above syntax, thanks

@ra1u
Copy link
Owner

ra1u commented Dec 1, 2023

Hi.

I speculate, that you do not connect on raw redis server.
When we do connect we just open socket and at that point no data is sent yet.
Error seems to originate after parsing response from server after SET is sent and seems to be invalid.

Does connecting on localhost port 8081 with redis-cli work?

You can also try sniffing protocol between your client and redis databse using https://www.wireshark.org/ to get insights what is going on.

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

2 participants