Comments (36)
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.
Hi! Did you provide your phone_numbers in app.config file? Please post a stack trace
from tlsharp.
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.
Hi sir,
This Source is not working in VS 2012
from tlsharp.
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.
@POSBean yes, it won't work in VS2012.
from tlsharp.
have any ideas?
from tlsharp.
@cybergogic set a breakpoint at TelegramClient line 73. And go into Send method by F11. I need some context of exception.
from tlsharp.
hello please install vs 2015 and run it
from tlsharp.
same problem
from tlsharp.
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.
@DanialNazari see Readme.md
from tlsharp.
@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.
@DanialNazari sorry, not get what you mean
from tlsharp.
hi again,
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.
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.
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.
sorry, previous version have same bug too (4 bytes instead of 8) maybe telegram has change in protocol
from tlsharp.
to correct you should change your ip server address.
from tlsharp.
@hamidpp
what server ip you use? i tried all of recomended...
from tlsharp.
@hamidpp
great! problem has solved with manual deleting file session dat.
thank you!
from tlsharp.
@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.
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.
@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.
@cybergogic Hey , Download The Latest Version Of This Package , MarkerMetro.Unity.Ionic.Zlib.
from tlsharp.
@NetherX using version 2.0.0.14 it's wrong?
from tlsharp.
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.
Hello there
I have problem same as Previous message
I get error in this line
var sendCodeTimeout = reader.ReadInt32();
Please Help
Thanks
from tlsharp.
I got same issue, please help me to solve it :)
from tlsharp.
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.
Can someone help me?
from tlsharp.
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.
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.
@hamidpp how to change the IP address?
from tlsharp.
@knocte
Have you solved the problem? If yes, please can you explain how?
Thank you in advance.
from tlsharp.
I have same problem. finally I know that for every request should call ConnectAsync(); method.
from tlsharp.
Related Issues (20)
- Where does the library receive updates?
- How cloud I answer the inline button send by bot HOT 1
- how to get current user whene use Session
- How do I schedule a channel message to be sent (Add to Schedule List)?
- how to use TLRequestGetFullUser ? error {"USER_ID_INVALID"}
- How I can keep login after close my windows app? HOT 1
- System.InvalidOperationException: 'USER_BOT' HOT 1
- Search members in group by member's name
- How do I create a new Channel? HOT 4
- Getting an error when calling SearchUserAsync HOT 1
- How to read mesages from telegram to receive code login
- LIMIT_INVALID
- ession problem
- Session problem
- Push notifications example
- Read messages from user chat (not channel)
- Is this project being maintained? HOT 1
- How to Use TorSharp and TLsharp together
- How can I send a message to a Number that is NOT in my contacts? HOT 1
- How to edit the image of a group? HOT 1
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 tlsharp.