Open Magic-King opened 2 years ago
Hi, there's no extra script or anything needed. Trilium Sender should work out of the box.
Are you sure you're configuring the correct URL/port? I'm not sure what that error means, /api/sender
does not exist and is not called by Trilium Sender (but there's e.g. /api/sender/login
and other services).
Today I try to read the source code and use android logcat to find out what causes it. I found that http transport is not supported higher than android 9, and I think this is the key problem.
$ adb logcat |grep UserLoginCoroutine
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: Can't connect to Trilium server
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: java.net.UnknownServiceException: CLEARTEXT communication to my_server not permitted by network security policy
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:188)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at io.github.zadam.triliumsender.LoginActivity$doLogin$2.invokeSuspend(LoginActivity.kt:173)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
01-25 10:30:11.663 25101 26313 E UserLoginCoroutine: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Oh, I see, fix for that has been actually already merged in https://github.com/zadam/trilium-sender/pull/18 but not yet released.
Oh, I see, fix for that has been actually already merged in #18 but not yet released.
Is there a way to get a preview? This is a show stopper on Android.
Oh, I see, fix for that has been actually already merged in #18 but not yet released.
Is there a way to get a preview? This is a show stopper on Android.
Any news about it?
Oh, I see, fix for that has been actually already merged in #18 but not yet released.
Is there a way to get a preview? This is a show stopper on Android.
Any news about it?
+1 No Update since Jan? Perhaps it's a dead horse and we must use obsidian? I've just migrated from DS Note and i miss the nativ app badly.
Releases to this app (meaning specifically the android version) are done rarely, as it's quite time-consuming. There has to be a strong driver/reason to make a release, using unsecure HTTP did not do it for me yet.
i cannot use the android app because of this issue. It simply won't connect to my self hosted trilium server. Desktop app syncs fine with the same settings. Also it asks for username and the Desktop app doesn't, I would not know what to enter there so i just wrote there trilium.
Same for me - wanted to integrate sending scans from the phone to my Trilium workflow - I get this error when trying to connect to the home server.
I would like a lot to use the app but have the same problem. Is there a workaround?
In case anyone else is still getting this issue, I had the same when my Trilium server (using the Unraid docker package) wasn't the latest version. Make sure the server is pulling the zadam/trilium:0.58.7 version and the login works as expected.
I added my name as the username, as the app won't let you login without providing one (even though Trilium only requires a password).
Edit: I am running the server on http:8080, but using nginx reverse proxy to expose the server on an https endpoint with a valid letsencrypt ssl certificate.
Is https required to make it work. I'm still getting network error
Releases to this app (meaning specifically the android version) are done rarely, as it's quite time-consuming
@zadam what about building apk and creating github release? without google play and other stores?
I can't go through this issue. Any hint? I also plead for the apk.
I also have this issue. Actually I am using Trilium with Hermit as a Lightapp. That's not optimal but better than nothing.
Releases to this app (meaning specifically the android version) are done rarely, as it's quite time-consuming. There has to be a strong driver/reason to make a release, using unsecure HTTP did not do it for me yet.
Happy new year, I love trilium. It would seem that it is being included on a number of server management platforms, some of which don't offer ssl solutions out of the box.
I don't really care about ssl, I'm running this on my local network and I only ever access it locally, by IP address, so I know I'm connecting to the right place.
I've successfully built this locally and side-loaded the debug version of the apk, so I can now successfully send notes to my server. I'd like to hear more about the pain points of this project and see if I can help. I'd be happy to try to help set up some workflows to automate the build process, maybe with tagging to get this on f-droid as I've seen in other requests.
@j-tirelli following up in the Trilium Next Sender fork might see more traction: https://github.com/TriliumNext/trilium-sender
I've never built an APK but am happy to help with testing and documentation. Please ping me if you do continue over there.
I can't login in trilium server in trilium-sender downloaded by google play. It shows me the network error after I input the necessary info.
And I found logs below, I want to know if there is a script which supported the trilium-sender.