Comments (20)
Login using phone number or token works the same as the original tdlib.
from tdlight-java.
Hi, please check if it is openssl issue.
For TDLIB, I found that if openssl is not installed, there is an error Library not loaded
. And for the Mac I am using, it does not have it installed.
And for the error of this library on Mac, I am seeing:
Caused by: java.lang.UnsatisfiedLinkError: /Users/xxx/eclipse-workspace/telegram-forwarder/.cache/version-tdlight-3.171.36-3.2.48/tdjni/tdjni.dylib: dlopen(/Users/xxx/eclipse-workspace/telegram-forwarder/.cache/version-tdlight-3.171.36-3.2.48/tdjni/tdjni.dylib, 1): Library not loaded: /usr/local/opt/[email protected]/lib/libssl.1.1.dylib
from tdlight-java.
I updated the examples, they were outdated.
Also, use the latest version of tdlight java:
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-java</artifactId>
<version>3.171.36</version>
</dependency>
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-natives-linux-amd64</artifactId>
<version>3.2.48</version>
</dependency>
from tdlight-java.
I test the example on Mac, so I use these:
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-java</artifactId>
<version>3.171.36</version>
</dependency>
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlib-natives-osx-amd64</artifactId>
<version>3.2.48</version>
</dependency>
But there is still error:
it.tdlight.common.utils.CantLoadLibrary: FATAL: Init failled when load tdlib library, execution can't continue
at it.tdlight.common.utils.LoadLibrary.loadLibrary(LoadLibrary.java:88)
at it.tdlight.common.utils.LoadLibrary.load(LoadLibrary.java:66)
at it.tdlight.common.Init.start(Init.java:44)
at eos1d3.telegram_forwarder.App.main(App.java:13)
Caused by: java.io.IOException: Native libraries for platform osx-amd64 not found!
at it.tdlight.common.utils.LoadLibrary.loadJarLibrary(LoadLibrary.java:177)
at it.tdlight.common.utils.LoadLibrary.loadLibrary(LoadLibrary.java:83)
... 3 more
it.tdlight.common.utils.CantLoadLibrary: FATAL: Init failled when load tdlib library, execution can't continue
at it.tdlight.common.utils.LoadLibrary.loadLibrary(LoadLibrary.java:88)
at it.tdlight.common.utils.LoadLibrary.load(LoadLibrary.java:66)
at it.tdlight.common.Init.start(Init.java:44)
at it.tdlight.common.InternalClientManager.<init>(InternalClientManager.java:19)
at it.tdlight.common.InternalClientManager.lambda$get$0(InternalClientManager.java:28)
at java.util.concurrent.atomic.AtomicReference.updateAndGet(AtomicReference.java:179)
at it.tdlight.common.InternalClientManager.get(InternalClientManager.java:28)
at it.tdlight.common.CommonClientManager.getClientManager(CommonClientManager.java:9)
at it.tdlight.common.CommonClientManager.create(CommonClientManager.java:16)
at it.tdlight.tdlight.ClientManager.create(ClientManager.java:20)
at eos1d3.telegram_forwarder.App.main(App.java:20)
Caused by: java.io.IOException: Native libraries for platform osx-amd64 not found!
at it.tdlight.common.utils.LoadLibrary.loadJarLibrary(LoadLibrary.java:177)
at it.tdlight.common.utils.LoadLibrary.loadLibrary(LoadLibrary.java:83)
... 10 more
Exception in thread "TDLib thread" java.lang.UnsatisfiedLinkError: it.tdlight.jni.NativeClient.nativeClientReceive([I[J[Lit/tdlight/jni/TdApi$Object;D)I
at it.tdlight.jni.NativeClient.nativeClientReceive(Native Method)
at it.tdlight.common.NativeClientAccess.receive(NativeClientAccess.java:22)
at it.tdlight.common.ResponseReceiver.run(ResponseReceiver.java:54)
from tdlight-java.
I find 'tdlib-natives-osx-amd64-3.2.48.jar' is already in Eclipse project "Maven Dependencies" folder already. So...?
from tdlight-java.
You aren't reading what you are writing. You are writing "tdlib", not "tdlight"...
from tdlight-java.
use "tdlight-natives-osx-amd64'"
from tdlight-java.
Just realised this. Thanks!
from tdlight-java.
After fixing the name, it shows the same error above
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-natives-osx-amd64</artifactId>
<version>3.2.48</version>
</dependency>
from tdlight-java.
You are building it wrong, i don't know what you are doing but it must work
from tdlight-java.
Does it work on linux?
from tdlight-java.
I created a Maven project in Eclipse, then I just copy the Example, and include the following in pom.xml
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-natives-osx-amd64</artifactId>
<version>3.2.48</version>
</dependency>
When I run it, it show "Init failled when load tdlib library, execution can't continue".
I can try to test on Windows later. I do not have linux to test.
from tdlight-java.
In order to use on Windows, I change to tdlight-natives-windows-amd64
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-java</artifactId>
<version>3.171.36</version>
</dependency>
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-natives-windows-amd64</artifactId>
<version>3.2.48</version>
</dependency>
It shows the same compilation errors on both Mac and Windows:
Failed to read artifact descriptor for it.tdlight:tdlight-natives-windows-amd64:jar:3.2.48
Missing artifact it.cavallium:concurrent-locks:jar:1.0.8
Missing artifact it.tdlight:tdlight-api:jar:3.2.48
Missing artifact it.tdlight:tdlight-java:jar:3.171.36
Missing artifact it.tdlight:tdlight-natives-osx-amd64:jar:3.2.48
Missing artifact it.tdlight:tdlight-natives-windows-amd64:jar:3.2.48
Missing artifact it.unimi.dsi:fastutil:jar:8.3.1
Missing artifact junit:junit:jar:4.11
Missing artifact org.hamcrest:hamcrest-core:jar:1.3 pom.xml
The container 'Maven Dependencies' references non existing library '/Users/xxx/.m2/repository/it/tdlight/tdlight-natives-windows-amd64/3.2.48/tdlight-natives-windows-amd64-3.2.48.jar'
The project cannot be built until build path errors are resolved
from tdlight-java.
Did you add the repository?
from tdlight-java.
Of course I do, see below.
During testing on Windows with Eclipse, if I use tdlight-natives-osx-amd64
, there are no such compilation errors. After changing it to tdlight-natives-windows-amd64
, the errors appear.
Then I did the same on Mac with tdlight-natives-windows-amd64
, I see exactly the same error on Windows.
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<repositories>
<repository>
<id>mchv</id>
<name>MCHV Apache Maven Packages</name>
<url>https://mvn.mchv.eu/repository/mchv/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-java</artifactId>
<version>3.171.36</version>
</dependency>
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-natives-osx-amd64</artifactId>
<version>3.2.48</version>
</dependency>
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-natives-windows-amd64</artifactId>
<version>3.2.48</version>
</dependency>
</dependencies>
from tdlight-java.
That's strange, it should work...
from tdlight-java.
Please note that whenever I use tdlight-natives-windows-amd64
on both Mac and Windows, those are compilation error. I can't even run it.
But these compilation errors are all gone when using tdlight-natives-osx-amd64
.
from tdlight-java.
I tried now and it works also with windows.
Try to delete .m2 cache folder, maybe your local maven repository is broken.
from tdlight-java.
Removing .m2 is not enough, it needs to update Maven project as well.
Now I see these output on Windows. So it seems Windows version is working.
[ 3][t 0][1610818462.646162033][Client.cpp:276][&td_requests] Begin to wait for updates with timeout 2.000000
[ 3][t 5][1610818462.653428792][Td.cpp:4621][#1][!Td][&td_requests] Sending update: UpdateOption {
name = "version"
value = OptionValueString {
value = "1.7.0"
}
}
But doing the same (remove .m2 and update Maven) on Mac is having the same problem:
- If I add
tdlight-natives-windows-amd64
on Mac, there are 8 compilation errors. - If I use only
tdlight-natives-osx-amd64
, it always givesInit failled when load tdlib library, execution can't continue
PS: How to login account or using TOKEN to login? I know how to do in TDLIB, but not this library.
Thanks a lot!
from tdlight-java.
you must install libssl 1.1 on your operating system
from tdlight-java.
Related Issues (20)
- Monitor chat updates where i am not a member (not joined this chat) HOT 1
- TdApi.JoinChatByInviteLink return it.tdlight.client.TelegramError: 500: Internal Server Error: failed to join chat via invite link HOT 2
- db.sqlite file are unreasonably heavy HOT 1
- UpdateMessageEdited Cannot receive callback of robot edited message HOT 1
- Is there any plans to add support for similar channels feature? HOT 2
- Integrate User Bot in Spring Boot application with @Scheduled functions HOT 1
- Failed to load TDLight native libraries (which was built for Mac OS X 12.6) HOT 3
- 3.3.1+td.1.8.25 can not close
- Client is not fully close when call client.sendClose() HOT 1
- How to off logging?
- support for Multiple clients HOT 1
- GetChatHistory not respecting offset int HOT 1
- User Guide
- cannot receive the messages from channel HOT 1
- https://mvn.mchv.eu/mchv 404︱Resource not found
- Dummy requests during InternalClient initialization prevent the possibility of a proxy being set before the Login
- Async managing more than 1 client HOT 7
- modify the way to enter the login verification code HOT 7
- Get me error
- getme reports error after successful login
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 tdlight-java.