Code Monkey home page Code Monkey logo

Comments (36)

hamidpp avatar hamidpp commented on July 18, 2024 1

when the run project the session.dat file will be create in bin folder, you first delete this file and clean solution then test again with this ip servers :
Server 1: 149.154.175.50:443 (recommended)
Server 2: 149.154.167.51:443
Server 3: 149.154.175.100:443
Server 4: 149.154.167.91:443
Server 5: 91.108.56.165:443

from tlsharp.

sochix avatar sochix commented on July 18, 2024

Hi! Did you provide your phone_numbers in app.config file? Please post a stack trace

from tlsharp.

cybergogic avatar cybergogic commented on July 18, 2024

yes, i filled up the app.config because without it any test will be failed.

Test has crashed in these string:
await _sender.Send(request);
Exception thrown: 'System.NullReferenceException' in TLSharp.Core.dll
Exception thrown: 'System.NullReferenceException' in mscorlib.dll

i try now in 64-bit Win2012 R2 Server. i think, that it's 32-bit compatibility troubles with VS2015 and async calls.

from tlsharp.

POSBean avatar POSBean commented on July 18, 2024

Hi sir,

This Source is not working in VS 2012

from tlsharp.

cybergogic avatar cybergogic commented on July 18, 2024

Had a same error in 64-bit platform

stack trace below

Test Name: AuthUser
Test FullName: TLSharp.Tests.NotificatioClientTests.AuthUser
Test Source: E:\Current\ICQ_Jabber\Telegram\docs\TLSharp-master\TLSharp.Tests\NotificatioClientTests.cs : line 46
Test Outcome: Failed
Test Duration: 0:00:00,2830459

Result StackTrace:
at TLSharp.Core.TelegramClient.d__10.MoveNext() in E:\Current\ICQ_Jabber\Telegram\docs\TLSharp-master\TLSharp.Core\TelegramClient.cs:line 73
--- 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.TaskAwaiter`1.GetResult()
at TLSharp.Tests.NotificatioClientTests.d__13.MoveNext() in E:\Current\ICQ_Jabber\Telegram\docs\TLSharp-master\TLSharp.Tests\NotificatioClientTests.cs:line 52
--- 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.TaskAwaiter.GetResult()
Result Message:
Test method TLSharp.Tests.NotificatioClientTests.AuthUser threw exception:
System.NullReferenceException: Object reference not set to an instance of an object.

from tlsharp.

sochix avatar sochix commented on July 18, 2024

@POSBean yes, it won't work in VS2012.

from tlsharp.

cybergogic avatar cybergogic commented on July 18, 2024

have any ideas?

from tlsharp.

sochix avatar sochix commented on July 18, 2024

@cybergogic set a breakpoint at TelegramClient line 73. And go into Send method by F11. I need some context of exception.

from tlsharp.

 avatar commented on July 18, 2024

hello please install vs 2015 and run it

from tlsharp.

rashcms avatar rashcms commented on July 18, 2024

same problem

from tlsharp.

DanialNazari avatar DanialNazari commented on July 18, 2024

hi Ilya, i have same problem and i can't get verification code from telegram ,
i think if you explain more about 'Sending messages set-up' step everything will be better ...

more detail about my problem when i run test :
Test method TLSharp.Tests.NotificatioClientTests.AuthUser threw exception:
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.

of course i do everything in 'Sending messages set-up' step .

please give me way to fix it ...
thanks ...

from tlsharp.

sochix avatar sochix commented on July 18, 2024

@DanialNazari see Readme.md

from tlsharp.

DanialNazari avatar DanialNazari commented on July 18, 2024

@sochix hi , i see that very well (in details) before i posted here, an i do anything in readme.md ,but
'Sending messages set-up' step is ambiguous for me , if you can explain more this step (in Technically aspects)
thanks for your attention ...

from tlsharp.

sochix avatar sochix commented on July 18, 2024

@DanialNazari sorry, not get what you mean

from tlsharp.

DanialNazari avatar DanialNazari commented on July 18, 2024

hi again,
untitled1
in this method (decodeMessage) ,when i got the first response, the length of body is 4 , and in line 108 ReadUint64 want to read 8 byte from inputreader , and inputreader does not have 8 byte...
in this line (108 ) i got exception below( as i said before) :
System.IO.EndOfStreamException: Unable to read beyond the end of the stream.

what wrong ? what can i do?

from tlsharp.

delphiassistant avatar delphiassistant commented on July 18, 2024

System.IO.EndOfStreamException usually comes from wrong server address. Not all the telegram servers listed in read.me file work fine. Change server address to different addresses in TcpTransport.cs and see which one works.

from tlsharp.

cybergogic avatar cybergogic commented on July 18, 2024

i re-download the package and now i have a same EndOfStreamException with same ip and hash settings. in previous version, which i downloaded in Oct, 7, these piece of code works fine =(
waiting for any fixes...

from tlsharp.

cybergogic avatar cybergogic commented on July 18, 2024

sorry, previous version have same bug too (4 bytes instead of 8) maybe telegram has change in protocol

from tlsharp.

hamidpp avatar hamidpp commented on July 18, 2024

to correct you should change your ip server address.

from tlsharp.

cybergogic avatar cybergogic commented on July 18, 2024

@hamidpp
what server ip you use? i tried all of recomended...

from tlsharp.

cybergogic avatar cybergogic commented on July 18, 2024

@hamidpp
great! problem has solved with manual deleting file session dat.
thank you!

from tlsharp.

DanialNazari avatar DanialNazari commented on July 18, 2024

@hamidpp hi hamid , your post helped me to receive telegram code but i still receive EndOfStreamException when debug authUser() method (i do not use ip server that you recomend because checkPhone() method failed with various error ; MIGRATE , ...)
what's wrong ?

from tlsharp.

hamidpp avatar hamidpp commented on July 18, 2024

i get this error in some times,but this fixed with delete session.dat file and clean solution.if you get PHONE_MIGRATE_X or NETWORK_MIGRATE_X
see this address to help : https://core.telegram.org/method/auth.sendCode
you should repeat the query to data-center X. i suggest create array of data center e.g
public static List dcList = new List {
new DcOptionConstructor() {id = 1, hostname = "", ip_address = "149.154.175.50", port = 443 },
new DcOptionConstructor() {id = 2, hostname = "", ip_address = "149.154.167.51", port = 443 },
new DcOptionConstructor() {id = 3, hostname = "", ip_address = "149.154.175.100", port = 443 },
new DcOptionConstructor() {id = 4, hostname = "", ip_address = "149.154.167.91", port = 443 },
new DcOptionConstructor() {id = 5, hostname = "", ip_address = "91.108.56.165", port = 443 }}

and use the id number corresponding to X example PHONE_MIGRATE_4 => ( id 4 = 149.154.167.91)
also you can see available data centers in test time with put breakpiont in :
InitConnectionRequest class -> OnResponse method -> ConfigConstructor = config;

from tlsharp.

cybergogic avatar cybergogic commented on July 18, 2024

@DanialNazari , @hamidpp i still have a same problem. if Telegram is running in my phone, i receive code via Telegram, paste this in debug and AuthTest works fine. if Telegram isn't running in my phone, or phone number is not registered, i receive the Telegram code in sms (twice from different sources: first sms immediately, second sms with 1-2 minutes delay) and i have EndOfSteramException in MakeAuth method, and the test has breaked. Also i have FileNotFound Exception in mscorlib.dll with client.connect() method, but these exception do not crash the test.

somebody help

from tlsharp.

NetherX avatar NetherX commented on July 18, 2024

@cybergogic Hey , Download The Latest Version Of This Package , MarkerMetro.Unity.Ionic.Zlib.

from tlsharp.

cybergogic avatar cybergogic commented on July 18, 2024

@NetherX using version 2.0.0.14 it's wrong?

from tlsharp.

novinp avatar novinp commented on July 18, 2024

hi
i have read all of the conversiones in this Issues and other Issueses
i have "cybergogic" problem.

1-change server provided ips
2-delete session

i can get code,activate and send message when telegram is actived on my phone
but! if telegram not activated on my phone , i can recive the telegram activation code on my phone but application has been stoped by the below error:
processMessage(result.Item2, result.Item3, messageReader, request);

case 0xf35c6d01: // rpc_result
//logger.debug("MSG rpc_result");
return HandleRpcResult(messageId, sequence, messageReader, request);

return HandleRpcResult(messageId, sequence, messageReader, request);

on HandleRpcResult

on public override void OnResponse(BinaryReader reader)
_phoneRegistered=true
_phoneCodeHash=33440dc5fbb3eccb46

throw exception on this line
Unable to read beyond the end of the stream.
var sendCodeTimeout = reader.ReadInt32();
var isPassword = reader.ReadUInt32() == boolTrue;

from tlsharp.

Boroumandan avatar Boroumandan commented on July 18, 2024

Hello there
I have problem same as Previous message
I get error in this line
var sendCodeTimeout = reader.ReadInt32();

Please Help
Thanks

from tlsharp.

dinhducit avatar dinhducit commented on July 18, 2024

I got same issue, please help me to solve it :)

from tlsharp.

dinhducit avatar dinhducit commented on July 18, 2024

i still have a same problem. if Telegram is running in my phone, i receive code via Telegram, paste this in debug and AuthTest works fine. if Telegram isn't running in my phone, or phone number is not registered, i receive the Telegram code in sms (twice from different sources: first sms immediately, second sms with 1-2 minutes delay) and i have EndOfSteramException in MakeAuth method, and the test has breaked. Also i have FileNotFound Exception in mscorlib.dll with client.connect() method, but these exception do not crash the test.

somebody help

from tlsharp.

dinhducit avatar dinhducit commented on July 18, 2024

Can someone help me?

from tlsharp.

paulo-apoloni avatar paulo-apoloni commented on July 18, 2024

Same problem here
Sometimes i get "System.IO.EndOfStreamException: Unable to read beyond the end of the stream." and sometimes "store_invalid_object_type"

from tlsharp.

hamidpp avatar hamidpp commented on July 18, 2024

change your server ip address to solve.

On Tue, Mar 22, 2016 at 12:25 AM, paulo-apoloni [email protected]
wrote:

Same problem here
Sometimes i get "System.IO.EndOfStreamException: Unable to read beyond the
end of the stream." and sometimes "store_invalid_object_type"


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#17 (comment)

from tlsharp.

knocte avatar knocte commented on July 18, 2024

@hamidpp how to change the IP address?

from tlsharp.

LukZucca avatar LukZucca commented on July 18, 2024

@knocte
Have you solved the problem? If yes, please can you explain how?
Thank you in advance.

from tlsharp.

AbbasKhalili avatar AbbasKhalili commented on July 18, 2024

I have same problem. finally I know that for every request should call ConnectAsync(); method.

from tlsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.