southbridgeio / tdlib-ruby

Ruby bindings and client for TDLib
MIT License
94 stars 45 forks source link

"Wrong version 30" error with tdlib 1.6.0, ruby 2.7.2, M1 Mac #45

Closed marckohlbrugge closed 3 years ago

marckohlbrugge commented 3 years ago

I'm running tdlib 1.6.0 which should be supported according to this gem's change log. However I get the following error when trying to run the demo app:

[dry-types] Dry::Types.module is deprecated and will be removed in the next major version
Use Dry.Types() instead. Beware, it exports strict types by default, for old behavior use Dry.Types(default: :nominal). See more options in the changelog
example.rb:1:in `<main>'
[ 0][t 2][1621257271.887587070][LogEvent.h:212][#1][!NetStatsManager][&version() < static_cast<int32>(Version::Next)]   Wrong version 30
[1]    67246 abort      ruby example.rb

I'm on Ruby 2.7.2 and using an Apple Silicon M1 Mac.

I've also tried tdlib 1.5.0 and 1.7.0 but got different errors for those.

marckohlbrugge commented 3 years ago

Sorry never mind. The problem was I initially installed tdlib 1.7.0 which lead this gem to create a ~/.tdlib-ruby directory with some files. After downgrading to tdlib 1.6.0 it still tried to use those files, but they aren't compatible with tdlib 1.6.0

Removing the folder so it can be recreated did the trick. Of course for anyone reading this, make a backup if you're unsure whether you're willing to lose that data.