Open markwest51 opened 4 years ago
@markwest51 thanks! can you rebase it?
@knocte - resolved conflicts that appeared, not sure about removing _ from private vars though and also whether to call async methods prefix, we normally remove that as you can tell whether method is async by await call in preview but up to you
There are still conflicts, did you really rebase? rebasing shouldn't imply new commits.
Nevermind, I had the wrong merge option chosen. There are still things to fix in this PR but before I point them out, I gotta ask: did you test it? does it work well for you?
@knocte not tested anything yet, was gonna wait till codebase is ready before doing that
not tested anything yet, was gonna wait till codebase is ready before doing that
but the problem about doing that is that we may break it in the next review iteration hehe
@knocte that's fine :-), feel free to point out the stuff you see, will amend later after work
that's fine :-)
it's not fine, believe me, finding regressions in code that was working before, is tricky :P
Please test it first, and I will continue with the review once we know this in fact brings value.
update event now gets triggered on each update, for test need to figure out how to read saved messages.
Tasks.
Is @merqlove able to provide input as it is their original working code.
Apparently there still are conflicts.
@knocte where are these conflicts ?, updates work fine from what i can see when running for the last hr, have added cancellation token to methods, inside the main one there are subscribed tasks and idle tasks not sure what the intention of this was.
Github says "This branch cannot be rebased due to conflicts Rebasing the commits of this branch on top of the base branch cannot be performed automatically due to conflicts encountered while reapplying the individual commits from the head branch."
@markwest51 how have you rebased?
@knocte i rebased to a previous commit on my branch to remove some information, did i need to rebase to master or something
I guess so, otherwise Github would not let me merge.
think i resolved conflicts by rebasing thru GitBash to master, looks like VS2017 is not that good with GitHub, do not merge yet though until tested again
@knocte it is back working ok now - getting all updates coming through, was having problems earlier but run a send message test which gave me a socket error about previous connection being closed and then it is back working fine, not sure what that would be but it looked like socket connection was not working, was fine before all the rebasing so could be that.
was having problems earlier but run a send message test which gave me a socket error about previous connection being closed and then it is back working fine, not sure what that would be but it looked like socket connection was not working, was fine before all the rebasing so could be that.
Man, everytime you face a problem like this, please, paste the ex.ToString()
here. I cannot comment on such a small level of detail.
Github is still telling me This branch cannot be rebased due to conflicts Rebasing the commits of this branch on top of the base branch cannot be performed automatically due to conflicts encountered while reapplying the individual commits from the head branch.
I would recommend to rebase going back to basics: with git commands. Just do git fetch --all
and git rebase origin/master
(provided origin points to TLSharp, not to your fork of TLSharp)
BTW if it's easier for you, before rebasing you could squash your commits into 1, first. That would make rebasing easier I guess
@knocte are you able to check conflicts now, squashed commits using gitbash in the end rather than VS
@knocte have done the git commands specified, says branch is up to date and rebased to your master as asked.
ok seems no conflicts now! will do the last review today
Hello guys, I am not finished that integration in time reasons. I have used for my needs another project in another programming language, which has those features out of the box. Good luck! 🙏
@knocte have done the review changes but i still get socket timeout errors and have got the exception back which i mentioned before. Get a lot of socket timeout errors once they go it is fine. @merqlove any insight on what the scheduled and idle tasks was about or any errors you may have got running the updates. ?
Here is stack trace of exception i occasionally get
Test Name: GetUpdatesForUser Test FullName: TLSharp.Tests.TLSharpTestsVS.GetUpdatesForUser Test Source: C:\Users\Admin\Source\Repos\TLSharp2\TLSharp.Tests.VS\TLSharpTestsVs.cs : line 84 Test Outcome: Failed Test Duration: 0:00:00.3699959
Result StackTrace:
at System.Net.Sockets.Socket.BeginReceive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state)
at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
at System.IO.Stream.<>c.1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func
5 beginMethod, Func3 endMethod) at System.IO.Stream.BeginEndReadAsync(Byte[] buffer, Int32 offset, Int32 count) at System.IO.Stream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) at TLSharp.Core.Network.TcpTransport.<Receive>d__6.MoveNext() in C:\Users\Admin\Source\Repos\TLSharp2\TLSharp.Core\Network\TcpTransport.cs:line 61 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable
1.ConfiguredTaskAwaiter.GetResult()
at TLSharp.Core.Network.MtProtoSender.
Debug Trace:
CodeToAuthenticate: {0} not configured in app.config! Some tests may fail.
PasswordToAuthenticate: {0} not configured in app.config! Some tests may fail.
NotRegisteredNumberToSignUp: {0} not configured in app.config! Some tests may fail.
UserNameToSendMessage: {0} not configured in app.config! Some tests may fail.
NumberToGetUserFull: {0} not configured in app.config! Some tests may fail.
NumberToAddToChat: {0} not configured in app.config! Some tests may fail.
@markwest51 I did telegram subscriber to some groups & channels, with ability to retranslate incoming messages into Redis pubsub or other telegram channels. Sorry, I have no idea about that errors. It was so long time ago...
Here is stack trace of exception i occasionally get
If you paste only the stacktrace, we don't see the neither the exception type nor the exception message. Please just catch the exception and paste what you get from its ex.ToString()
@knocte the exception is at the bottom,
Test method TLSharp.Tests.TLSharpTestsVS.GetUpdatesForUser threw exception: System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
@knocte are we all good on this now ?
Oh sorry for the delay, let me double check.
@knocte all comments done and reviewed. Have added a comment on the test as have worked out why the updates were not being triggered, it was because the user needed re-authenticating, i was using the session user so there must be a expiration time. Soon as i done that all was working fine
@knocte we all good ?
@markwest51 hey Mark, sorry to drop the ball on this. Reason is I wanted to push the Layer Update (to 108) first, and later merge this PR, but I lacked the motivation for very long to finish the Layer update first. Today I've finished that and I pushed it here: https://github.com/nblockchain/TgSharp . In the following days I plan to port this PR to that repo, if you don't beat me to it.
updated changes aside from nLog from pr/697