-
Notifications
You must be signed in to change notification settings - Fork 235
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
Facing problems with Public registry app tutorial #1046
Comments
@markmhx would you be able to review as part of your planning? |
@agraebe I've put this into the UserX icebox in case we can prioritize contributions here soon. However, given that the platform team will own Stacks.js (including the connect package) going forward, perhaps it'd be best to incorporate into that team's planning instead? I realize ownership here has been blurry in the past, so perhaps we should sync generally about Stacks.js and related documentation contributions given our new team structuring @friedger Have you seen this error in the past when writing this tutorial by chance? |
I thought this was related to connect, that's why I asked. If it comes to updates, I'd rely on @friedger because he wrote all of this IIRC :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed. Please reopen if needed. |
I'm going through the tutorial and immediately hit this problem. @serv did you ever solve this error - from JANUARY? I notice theres another breadcrumb a bit later in the tutorial
I'm guessing this might be the branch and code for the tutorial? |
So that branch, i'm not sure if it's the whole thing, it just looks like the todo app, but at least it runs I don't see anything like a provider or anything that looks like it might be the The parent component has this: import { useConnect } from '@blockstack/connect';
import { PublicUrlRegistrar } from './PublicUrlRegistrar';
export const Sharer = ({ togglePublic, isPublic }) => {
const { authOptions } = useConnect();
const { userSession } = authOptions;
...
<PublicUrlRegistrar userSession={userSession} /> which has the problem fn in it: export const PublicUrlRegistrar = ({ userSession }) => {
const { doContractCall } = useConnect(); this is normally where it blows up. So maybe if we put two nested ok so after
I'm now stuck on this:
I'm assuming that old In any case I can't find a repo for the old one. I think the error above maybe cos i'm running a typescript app and am trying to use fully ESM ie es2020? Not worth trying to patch the broken module. So if i replace that line in the old tutorial - import { useConnect } from '@blockstack/connect';
+ import { useConnect } from "@stacks/connect-react"; I'm back to square one |
This tut hasn't been touched for about two years, so I'm guessing all the libraries are out of date. So given these tutorials are out of date and may take some time to get working again, can any dear readers suggest a modern stacks tutorial that has been used recently and shows how to call a signed contract method? The nft-nyc thing looked interesting but that's also not functional at least in the current repo state, and depends on micro-stacks or micro-stacks/react and embedded jotai state, and an alpha codebase too. |
OK checking some of the source I assume this is the issue:
so it is a looking for a context to use... that's a bit different from the current tutorial, so maybe that was a change in the hiro |
OK I think i have the minor change to make it work:
and then in the
|
it's mainly a problem with the demo app, not the plugin. for this particular app i think it's a branch inside the TODO app, so it will end up being a hairball fixing one thing will need to fix the other and not sure where it will end. in theory I could make a new repo just for the registry app, use the latest version of the hiro plugins, and check it works? but i'm more tempted to look into micro-stacks and other libs right now and create a better reference app with NFT mint features etc. |
@agraebe mind providing some guidance here on the next steps from your perspective? This is ultimately a question of how this example app should support Hiro docs and the developer journey going forward. |
Note: Now that the Hiro and Stacks docs are split, this particular issue should be on the Hiro docs repo. The tutorial is now available here https://docs.hiro.so/example-apps/public-registry. A new issue was created: hirosystems/docs#50
This would be my suggestion, too. I think the sample code (for both the todo and the registry app) wasn't touched for a long time and we'd be better off with a clean slate. @dcsan if you would be open to sharing a working sample, I would love to use your code in the tutorial! |
@agraebe i mostly just used the references to build my own app, so don't have a "working version" of this app. <Connect authOptions={authOptions} >
<AuthButton />
</Connect> happy to help / review after you split out the repo also I noticed that versions I'm using of connect are somehow very out of date. |
great, thanks for the note! once we get to revisit the sample code, I'll make sure to update that part. |
I've run into the exact same problem when working with the tutorials. Any time the tutorials are going to be updated? After solving the issue using using this method, a new issue came up. The todo-registry contract no longer exists on the testnet!
Also the billboard app tutorial has an issue, I suspect its that the app is not compatible with the newer version of clarinet. Running clarinet integrate or clarinet check
Error in the billboard.clar file. |
The tutorials are now maintained at https://github.com/hirosystems/docs/tree/main/docs @javalight |
I am currently going through https://docs.blockstack.org/build-apps/tutorials/public-registry and I am facing several problems.
Problem 1: Lacking instruction to install dependencies for
Registering a public URL
I needed to install
Problem 2:
Unhandled Rejection (Error): This must be used within the ConnectProvider component.
Once I install the dependencies above, I am at least able to start the app.
When you are signed out, you don't see this problem. Once you sign in, you see this error.
Unhandled Rejection (Error): This must be used within the ConnectProvider component.
I don't have enough knowledge to solve this problem. Can someone knowledgeable fix the doc to fix the above 2 problems?
Thanks.
The text was updated successfully, but these errors were encountered: