-
-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to link device via QR code #651
Comments
I'm having the same problem. |
Does it make a difference if you try another mode (e.g Just tried with Version 7.32.2 on my Android phone and it works there. If not already done, please also try with |
@bbernhard Thanks for your quick followup. I've performed the tests you suggest. I was already using v0.178-dev v0.178-dev so updated my android signal client to 7.32.2 with the server in normal mode, with the same results. I then switched to json-rpc mode which yielded the following error at
UPDATED: somehow the above webpage error didn't make it into the initial message. And the following docker console log:
Strange that the logs suggest that an attempt was made to register rather than link... or is that a fallback case of some kind? |
There is no fallback in place. But I do not see any registering attempt in the log file. 🤔 This line
indicates that you've called the qrcodelink endpoint to get the QR code, which is what you wanted to do. But it looks like as if the JAVA VM is totally crashing. This thread here looks related: https://discuss.elastic.co/t/startup-failure-arch64-crashes-arm64-fedora-rocky9-centos9-macbook-m4-docker/371708/7. I guess there's a bug in OpenJDK right now |
The log below is generated at container startup before visiting the webpage to generate and scan the qr code for linking. Theline that suggested to me there was some kind of fallback was the last line:
I saw reference to this error when I was investigating signald as a connectivity option. I followed the documented solution, adding the two environment variables to my docker-compose file and got the same result (at startup, before the qr code http request):
|
For completeness, I pulled the mentioned /tmp/hs_err_pid42.log file from the running container. I'm not a big java guy in recent years. Is there a a JRE version that doesn't exhibit the SVE issue? From what I can tell, in recent JRE releases, UseSVE=0 is ignored as apparently described here: OpenJDK bug |
I guess the log output is a bit misleading in that case. Internally there is no real difference between a dedicated registered number and a linked account. So, I didn't differentiate in the log message between those two cases. It basically just means, there is no number registered/account linked. Unfortunately, I do not have much experience with Java either. According to the bug tracker, it should be fixed with OpenJDK 21.0.7 - which, if I am not completely mistaken is not yet released. Did you try the env variables also with the normal mode? The json-rpc mode is a bit special, as in json-rpc mode, Could you please switch back to normal mode and enable the debug mode (as described here: https://github.com/bbernhard/signal-cli-rest-api/blob/master/doc/DEBUG.md). This allows you to run the signal-cli commands directly in the container. Since the json-rpc mode and the normal mode uses the same Java application, I think you should see the crash also there. And as you are inside the docker container its also easier to play around with the env variables and see if that does have any impact. |
For clarirty, in normal mode, the JSK was not crashing at startup, even without the SVE environment variables, but I went ahead with the test, recognizing it should probably it would in the best case fail elegantly, saying no number was registered or device linked, so it wouldn'ty matter what numbers I used in the send test. I used your example exactly as written, because essentially it wouldn't matter. The workflow is presumably what we want to see here. This is what we got:
That was the end of the log output, despite it showing that it might display something to stderr and copy it into the log. The command issued, and response follow:
All of this seems to suggest that this will run cleanly on x86_64. I may be able to find one later today to test. The OpenJDK ticket seems to suggest this issue is specific to the Mac M series implementation of ARM64, so I may try it on Nvidia AGX Orin Arm hardware which I have more readily accessible. In prodfuction this system will likely be on x86_64 so this may be just an academic exercise. Interestingly, this OpenJDK ticket seems to suggest that the fix has already been backported to 21.05 but maybe not 21.05+11 |
Yeah, it definitely looks like an issue specific to the Mac M series of ARM64. :/
When a new image gets built, it always pulls the latest packages from the repository. Currently, Ubuntu jammy is used as base image. The develop image was built ~1 week ago. |
I'm going to take a look at swapping out the base images for these https://github.com/adoptium/containers using alpine which will give us much finer grained idk versioning but also shrink the final image size substantially. Unfortunately, the current image won't build on a Mac without jdk errors as it is, so I'm going to first start from an x86_64 environment where the existing build works |
I did try to use alpine as a base image a few years ago. But unfortunately it wasn't working with musl - so I switched to a base image which uses glibc. |
While this result is unsurprising, I have in fact, confirmed that the issue is related specifically to a version of the JVM as it relates to M series Mac hardware implementation of vector mathematics. It seems worth documenting here if for no other reason than for SEO purposes. |
Have you seen this? #631 This seems to be the same issue, no? |
I had not. It does seem to be fundamentally the same issue although I have
limited confidence that we can expect a solution from openJDK that presents
itself only within docker running on an arm mac host. I would suggest that
possibly the solution is to pin the Java JRE to a version we know works
across all platforms within your project. Certainly we should revisit this
periodically to determine when a solution has been found across modern
JRE/JDK implementations but for the moment the best solution is to pin a
specific known working version.
…On Mon, Feb 10, 2025, 02:51 Bernhard B. ***@***.***> wrote:
Have you seen this? #631
<#631>
This seems to be the same issue, no?
—
Reply to this email directly, view it on GitHub
<#651 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABHNRYTOKEYO26N4CTYA4D2PBLBZAVCNFSM6AAAAABWRUUR46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBXGE4DKNJRGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The problem
As of January 24, I am no longer able to perform QR code based device linking, from the android Signal client, which now reports that the QR code created by signal-cli-rest-api does not represent a valid signal linking URI. I'm guessing the issue arose on the 24th, because that was the release date of the signal android client v7.31.1 however, I can't say for sure, as my test server remained linked until the 28th (when I unlinked). I have since not been able to re-link. An image of the error as presented in the android signal client is attached. No errorts are logged on the signal-cli-rest-api side, beyond the informational QR code http request. I would expect this related to some slight restructuring of linking URLs on the signal side which would likely have to be addressed upstream, within https://github.com/AsamK/signal-cli but figured it would be worth noting here.
Are you using the latest released version?
Have you read the troubleshooting page?
What type of installation are you running?
signal-cli-rest-api Docker Container
In which mode are you using the docker container?
Normal Mode
What's the architecture of your host system?
arm64
Additional information
Worth noting that I tested both latest and latest-dev tagged images. Both exhibited this behavior.
The text was updated successfully, but these errors were encountered: