GithubHelp home page GithubHelp logo

Comments (15)

RoseLoverX avatar RoseLoverX commented on June 2, 2024

check your system clock

from gogram.

wind-hx avatar wind-hx commented on June 2, 2024

My system time is fine

from gogram.

wind-hx avatar wind-hx commented on June 2, 2024

Is it related to the operating system? The time is automatically obtained by the system when it is connected to the Internet.

from gogram.

TAMILVIP007 avatar TAMILVIP007 commented on June 2, 2024

@wind-hx

from gogram.

wind-hx avatar wind-hx commented on June 2, 2024

@wind-hx

?

from gogram.

AmarnathCJD avatar AmarnathCJD commented on June 2, 2024

Is it related to the operating system? The time is automatically obtained by the system when it is connected to the Internet.

I couldn't recreate the error

what's your OS, timezone etc
the randombyte gen is based on system time Unix so that must be the error
The lib has been tested on Windows 10,11 and major linux distros

from gogram.

AmarnathCJD avatar AmarnathCJD commented on June 2, 2024

@AmarnathCJD Maybe post the full code

from gogram.

wind-hx avatar wind-hx commented on June 2, 2024

I am Mac OS operating system

package main

import (
	"log"

	"github.com/amarnathcjd/gogram/telegram"
)

func main() {
	log.Printf("init...\n")
	appID := int32(611335)
	appHash := "d524b414d21f4d37f08684c1df41ac9c"
	client, _ := telegram.NewClient(telegram.ClientConfig{
		AppID:   appID,
		AppHash: appHash,
	})
	client.Connect()
	authKey := []byte{188, 193, 215, 239, 216, 225, 180, 195, 131, 110, 125, 151, 248, 183, 61, 66, 108, 245, 107, 152, 157, 35, 224, 107, 30, 238, 17, 99, 79, 242, 39, 148, 148, 163, 151, 101, 126, 35, 158, 227, 144, 112, 79, 175, 196, 79, 213, 228, 219, 72, 17, 81, 141, 185, 223, 217, 98, 102, 200, 127, 50, 233, 38, 131, 19, 51, 2, 0, 81, 229, 83, 18, 125, 96, 223, 147, 202, 202, 80, 218, 70, 242, 211, 174, 42, 77, 114, 179, 43, 161, 246, 141, 27, 183, 192, 111, 203, 219, 14, 80, 175, 129, 158, 97, 125, 113, 106, 38, 139, 212, 206, 36, 228, 139, 37, 112, 251, 2, 188, 234, 125, 131, 112, 200, 141, 227, 31, 236, 200, 240, 129, 89, 49, 191, 244, 109, 205, 226, 186, 10, 132, 8, 71, 146, 89, 240, 99, 70, 197, 186, 115, 124, 161, 12, 182, 124, 209, 140, 147, 87, 60, 213, 101, 23, 177, 37, 82, 108, 64, 173, 167, 10, 4, 197, 168, 237, 230, 61, 138, 44, 249, 24, 154, 136, 47, 215, 158, 119, 147, 213, 204, 89, 241, 123, 235, 34, 207, 133, 224, 120, 115, 52, 253, 99, 152, 117, 8, 154, 207, 124, 231, 140, 134, 54, 86, 54, 126, 124, 165, 19, 113, 219, 142, 103, 103, 97, 148, 97, 36, 147, 33, 238, 8, 157, 213, 150, 161, 100, 131, 164, 255, 6, 1, 178, 217, 182, 51, 29, 12, 161, 117, 250, 80, 64, 36, 123}
	authKeyHash := []byte{210, 193, 149, 11, 102, 194, 206, 136}
	addr := "91.108.56.126:443"
	dcId := 5
	client.ImportRawSession(authKey, authKeyHash, addr, dcId, appID)
	log.Printf("init end...\n")
	user, err := client.GetMe()
	if err != nil {
		log.Println("error: ", err)
		return
	}
	log.Println("user: ", user)
}

2023/05/12 13:48:46 init...
2023/05/12 13:48:46 gogram - mtproto - Info - Connecting to [149.154.167.91:443] - <TCPFull> ...
2023/05/12 13:48:46 gogram - mtproto - Info - Connection to [149.154.167.91:443] - <TCPFull> established
2023/05/12 13:48:48 init end...

Here is my full code with full log info

from gogram.

wind-hx avatar wind-hx commented on June 2, 2024

Is there an error in the code I provided?

from gogram.

wind-hx avatar wind-hx commented on June 2, 2024

Is it related to the operating system? The time is automatically obtained by the system when it is connected to the Internet.

I couldn't recreate the error

what's your OS, timezone etc the randombyte gen is based on system time Unix so that must be the error The lib has been tested on Windows 10,11 and major linux distros

My country is China and my time zone is GMT+8

from gogram.

AmarnathCJD avatar AmarnathCJD commented on June 2, 2024

@wind-hx It's something related to macos then lemme try seeding the bytes generator but idh a mac system to test it.

from gogram.

wind-hx avatar wind-hx commented on June 2, 2024

How can I solve this problem?

from gogram.

AmarnathCJD avatar AmarnathCJD commented on June 2, 2024

@wind-hx Try seeding the default crypto/rand seeder maybe before client starts

from gogram.

AmarnathCJD avatar AmarnathCJD commented on June 2, 2024

@AmarnathCJD I would need time to setup a macos vm to check the issue

from gogram.

AmarnathCJD avatar AmarnathCJD commented on June 2, 2024

stale issue

from gogram.

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.