ilyalatt / Telega

C# Telegram MTProto Client
https://ilyalatt.github.io/Telega/
MIT License
58 stars 15 forks source link

File not found #25

Closed wasimjee closed 4 years ago

wasimjee commented 4 years ago

It seems some of the Files not available

using Telega.Rpc.Dto.Types;

ilyalatt commented 4 years ago

Hi. DTO files are excluded from the git repository. You need to run the generator (./generate-dto.sh).

wasimjee commented 4 years ago

I am getting this error

This exception was originally thrown at this call stack:
    Telega.Rpc.Dto.Generator.FileSync.Clear() in FileSync.cs
    Telega.Rpc.Dto.Generator.Program.Main() in Program.cs
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
    System.Runtime.CompilerServices.TaskAwaiter.GetResult()
    Telega.Rpc.Dto.Generator.Program.<Main>()
wasimjee commented 4 years ago

now its working, but getting error on compilation

async Task<T> ReceiveWrapper()
            {
                try
                {
                    return await receive;
                }
                catch (TgFloodException e)
                {
                    _unlockTimestamp = DateTime.Now + e.Delay;
                    throw;
                }
            }

The error is

Error CS8603 Possible null reference return. Telega C:\Users\wasim\source\repos\Telega-0.3.3\Telega-0.3.3\Telega\CallMiddleware\FloodMiddleware.cs 21 Active

ilyalatt commented 4 years ago

I am getting this error

This exception was originally thrown at this call stack:
    Telega.Rpc.Dto.Generator.FileSync.Clear() in FileSync.cs
    Telega.Rpc.Dto.Generator.Program.Main() in Program.cs
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
    System.Runtime.CompilerServices.TaskAwaiter.GetResult()
    Telega.Rpc.Dto.Generator.Program.<Main>()

Hm, interesting. Looks like you attached the call stack and missed the exception and it is message. Can you attach them? I guess it is a file access exception. I have tested the generator on Windows and it works fine if you place the project in the home directory.

ilyalatt commented 4 years ago

now its working, but getting error on compilation

async Task<T> ReceiveWrapper()
            {
                try
                {
                    return await receive;
                }
                catch (TgFloodException e)
                {
                    _unlockTimestamp = DateTime.Now + e.Delay;
                    throw;
                }
            }

The error is

Error CS8603 Possible null reference return. Telega C:\Users\wasim\source\repos\Telega-0.3.3\Telega-0.3.3\Telega\CallMiddleware\FloodMiddleware.cs 21 Active

I have tested Telega build on Windows as well. It works. Make sure that dotnet --version is 3.1.401.

wasimjee commented 4 years ago

dotnet --versio

Its showing version .NET Standard 2.1

ilyalatt commented 4 years ago

dotnet --versio

Its showing version .NET Standard 2.1

Try to install the latest .NET Core SDK here.

wasimjee commented 4 years ago

Thank you, done