-
Notifications
You must be signed in to change notification settings - Fork 41
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
[Connect] Error during auth request Error: Improperly formatted private-key. Private-key byte length should be 32 or 33. Length provided: 390 #321
Comments
@kyranjamie any initial ideas here? |
This is more an issue with connect, nothing is running in the wallet's context here. Would be helpful to debug and see what the key is that's 390 length (but ofc that shouldn't be shared). Wonder if this is some snowpack bundling issue. Transferring to Connect repo. |
Here is the repo: with it it should be possible for you to recreate the error: https://github.com/himmelhargott/prt.git with npm start, serving locally with snowpack, there is no problem chosing an account in the wallet an logging in. yet served on the raspPi4 with nginx (bundled with parcel or snowpack, tried both, both with the same error) I can choose an account and then get the above error. I am somewhat desperate. Would appreciate very much if someone could look into it. And thanks for the work done so far. Best regards |
This seems to be a build issue, likely unrelated to Stacks connect. Closing issue as unrelated...
|
Thank you very much for looking into it! |
follow up question: since I am still stuck with the problem: I did the same: now with serving: I can choose local or network via link (see screenshot above) did you try the same? did it work via network? thanks for a quick update. |
Can you try this link? https://n4yi3m-3000.csb.app/ |
Yes, this works =)What did I miss?--Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 05.05.23, 3:19 PM schrieb janniks ***@***.***>:
Can you try this link? https://n4yi3m-3000.csb.app/
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hard to say, likely some weird install/version/build issue; might be something on the browser / extensions. This codesandbox is forked from your reproduction repo: https://codesandbox.io/p/sandbox/competent-hellman-n4yi3m you might be able to work in a similar environment. Not sure how to best deploy to raspi |
Thank you very much! For now I will try it like this. Yet on a Windows machine, I had the same problem. |
As it looks to me the "problem" lies in not having a domain in document.location.href since as I understand it correctly this is used to generate the key. So in case of there is a IP address instead of a domain, there ensues the error (out of reasons unbeknownst to me) As soon as the some code is served with a domain, everything works fine. My solution up to now is to use tiiny.host to test the project. As such it is online as a normal website and this 24/7 for possible customers to test and play around. Thank you very much for your cooperation. Best regards |
Cool, thanks for the investigation! I’ll re-open so we fix this at some point 🙏🏻 |
=) pleasure though I would like to point out, that its only my best guess and a possible vector to investigate in. happy coding |
@janniks I'm running into this issue as well. We're providing a CLI tool that hosts a web server on the user's localhost. Whenever we bind to http://0.0.0.0:8545 and connect the wallet, we're getting this error. However, if we bind to http://127.0.0.1:8545 or http://localhost:8545, we can successfully connect the wallet. Any help here would be much appreciated 🙏 |
Hello,
I hope this is a wallet issue, otherwise feel free to relocate, since I am somewhat at a loss.
I try to find out, why this message is happening:
While developping a webapp locally, everthing went fine (as with parcel as with snowpack, tried both).
To connect to the app i use showConnect from @stacks/connect
This opens the wallet extension, which I can unlock with the password.
Then I can choose an account. When clicking on one, this error is in the browser console:
As long as i serve the project with parcel or snowpack on localhost, everything works fine.
As soon as I build the project with either one of them the error occurs. If I omit the login, the rest oft the project works (except all that is linked to userData of course)
the import is done like so through the snowpack builder:
import { showConnect } from "./_snowpack/pkg/@stacks/connect.js";
the webserver is nginx on a raspberryPi 4.
The project has NO domain ONLY the internal IP of the raspPi (like 192.168.0.1) -> maybe thats the problem? If so, is there an easy way around that problem?
Hope very much that anyone can help me or show me a workaround, since I spent almost 2 month with learning and programming that app.
Many thanks in advance!
Best Regards
Stefan
The text was updated successfully, but these errors were encountered: