Comments (15)
Ok, after several hours of searching, I understand that we do not need to install the options that come by update. I got a few new errors before I realized it. Here's the timeline:
- Failed to parse JSON object as TDLib request: Unknown class "updateoption" - this error occurred due to overriding the datatype parameter. It is not necessary to touch it, it is a kind of class name for the json format. The Extra parameter can also be left untouched, because it is used by the library, for example, for id. You can simply delete these parameters and use the setOption method according to the documentation https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1set_option.html, passing only two parameters.
After that, I started getting another error. - TDLib. tdexception: "Option can't be set" - Starting immediately with the "version" option. https://core.telegram.org/tdlib/options. According to the same documentation, the options on which such an exception was made are forbidden to write. It is logical, because we do not need to change the version of tdlib. Therefore, updateoption only informs our application about the option change or occurs during initialization. For example so that we can correctly display the current version in the corner of the app)))
I checked the documentation and it is not written anywhere in the need to set options after getting the event. And in the examples, it is often ignored in general.
Solution: do not set the options that came for the event updateoption
from tdsharp.
@dariooo512 what was the purpose of SetOption function call here: https://github.com/egramtel/tdsharp/blob/master/Samples/TdLib.Samples.GetChats/Program.cs#L28 ?
from tdsharp.
I have same problem. This code master/Samples/TdLib.Samples.GetChats doesn't work!
@x2bool, I did not understand your question...
from tdsharp.
@dariooo512 what was the purpose of SetOption function call here: https://github.com/egramtel/tdsharp/blob/master/Samples/TdLib.Samples.GetChats/Program.cs#L28 ?
Hi, that code is used to set options coming from the server such as max message length.
from tdsharp.
I have same problem. This code master/Samples/TdLib.Samples.GetChats doesn't work!
@x2bool, I did not understand your question...
Did you set the param with your Telegram app data? (ApiId, ApiHash, PhoneNumber)
from tdsharp.
Did you set the param with your Telegram app data? (ApiId, ApiHash, PhoneNumber)
from tdsharp.
Looks like the version upgrade from 1.4.0 to 1.6.0 did break that request. (Looks like a mismatch between request Json schema and related class model)
from tdsharp.
Hi,
I have the same problem. Is there already a solution or workaround to this issue?
I have commented out the code in the case UpdateOption and then the query GetChats works. But the options are not saved then.
from tdsharp.
@ageiter The workaround for now is to comment out SetOption call
from tdsharp.
updateOption
is clearly defined: https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl#L3005
And it seems there is no mismatch between the types. tdlib for some reason doesn't recognize updateOption
class. hmm... What actual subtype of the OptionValue are you getting?
from tdsharp.
updateOption
is clearly defined: https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl#L3005And it seems there is no mismatch between the types. tdlib for some reason doesn't recognize
updateOption
class. hmm... What actual subtype of the OptionValue are you getting?
Hi I'm facing the same issue.
Hope that will help
from tdsharp.
I have the same problem...
from tdsharp.
Me too..
from tdsharp.
I have the same problem, has anyone managed to solve it?
from tdsharp.
Hi. I have the same problem. I am compile 1.7 tdlib and generate new classes with your code generator, but the problem was not solved. Another functions works correctly.
This happens when I try to run your sample project. If I comment "setOption", everything works fine
from tdsharp.
Related Issues (20)
- Activate or generate a Notification when a message is received to 'Saved Messages' chat HOT 1
- ForwardMessagesAsync Gives me an invalid id of the sent message
- Support of spoilers HOT 3
- Can't fix it Unable to load DLL 'tdjson.dll' or one of its dependencies HOT 1
- `updateChatMessageTtl` is not implemented and resulted in exception thrown HOT 11
- Expose exceptions happened during `TdLib.Bindings.Receiver::ProcessEvents`
- How to read the database stored locally HOT 1
- Restoring a session? HOT 1
- Incorrect shared object name in macOS binding HOT 2
- store dbsqlite HOT 3
- How to use SetOption? HOT 5
- Android Support for .NET MAUI HOT 4
- GetMessage Content Caption HOT 2
- General error handling HOT 1
- Unable to load shared library 'libtdjson.dylib' HOT 1
- AddProxyAsync never returns HOT 9
- change path from binlog?
- TdLib.TdException: 'Chat not found' HOT 1
- Enable ARM64 macOS CI
- ExecuteAsync thread blocked after first call HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tdsharp.